-
Notifications
You must be signed in to change notification settings - Fork 1
/
_targets.R
44 lines (33 loc) · 1.04 KB
/
_targets.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
library(targets)
library(tarchetypes)
library(reticulate)
yaml_file <- "gloria_config.yml"
# MUST READ ---------------------------------------------------------------
# IMPORTANT NOTE:
#
# you must execute the command 'earthengine authenticate' in a zsh terminal
# before initializing this workflow. See the repository README for complete
# dependencies and troubleshooting.
# RUNNING {TARGETS}:
#
# use the file 'run_targets.Rmd', which includes EE authentication.
# Set up python virtual environment ---------------------------------------
if (!dir.exists("env")) {
tar_source("data_acquisition/src/pySetup.R")
} else {
use_condaenv(file.path(getwd(), "env"))
}
# Define {targets} workflow -----------------------------------------------
# Set target-specific options such as packages.
tar_option_set(packages = "tidyverse")
tar_source(files = c(
"a_collate_locations.R",
"b_data_acquisition.R",
"c_data_download_collation.R"
))
# target objects in workflow
list(
a_collate_locations,
b_data_acquisition,
c_data_download_collation
)