realtime_dd | R Documentation |
Download realtime river data from the last 30 days from the Meteorological Service of Canada (MSC) datamart. The function will prioritize downloading data collected at the highest resolution. In instances where data is not available at high (hourly or higher) resolution daily averages are used. Currently, if a station does not exist or is not found, no data is returned.
realtime_dd(station_number = NULL, prov_terr_state_loc = NULL)
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 8 variables:
Unique 7 digit Water Survey of Canada station number
The province, territory or state in which the station is located
Observation date and time for last thirty days. Formatted as a POSIXct class in UTC for consistency.
Parameter being measured. Only possible values are Flow and Level
Value of the measurement. If Parameter equals Flow the units are m^3/s. If Parameter equals Level the units are metres.
reserved for future use
reserved for future use
quality assurance/quality control flag for the discharge
Station timezone based on tidyhydat::allstations$station_tz
A tibble of water flow and level values. The date and time of the query (in UTC) is also stored as an attribute.
Other realtime functions:
realtime_stations()
,
realtime_ws()
## Not run:
## Download from multiple provinces
realtime_dd(station_number = c("01CD005", "08MF005"))
## To download all stations in Prince Edward Island:
pei <- realtime_dd(prov_terr_state_loc = "PE")
## Access the time of query
attributes(pei)$query_time
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.