R/get_radolan_urls_bucket.R
get_radolan_urls_bucket.Rd
This function requires two environment variables to be set:
"ENDPOINT_PROD": Endpoint to the service that returns URLs to Radolan
files, "TOKEN_PROD": token that is required to access the endpoint. Use
usethis::edit_r_environ()
to open the .Renviron file in your home
directory and add two lines "ENDPOINT_PROD=..." and "TOKEN_PROD=..." where
... is replaced with the corresponding values.
get_radolan_urls_bucket(from = format(Sys.Date() - 1, "%Y%m%d"), to = from, time = "", bathing_season_only = FALSE)
from | first day considered in format yyyymmdd, e.g. "20190625". Default: string representing "yesterday". If only the year and the month or only the year are given, the first day of the month and the first day of the year, respectively, are assumed. |
---|---|
to | last day considered in format yyyymmdd, e.g. "20190625". Default:
same day as given in |
time | considered, given in format HHMM, e.g. "1050". Default: "", i.e. URLs are not filtered by time |
bathing_season_only | = FALSE if |
vector of character containing the URLs to the radolan files. The date and time to which the data in the files relate are encoded in the names of the returned vector elements in the format "yyyymmddHHMM".
if (FALSE) { # Get URLs to available files for 2019-06-25, 10:50 urls <- get_radolan_urls_bucket(from = "20190625", time = "1050") # Read the first file (there should be only one such file!) raster_rain <- kwb.dwd::read_binary_radolan_file(urls[1]) }