Similar to find_ts_id()
for Kiwis in spirit
Usage
find_hydstra_request(
portal,
gauge,
datasource = "A",
var_list = NULL,
variable = NULL,
units = NULL,
statistic = "mean",
timeunit = "day",
multiplier = 1,
warnmissing = TRUE,
ignore_fromderived = TRUE
)
Arguments
- portal
character for the data portal (case insensitive). Default 'victoria'
- gauge
character vector of gauge numbers, as
site_list
for Hydstra functions (station_no
for Kiwis functions)- datasource
character for datasource code. To my knowledge, options are
"A"
,"TELEM"
,"TELEMCOPY"
. Passing multiple not currently supported.- var_list
as in
get_ts_traces()
, but can also take"all"
to get all available variables at each site insite_list
. If 'all', overridesvariable
andunits
, though usingvar_list
with those is always dangerous.- variable
allows searching by variable name, e.g. 'discharge' with grepl as in
fetch_kiwis_timeseries()
- units
allows searching by the units of the variable, e.g. 'ML/d' with grepl as in
fetch_kiwis_timeseries()
- statistic
same as
data_type
inget_ts_traces()
. Name changed for consistency and interpretation. Can be a single character or a vector the same length asvar_list
. If single value, behaves as inget_ts_traces()
, applying that function to all variables. If a vector, it applies the given function to the variable in the matching position ofvar_list
. This allows us to ask for many variables that might need different statistics. Note- ifvar_list = "all"
, there is no way to match since the variables are unknown and may change between sits, and sostatistic
should be a single function.- timeunit
same as
interval
inget_ts_traces()
. Name changed for consistency and interpretation.- multiplier
character, interval multiplier. I think this allows intervals like 5 days, by passing
interval = 'day'
andmultiplier = 5
. Not tested other than 1 at present.- warnmissing
warns if a gauge is missing. TRUE by default, but able to be silenced for programmatic use.
- ignore_fromderived
logical, default TRUE. Sometimes a derived variable (140, 141) is also available as a var_from, seemingly usually with a longer historical record. TRUE (the default) ignores that, and uses just the e.g. var_from = 100, var_to = 140. FALSE returns both sets, e.g. all records with the derived variable as var_to. If FALSE, look at the output carefully, it's often very strange