Stage a data request, and optionally download the data to disk. Alternatively
you can only stage requests, logging the request URLs to submit download
queries later on using rs_transfer
.
nested list with query parameters following the layout as specified on the AppEEARS APIs page
user (email address or ID) provided by the AppEEARS data service,
used to retrieve the token set by rs_set_key
logical, download data TRUE or FALSE (default = TRUE)
path were to store the downloaded data
individual time out for each request
optional name to use as an RStudio job and as output variable name. It has to be a syntactically valid name.
show feedback on processing
a list of requests that will be processed in parallel.
maximum number of simultaneous request that will be submitted to the service. Most services are limited to ~20 concurrent requests (default = 2).
overall timeout limit for all the requests in seconds. (note that the overall timeout on a session is 48h)
the path of the downloaded (requested file) or the an R6 object with download/transfer information
if (FALSE) {
# specifiy a task/request as a
# data frame
df <- data.frame(
task = "grand canyon",
subtask = c("test1", "test2"),
latitude = c(36.206228, 36.206228),
longitude = c(-112.127134, -112.127134),
start = c("2018-01-01","2018-01-01"),
end = c("2018-01-15","2018-01-15"),
product = c("MOD11A2.061","MCD12Q2.006"),
layer = c("LST_Day_1km","Dormancy")
)
# build a proper JSON query
task <- rs_build_task(df = df)
# request the task to be executed
rs_request(
request = task,
user = "earth_data_user",
transfer = TRUE,
path = "~/some_path",
verbose = TRUE
)
}