Description Usage Arguments Value Author(s) Examples
make a dataframe of stations records for each requested hour
1 2 3 4 5 | makeDataset(user_token = Sys.getenv("AGROMET_API_V1_KEY"),
api_request = "https://app.pameseb.be/agromet/api/v2/sp/cleandata",
sensors = "tsa", stations = "all", stations_meta = stations.df,
dfrom = NULL, dto = NULL, json = NULL, staticExpl = "elevation",
dynExpl = NULL)
|
sensors |
a character vector specifying the name of the sensors for which you data. One of tsa, hct, hra, ens, plu, vvt. |
stations |
a character vector specifying the sid's of the stations to use. |
dfrom |
a datetime string specifying the dateTime from which you want data Must have the form "YYYY-MM-DDTHH:MM:SSZ" |
dto |
a datetime string specifying the dateTime to which you want data Must have the form "YYYY-MM-DDTHH:MM:SSZ" |
json |
a character specifying the path of a json file constructed from a batch db export. If NULL the API will be called. |
staticExpl |
a character vector specifying the desired static explanatory variables Any combinations of "elevation", "slope", "aspect", "Agricultural_areas", "Artificials_surfaces", "Forest", "Herbaceous_vegetation". Latitude and longitude are always provided. Default = "Elevation" |
dynExpl |
a character vector specifying the dynamic explanatory variables you want to add to the task. Any combinations of inca, ens |
token |
a character specifying your agrometAPI token |
A 2 elements named list
snitch
: a boolean. Is TRUE
if function has provided the expected result. Is FALSE
is function throws an error
output
: a named list which elements are :
value
: a list which elements are of classes data.frame
which colnames correspond to sid, mtime, the sensors, x (latitude), y (longitude) and the explanatory variables
condition
: a character specifying the condition encountered by the function : success, warning, or error.
message
: a character specifying the message relative to the condition.
Thomas Goossens
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# get the dataset
myDataset = makeDataset(
dfrom = "2017-03-04T15:00:00Z",
dto = "2017-03-04T15:00:00Z",
sensor = "tsa")
# extract the data
myDataset = myDataset$output$value
# each dataframe is stored in a list
class(myDataset)
# show the head of the first dataframe
head(myDataset[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.