This is a helper function to make it easier to handle additional query parameters. Provides defaults for each and does type checking.
set_options(
networks = "*",
duration = "daily",
begin_date = NULL,
end_date = NULL,
period_reference = "end",
central_tendency = NULL,
return_flags = FALSE,
return_original_values = FALSE,
return_suspect_values = FALSE,
begin_publication_date = NULL,
end_publication_date = NULL,
exceedence_probabilities = NULL,
forecast_periods = NULL,
station_names = NULL,
dco_codes = NULL,
county_names = NULL,
hucs = NULL,
return_forecast_metadata = FALSE,
return_reservoir_metadata = FALSE,
return_element_metadata = FALSE,
active_only = TRUE,
request_size = 10L
)# S3 method for awdb_options
print(x, ...)
an awdb_options list
character vector, abbreviations or codes for station networks
of interest (e.g., "USGS" refers to all USGS soil monitoring stations).
Default is *, for "all networks". See Details for available networks and
codes.
character scalar, the temporal resolution of the element
measurements. Available values include daily (default), hourly,
semimonthly, monthly, calendar_year, and water_year.
character scalar, start date for time period of interest.
Date must be in format "YYYY-MM-DD".
character scalar, end date for time period of interest. Date
must be in format "YYYY-MM-DD".
character scalar, reporting convention to use when
returning instantaneous data. Default is "end".
character scalar, the central tendency to return for
each element value. Available options include NULL (default, no central
tendency returned), median and average.
boolean scalar, whether to return flags with each element
value. Default is FALSE.
boolean scalar, whether to return original
element values. Default is FALSE.
boolean scalar, whether to return suspect element
values. Default is FALSE.
character scalar, the beginning of the
publication period for which to retrieve data. Date must be in format
YYYY-MM-DD. If NULL, assumes start of the current water year.
character scalar, the end of the publication
period for which to retrieve data. Date must be in format YYYY-MM-DD. If
NULL, assumes current day.
integer vector, the probability that streamflow will exceed a specified level.
character vector, the time period over which to make streamflow forecasts.
character vector, used to subset stations by their
names. Default is NULL.
character vector, used to subset stations to those that fall
in specified DCOs. Default is NULL.
character vector, used to subset stations to those that
fall in specified counties. Default is NULL.
integer vector, used to subset stations to those that fall in
specified hydrologic units. Default is NULL.
boolean scalar, whether to return forecast
metadata with station locations. Will be included as a list column. Default
is FALSE.
boolean scalar, whether to return reservoir
metadata with station locations. Will be included as a list column. Default
is FALSE.
boolean scalar, whether to return element
metadata with station locations. Will be included as a list column. Default
is FALSE.
boolean scalar, whether to include only active stations.
Default is TRUE.
integer scalar, number of individual stations to include
in each query. This helps to meet rate limits imposed by the API. If you are
getting a request error, you might try lowering this number. Default is
10L.
an awdb_options list
ignored