get_radolan_urls_for_measurements: Determine URLs to Radolan Files for Measurements

Description Usage Arguments Value Examples

View source: R/get_radolan_urls_for_measurements.R

Description

Determine the URLs to the Radolan files that are required to calibrate a model. For each day of measurement files (for the day of measurements and the five days before) are required.

Usage

1
2
3
4
5
6
7
8
9
get_radolan_urls_for_measurements(
  user_id,
  spot_id,
  sampling_time = "1050",
  date_range = NULL,
  all_in_range = FALSE,
  n_days_before = 5,
  summer_filter = FALSE
)

Arguments

user_id

user id

spot_id

bathing spot id

sampling_time

expected sampling time. Will be used to select the corresponding Radolan files.

date_range

vector of two Date objects giving the first and last day of rain data to be loaded. If NULL (the default) the range of dates is determined from the range of dates for which water quality measurements are available.

all_in_range

if TRUE (the default is FALSE) rain data for all days between the first and last day of a measurement are loaded. By default (all_in_range = FALSE), data for the days of measurement and for the days within a n_days_before-day time period before each day of measurement, are loaded.

n_days_before

number of days before a measurement for which to load rain data

summer_filter

if TRUE, only dates within the bathing season are kept. Default: FALSE

Value

named vector of character containing the URLs to the Radolan files required for the measurements storted in the database. The names of the elements are strings in which the date and time is encoded in the format yyyymmddHHMM, e.g. "201809171050" for "2019-09-18 10:50"

Examples

1
2
3
4
## Not run: 
urls <- get_radolan_urls_for_measurements(user_id = 5, spot_id = 41)

## End(Not run)

KWB-R/fhpredict documentation built on Nov. 1, 2020, 5:58 a.m.