Skip to contents

Functions to retrieve historical flow and levels data from ECCC web service. This data is the same as HYDAT data but provides the convenience of not having to download the HYDAT database. This function is useful when a smaller amount of data is needed. If you need lots of data, consider using HYDAT and the hy_ family of functions

Usage

ws_daily_flows(station_number, start_date = NULL, end_date = NULL)

ws_daily_levels(station_number, start_date = NULL, end_date = NULL)

Format

A tibble with 6 variables:

STATION_NUMBER

Unique 7 digit Water Survey of Canada station number

Date

Observation date and time. Formatted as a POSIXct class as UTC for consistency.

Parameter

Type of parameter

Value

Value of the measurement.

Symbol

future use

Arguments

station_number

Water Survey of Canada station number.

start_date

Accepts YYYY-MM-DD. You need to provide a start date. The default value is NULL

end_date

Accepts either YYYY-MM-DD. You need to provide an end date. The default value is NULL

See also

hy_daily_flows

Examples

if (FALSE) { # \dontrun{
try(
   flow_data <- ws_daily_flows(
     station_number = c("08NL071", "08NM174"),
     start_date = Sys.Date() - 365,
     end_date = Sys.Date()
   )
)
try(
   level_data <- ws_daily_level(
     station_number = c("08NL071", "08NM174"),
     start_date = Sys.Date() - 365,
     end_date = Sys.Date()
     )
)
} # }