Convenience function to fetch primary and secondary water survey parameters for a given HYDAT station
over a specified number of days. Wraps tidyhydat::realtime_ws()
with main advantage that it relies on the
availability of temperature data (or some other param_primary
to be present before it will attempt to obtain
secondary data.
Arguments
- id_station
character A single station identifier string.
- param_primary
numeric A numeric vector of primary HYDAT parameter codes.
- param_secondary
numeric A numeric vector of secondary HYDAT parameter codes. This data is only retrieved if there is primary data available. See the available options with tidyhydat::param_id
- days_back
numeric A single integer specifying how many days back to fetch data. Defaults to 581 which seems to be the maximum amount retrievable
Value
A list with two elements: primary_data
and secondary_data
, each a data frame of results. Returns NULL
on failure and prints a CLI alert.