-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.R
executable file
·49 lines (34 loc) · 1.46 KB
/
make.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#' Agri-TE project
#'
#' @description
#' This project contains code for:
#' - Retrieve DOI from full citation
#' - Retrieve metadata from DOI
#' - Retrieve full text (PDF) from DOI
#' - Extract countries from reference title
#' - Extract countries in PDF
#'
#' @author Nicolas Casajus \email{[email protected]}
#'
#' @date 2023/03/01
## Install Dependencies (listed in DESCRIPTION) ----
if (!("remotes" %in% installed.packages()[ , "Package"]))
install.packages("remotes")
remotes::install_deps(upgrade = "never")
## Load Project Addins (R Functions and Packages) ----
pkgload::load_all(here::here())
## Create sub-folders ----
dir.create(here::here("data", "derived-data"), showWarnings = FALSE)
dir.create(here::here("outputs"), showWarnings = FALSE)
dir.create(here::here("outputs", "pdf"), showWarnings = FALSE)
dir.create(here::here("figures"), showWarnings = FALSE)
## Run Project ----
# source(here::here("analyses", "01-check_raw_data.R"))
# source(here::here("analyses", "02-extract_unique_refs.R"))
# source(here::here("analyses", "03-retrieve_dois.R"))
# source(here::here("analyses", "04-retrieve_pdfs.R"))
# source(here::here("analyses", "03-retrieve_dois_bis.R"))
# source(here::here("analyses", "05-extract_countries_title.R"))
# source(here::here("analyses", "06-extract_countries_pdf.R"))
source(here::here("analyses", "07-map_number_of_studies_title.R"))
source(here::here("analyses", "07-map_number_of_studies_pdf.R"))