Download realtime data from the ECCC web serviceSource:
Function to actually retrieve data from ECCC web service. The maximum number of days that can be queried depends on other parameters being requested. If one station is requested, 18 months of data can be requested. If you continually receiving errors when invoking this function, reduce the number of observations (via station_number, parameters or dates) being requested.
A tibble with 6 variables:
Unique 7 digit Water Survey of Canada station number
Observation date and time. Formatted as a POSIXct class as UTC for consistency.
Code name in English
Value of the measurement.
Numeric parameter code
Letter parameter code
Water Survey of Canada station number.
parameter ID. Can take multiple entries. Parameter is a numeric code. See
param_idfor some options though undocumented parameters may be implemented. Defaults to Water level provisional, Secondary water level, Tertiary water level, Discharge Provisional, Discharge, sensor, Water temperature, Secondary water temperature, Accumulated precipitation
Accepts either YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. If only start date is supplied (i.e. YYYY-MM-DD) values are returned from the start of that day. Defaults to 30 days before current date. Time is supplied in UTC.
Accepts either YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. If only a date is supplied (i.e. YYYY-MM-DD) values are returned from the end of that day. Defaults to current date. Time is supplied in UTC.