| Title: | Extract and Tidy Canadian 'Hydrometric' Data |
|---|---|
| Description: | Provides functions to access historical and real-time national 'hydrometric' data from Water Survey of Canada data sources and then applies tidy data principles. |
| Authors: | Sam Albers [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-9270-7884>, Copyright holder 2022-2025), Province of British Columbia [cph] (Copyright holder 2017-2022), Tula Foundation [cph] (Copyright holder 2025-present), David Hutchinson [ctb], Dewey Dunnington [ctb], Ryan Whaley [ctb], Government of Canada [dtc], Luke Winslow [rev] (Reviewed for rOpenSci), Laura DeCicco [rev] (Reviewed for rOpenSci) |
| Maintainer: | Sam Albers <[email protected]> |
| License: | Apache License (== 2.0) | file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-03-05 09:17:17 UTC |
| Source: | https://github.com/ropensci/tidyhydat |
A shorthand to avoid having always call hy_stations or realtime_stations.
Populated by both realtime and historical data from HYDAT.
allstationsallstations
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
STATION_NAME: Official name for station identification
PROV_TERR_STATE_LOC: The province, territory or state in which the station is located
HYD_STATUS: Current status of discharge or level monitoring in the hydrometric network
REAL_TIME: Logical. Indicates if a station has the capacity to deliver data in real-time or near real-time
LATITUDE: North-South Coordinates of the gauging station in decimal degrees
LONGITUDE: East-West Coordinates of the gauging station in decimal degrees
station_tz: Timezone of station calculated using the lutz package based on LAT/LONG of stations
standard_offset: Offset from UTC of local standard time
HYDAT, Meteorological Service of Canada datamart
Convenience function that combines final historical data (from HYDAT or web service) with provisional real-time data in a single call.
available_flows( station_number, start_date = NULL, end_date = Sys.Date(), hydat_path = NULL, prov_terr_state_loc = NULL )available_flows( station_number, start_date = NULL, end_date = Sys.Date(), hydat_path = 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 |
start_date |
Start date for data retrieval in YYYY-MM-DD format. Defaults to NULL (retrieves all available historical data). |
end_date |
End date for data retrieval in YYYY-MM-DD format. Defaults to current date (Sys.Date()). |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Value is "Flow"
Value: Discharge value. The units are m^3/s.
Symbol: Measurement/river conditions
Approval: Approval status: "final" (approved) or "provisional" (subject to revision)
This function combines data from final and provisional data sources to provide a complete discharge record.
Historical (Final) Data:
The function automatically determines the best source for historical data:
hydat_path provided (path to database): Uses local HYDAT database at that path
hydat_path = FALSE: Forces use of web service (useful when HYDAT unavailable)
hydat_path = NULL (default): Uses HYDAT default location, automatically falls back
to web service if HYDAT is unavailable
Real-time (Provisional) Data:
Provisional data is retrieved from ECCC's real-time web service using the
realtime_ws() function. This data covers approximately the last 18 months
and is updated regularly. Since real-time data is collected at sub-daily
intervals, values are aggregated to daily means to match the daily format
of HYDAT data. For non-aggregated real-time data, use realtime_ws() directly.
The Approval column uses ECCC's terminology
(see https://wateroffice.ec.gc.ca/contactus/faq_e.html):
"final": Historical data from HYDAT or web service that has been approved by ECCC.
"provisional": Real-time data from the web service representing the best available measurements, but subject to revision and not yet approved by ECCC.
A tibble with class available combining final and provisional data
with an additional Approval column indicating whether each record is
"final" or "provisional". The object includes attributes for tracking data
sources and query metadata.
Other available functions:
available_levels()
## Not run: ## Basic usage - get all available data flows <- available_flows("08MF005") ## Multiple stations flows <- available_flows(c("08MF005", "08NM116")) ## Get only recent data (last 2 years) recent_flows <- available_flows( "08MF005", start_date = Sys.Date() - lubridate::years(2), end_date = Sys.Date() ) ## Force use of web service (when HYDAT not available) flows_ws <- available_flows("08MF005", hydat_path = FALSE) ## End(Not run)## Not run: ## Basic usage - get all available data flows <- available_flows("08MF005") ## Multiple stations flows <- available_flows(c("08MF005", "08NM116")) ## Get only recent data (last 2 years) recent_flows <- available_flows( "08MF005", start_date = Sys.Date() - lubridate::years(2), end_date = Sys.Date() ) ## Force use of web service (when HYDAT not available) flows_ws <- available_flows("08MF005", hydat_path = FALSE) ## End(Not run)
Convenience function that combines final historical data (from HYDAT or web service) with provisional real-time data in a single call.
available_levels( station_number, start_date = NULL, end_date = Sys.Date(), hydat_path = NULL, prov_terr_state_loc = NULL )available_levels( station_number, start_date = NULL, end_date = Sys.Date(), hydat_path = 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 |
start_date |
Start date for data retrieval in YYYY-MM-DD format. Defaults to NULL (retrieves all available historical data). |
end_date |
End date for data retrieval in YYYY-MM-DD format. Defaults to current date (Sys.Date()). |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Value is "Level"
Value: Level value. The units are metres.
Symbol: Measurement/river conditions
Approval: Approval status: "final" (approved) or "provisional" (subject to revision)
This function combines data from final and provisional data sources to provide a complete water level record.
Historical (Final) Data:
The function automatically determines the best source for historical data:
hydat_path provided (path to database): Uses local HYDAT database at that path
hydat_path = FALSE: Forces use of web service (useful when HYDAT unavailable)
hydat_path = NULL (default): Uses HYDAT default location, automatically falls back
to web service if HYDAT is unavailable
Real-time (Provisional) Data:
Provisional data is retrieved from ECCC's real-time web service using the
realtime_ws() function. This data covers approximately the last 18 months
and is updated regularly. Since real-time data is collected at sub-daily
intervals, values are aggregated to daily means to match the daily format
of HYDAT data. For non-aggregated real-time data, use realtime_ws() directly.
The Approval column uses ECCC's terminology
(see https://wateroffice.ec.gc.ca/contactus/faq_e.html):
"final": Historical data from HYDAT or web service that has been approved by ECCC.
"provisional": Real-time data from the web service representing the best available measurements, but subject to revision and not yet approved by ECCC.
A tibble with class available combining final and provisional data
with an additional Approval column indicating whether each record is
"final" or "provisional". The object includes attributes for tracking data
sources and query metadata.
Other available functions:
available_flows()
## Not run: ## Basic usage - get all available data levels <- available_levels("08MF005") ## Multiple stations levels <- available_levels(c("08MF005", "08NM116")) ## Get only recent data (last 2 years) recent_levels <- available_levels( "08MF005", start_date = Sys.Date() - lubridate::years(2), end_date = Sys.Date() ) ## Force use of web service (when HYDAT not available) levels_ws <- available_levels("08MF005", hydat_path = FALSE) ## End(Not run)## Not run: ## Basic usage - get all available data levels <- available_levels("08MF005") ## Multiple stations levels <- available_levels(c("08MF005", "08NM116")) ## Get only recent data (last 2 years) recent_levels <- available_levels( "08MF005", start_date = Sys.Date() - lubridate::years(2), end_date = Sys.Date() ) ## Force use of web service (when HYDAT not available) levels_ws <- available_levels("08MF005", hydat_path = FALSE) ## End(Not run)
Download the HYDAT sqlite database. This database contains all the historical hydrometric data for Canada's integrated hydrometric network. The function will check for a existing sqlite file and won't download the file if the same version is already present.
download_hydat(dl_hydat_here = NULL, ask = TRUE)download_hydat(dl_hydat_here = NULL, ask = TRUE)
dl_hydat_here |
Directory to the HYDAT database. The path is chosen by the |
ask |
Whether to ask (as |
## Not run: download_hydat() ## End(Not run)## Not run: download_hydat() ## End(Not run)
AGENCY look-up Table
hy_agency_list(hydat_path = NULL)hy_agency_list(hydat_path = NULL)
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
A tibble of agencies
HYDAT
Other HYDAT functions:
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_agency_list() ## End(Not run)## Not run: hy_agency_list() ## End(Not run)
Provides wrapper to turn the ANNUAL_INSTANT_PEAKS table in HYDAT into a tidy data frame of instantaneous flows and water levels.
station_number and prov_terr_state_loc can both be supplied.
hy_annual_instant_peaks( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_year = NULL, end_year = NULL )hy_annual_instant_peaks( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_year = NULL, end_year = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_year |
First year of the returned record |
end_year |
Last year of the returned record |
A tibble of hy_annual_instant_peaks.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: ## Multiple stations province not specified hy_annual_instant_peaks(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_annual_instant_peaks(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)## Not run: ## Multiple stations province not specified hy_annual_instant_peaks(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_annual_instant_peaks(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)
Provides wrapper to turn the ANNUAL_STATISTICS table in HYDAT into a tidy data frame of annual statistics. Statistics provided include MEAN, MAX and MIN on an annual basis.
hy_annual_stats( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_year = "ALL", end_year = "ALL" )hy_annual_stats( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_year = "ALL", end_year = "ALL" )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_year |
First year of the returned record |
end_year |
Last year of the returned record |
A tibble with 8 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Parameter: Parameter being measured. Only possible values are FLOW and LEVEL
Year: Year of record.
Sum_stat: Summary statistic being used.
Value: Value of the measurement. If Parameter equals FLOW the units are m^3/s. If Parameter equals LEVEL the units are metres.
Date: Observation date. Formatted as a Date class. MEAN is a annual summary and therefore has an NA value for Date.
Symbol: Measurement/river conditions
A tibble of hy_annual_stats.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: ## Multiple stations province not specified hy_annual_stats(station_number = c("08NM083", "05AE027")) ## Multiple province, station number not specified hy_annual_stats(prov_terr_state_loc = c("AB", "SK")) ## End(Not run)## Not run: ## Multiple stations province not specified hy_annual_stats(station_number = c("08NM083", "05AE027")) ## Multiple province, station number not specified hy_annual_stats(prov_terr_state_loc = c("AB", "SK")) ## End(Not run)
A thin wrapper around hy_daily_flows and 'hy_daily_levels“ that returns a data frames that
contains both parameters. All arguments are passed directly to these functions.
hy_daily( station_number = NULL, prov_terr_state_loc = NULL, hydat_path = NULL, ... )hy_daily( station_number = NULL, prov_terr_state_loc = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
... |
See |
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured.
Value: Discharge value. The units are m^3/s.
Symbol: Measurement/river conditions
A tibble of daily flows and levels
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_daily(station_number = c("02JE013", "08MF005")) ## End(Not run)## Not run: hy_daily(station_number = c("02JE013", "08MF005")) ## End(Not run)
Provides wrapper to turn the DLY_FLOWS table in HYDAT (or historical web service)
into a tidy data frame of daily flows. station_number and prov_terr_state_loc can both be
supplied. If both are omitted all values from the hy_stations table are returned.
That is a large tibble for hy_daily_flows.
hy_daily_flows( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )hy_daily_flows( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
symbol_output |
Set whether the raw code, or the |
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Only possible value is Flow
Value: Discharge value. The units are m^3/s.
Symbol: Measurement/river conditions
The hydat_path argument controls the data source:
NULL (default): Uses local HYDAT database (default location)
FALSE: Forces use of historical web service (requires start_date and end_date)
Path string: Uses HYDAT database at the specified path
A tibble of daily flows
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: # download_hydat() hy_daily_flows( station_number = c("08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_daily_flows(prov_terr_state_loc = "PE") ## End(Not run)## Not run: # download_hydat() hy_daily_flows( station_number = c("08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_daily_flows(prov_terr_state_loc = "PE") ## End(Not run)
Provides wrapper to turn the DLY_LEVELS table in HYDAT (or historical web service)
into a tidy data frame. The primary value returned by this function is water level.
station_number and prov_terr_state_loc can both be supplied. If both are omitted all
values from the hy_stations table are returned. That is a large vector for hy_daily_levels.
hy_daily_levels( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )hy_daily_levels( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
symbol_output |
Set whether the raw code, or the |
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Only possible value is Level
Value: Level value. The units are metres.
Symbol: Measurement/river conditions
The hydat_path argument controls the data source:
NULL (default): Uses local HYDAT database (default location)
FALSE: Forces use of historical web service (requires start_date and end_date)
Path string: Uses HYDAT database at the specified path
A tibble of daily levels
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_daily_levels( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_daily_levels(prov_terr_state_loc = "PE") ## End(Not run)## Not run: hy_daily_levels( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_daily_levels(prov_terr_state_loc = "PE") ## End(Not run)
A look table for data symbols
hy_data_symbolshy_data_symbols
A tibble with 5 rows and 3 variables:
SYMBOL_ID: Symbol code
SYMBOL_EN: Description of Symbol (English)
SYMBOL_FR: Description of Symbol (French)
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
A look table for data types
hy_data_typeshy_data_types
A tibble with 5 rows and 3 variables:
DATA_TYPE: Data type code
DATA_TYPE_EN: Descriptive data type (English)
DATA_TYPE_FR: Descriptive data type (French)
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
DATUM look-up Table
hy_datum_list(hydat_path = NULL)hy_datum_list(hydat_path = NULL)
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
A tibble of DATUMS
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_datum_list() ## End(Not run)## Not run: hy_datum_list() ## End(Not run)
Provides the download location for download_hydat in an OS independent manner.
hy_dir(...)hy_dir(...)
... |
arguments potentially passed to |
## Not run: hy_dir() ## End(Not run)## Not run: hy_dir() ## End(Not run)
Tidy data of monthly flows information from the monthly_flows HYDAT table. station_number and
prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations table are returned.
That is a large vector for hy_monthly_flows.
hy_monthly_flows( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_monthly_flows( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 8 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Year: Year of record.
Month: Numeric month value
Full_Month: Logical value is there is full record from Month
No_days: Number of days in that month
Sum_stat: Summary statistic being used.
Value: Value of the measurement in m^3/s.
Date_occurred: Observation date. Formatted as a Date class. MEAN is a annual summary and therefore has an NA value for Date.
A tibble of monthly flows.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_monthly_flows( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_monthly_flows(prov_terr_state_loc = "PE") ## End(Not run)## Not run: hy_monthly_flows( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_monthly_flows(prov_terr_state_loc = "PE") ## End(Not run)
Tidy data of monthly river or lake levels information from the DLY_LEVELS HYDAT table. station_number and
prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations table are returned.
That is a large vector for hy_monthly_levels.
hy_monthly_levels( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_monthly_levels( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 8 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Year: Year of record.
Month: Numeric month value
Full_month: Logical value is there is full record from Month
No_days: Number of days in that month
Sum_stat: Summary statistic being used.
Value: Value of the measurement in metres.
Date_occurred: Observation date. Formatted as a Date class. MEAN is a annual summary and therefore has an NA value for Date.
A tibble of monthly levels.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_monthly_levels( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_monthly_levels(prov_terr_state_loc = "PE") ## End(Not run)## Not run: hy_monthly_levels( station_number = c("02JE013", "08MF005"), start_date = "1996-01-01", end_date = "2000-01-01" ) hy_monthly_levels(prov_terr_state_loc = "PE") ## End(Not run)
This is an easy way to visualize a single station using base R graphics.
More complicated plotting needs should consider using ggplot2. Inputting more
5 stations will result in very busy plots and longer load time. Legend position will
sometimes overlap plotted points.
hy_plot( station_number = NULL, Parameter = c("Flow", "Level", "Suscon", "Load") )hy_plot( station_number = NULL, Parameter = c("Flow", "Level", "Suscon", "Load") )
station_number |
A (or several) seven digit Water Survey of Canada station number. |
Parameter |
Parameter of interest. Either "Flow" or "Level". |
OFFICE look-up Table
hy_reg_office_list(hydat_path = NULL)hy_reg_office_list(hydat_path = NULL)
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
A tibble of offices
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_reg_office_list() ## End(Not run)## Not run: hy_reg_office_list() ## End(Not run)
Retrieve the date of the HYDAT version available for download.
hy_remote()hy_remote()
Provides wrapper to turn the SED_DLY_LOADS table in HYDAT into a tidy data frame of daily sediment load information.
station_number and prov_terr_state_loc can both be supplied. If both are omitted all values from the
hy_stations table are returned. That is a large vector for hy_sed_daily_loads.
hy_sed_daily_loads( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_sed_daily_loads( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 4 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Only possible value is Load
Value: Discharge value. The units are tonnes.
A tibble of daily suspended sediment loads
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_daily_loads(prov_terr_state_loc = "PE") ## End(Not run)## Not run: hy_sed_daily_loads(prov_terr_state_loc = "PE") ## End(Not run)
Provides wrapper to turn the SED_DLY_SUSCON table in HYDAT into a tidy data frame of daily suspended sediment concentration information.
station_number and prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations
table are returned. That is a large vector for hy_sed_daily_suscon.
hy_sed_daily_suscon( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )hy_sed_daily_suscon( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL, symbol_output = "code" )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
symbol_output |
Set whether the raw code, or the |
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Date: Observation date. Formatted as a Date class.
Parameter: Parameter being measured. Only possible value is Suscon
Value: Discharge value. The units are mg/l.
Symbol: Measurement/river conditions
A tibble of daily suspended sediment concentration
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_daily_suscon(station_number = "01CE003") ## End(Not run)## Not run: hy_sed_daily_suscon(station_number = "01CE003") ## End(Not run)
Tidy data of monthly loads information from the SED_DLY_LOADS HYDAT table. station_number and
prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations table are returned.
That is a large vector for hy_sed_monthly_loads.
hy_sed_monthly_loads( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_sed_monthly_loads( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 8 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Year: Year of record.
Month: Numeric month value
Full_Month: Logical value is there is full record from Month
No_days: Number of days in that month
Sum_stat: Summary statistic being used.
Value: Value of the measurement in tonnes.
Date_occurred: Observation date. Formatted as a Date class. MEAN is a annual summary and therefore has an NA value for Date.
A tibble of monthly sediment loads.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_monthly_loads(station_number = "01CE003") ## End(Not run)## Not run: hy_sed_monthly_loads(station_number = "01CE003") ## End(Not run)
Tidy data of monthly suspended sediment concentration information from the SED_DLY_SUSCON HYDAT table. station_number and
prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations table are returned.
That is a large vector for hy_sed_monthly_suscon.
hy_sed_monthly_suscon( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_sed_monthly_suscon( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 8 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
Year: Year of record.
Month: Numeric month value
Full_Month: Logical value is there is full record from Month
No_days: Number of days in that month
Sum_stat: Summary statistic being used.
Value: Value of the measurement in mg/l.
Date_occurred: Observation date. Formatted as a Date class. MEAN is a annual summary and therefore has an NA value for Date.
A tibble of monthly suspended sediment concentrations.
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_monthly_suscon(station_number = "08MF005") ## End(Not run)## Not run: hy_sed_monthly_suscon(station_number = "08MF005") ## End(Not run)
Provides wrapper to turn the hy_sed_samples table in HYDAT into a tidy data frame of instantaneous sediment sample information.
station_number and prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations
table are returned. That is a large vector for hy_sed_samples.
hy_sed_samples( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_sed_samples( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 19 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
SED_DATA_TYPE: Contains the type of sampling method used in collecting sediment for a station
Date: Contains the time to the nearest minute of when the sample was taken
SAMPLE_REMARK_CODE: Descriptive Sediment Sample Remark in English
TIME_SYMBOL: An "E" symbol means the time is an estimate only
FLOW: Contains the instantaneous discharge in cubic metres per second at the time the sample was taken
SYMBOL_EN: Indicates a condition where the daily mean has a larger than expected error
SAMPLER_TYPE: Contains the type of measurement device used to take the sample
SAMPLING_VERTICAL_LOCATION: The location on the cross-section of the river at which the single sediment samples are collected. If one of the standard locations is not used the distance in meters will be shown
SAMPLING_VERTICAL_EN: Indicates sample location relative to the regular measurement cross-section or the regular sampling site
TEMPERATURE: Contains the instantaneous water temperature in Celsius at the time the sample was taken
CONCENTRATION_EN: Contains the instantaneous concentration sampled in milligrams per litre
SV_DEPTH2: Depth 2 for split vertical depth integrating (m)
A tibble of instantaneous sediment samples data
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_samples(station_number = "01CA004") ## End(Not run)## Not run: hy_sed_samples(station_number = "01CA004") ## End(Not run)
Provides wrapper to turn the hy_sed_samples_psd table in HYDAT into a tidy data frame of instantaneous sediment sample
particle size distribution. station_number and prov_terr_state_loc can both be supplied. If both
are omitted all values from the hy_stations() table are returned. That is a large vector for hy_sed_samples_psd.
hy_sed_samples_psd( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )hy_sed_samples_psd( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL, start_date = NULL, end_date = NULL )
station_number |
A seven digit Water Survey of Canada station number. If this argument is omitted, the value of |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
start_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
end_date |
Leave blank if all dates are required. Date format needs to be in YYYY-MM-DD. Date is inclusive. |
A tibble with 5 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
SED_DATA_TYPE: Contains the type of sampling method used in collecting sediment for a station
Date: Contains the time to the nearest minute of when the sample was taken
PARTICLE_SIZE: Particle size (mm)
PERCENT: Contains the percentage values for indicated particle sizes for samples collected
A tibble of sediment sample particle size data
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_sed_samples_psd(station_number = "01CA004") ## End(Not run)## Not run: hy_sed_samples_psd(station_number = "01CA004") ## End(Not run)
For many reasons, it may be convenient to set the default database location to somewhere other than the global default. Users may wish to use a previously downloaded version of the database for reproducibility purposes, store hydat somewhere other than hy_dir().
hy_set_default_db(hydat_path = NULL)hy_set_default_db(hydat_path = NULL)
hydat_path |
The path to the a HYDAT sqlite3 database file (e.g., hy_test_db) |
returns the previous value of hy_default_db.
## Not run: # set default to the test database hy_set_default_db(hy_test_db()) # get the default value hy_default_db() # set back to the default db location hy_set_default_db(NULL) ## End(Not run)## Not run: # set default to the test database hy_set_default_db(hy_test_db()) # get the default value hy_default_db() # set back to the default db location hy_set_default_db(NULL) ## End(Not run)
This function gives low-level access to the underlying HYDAT database used by
other functions. Many of these tables are too large to load into memory,
so it is best to use dplyr to dplyr::filter() them before using
dplyr::collect() to read them into memory.
hy_src(hydat_path = NULL) hy_src_disconnect(src)hy_src(hydat_path = NULL) hy_src_disconnect(src)
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
src |
A as returned by |
A SQLite DBIConnection
## Not run: library(dplyr) # src is a src_sqlite src <- hy_src(hydat_path = hy_test_db()) src_tbls(src) # to get a table, use dplyr::tbl() tbl(src, "STATIONS") # one you're sure the results are what you want # get a data.frame using collect() tbl(src, "STATIONS") |> filter(PROV_TERR_STATE_LOC == "BC") |> collect() # close the connection to the database hy_src_disconnect(src) ## End(Not run)## Not run: library(dplyr) # src is a src_sqlite src <- hy_src(hydat_path = hy_test_db()) src_tbls(src) # to get a table, use dplyr::tbl() tbl(src, "STATIONS") # one you're sure the results are what you want # get a data.frame using collect() tbl(src, "STATIONS") |> filter(PROV_TERR_STATE_LOC == "BC") |> collect() # close the connection to the database hy_src_disconnect(src) ## End(Not run)
Provides wrapper to turn the hy_stations table in HYDAT into a tidy data frame of station information. station_number and
prov_terr_state_loc can both be supplied. If both are omitted all values from the hy_stations table are returned. This
is the entry point for most analyses is tidyhydat as establish the stations for consideration is likely the first step in many
instances.
hy_stations( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stations( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 15 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
STATION_NAME: Official name for station identification
PROV_TERR_STATE_LOC: The province, territory or state in which the station is located
REGIONAL_OFFICE_ID: The identifier of the regional office responsible for the station. Links to hy_reg_office_list
HYD_STATUS: Current status of discharge or level monitoring in the hydrometric network
SED_STATUS: Current status of sediment monitoring in the hydrometric network
LATITUDE: North-South Coordinates of the gauging station in decimal degrees
LONGITUDE: East-West Coordinates of the gauging station in decimal degrees
DRAINAGE_AREA_GROSS: The total surface area that drains to the gauge site (km^2)
DRAINAGE_AREA_EFFECT: The portion of the drainage basin that contributes runoff to the gauge site, calculated by subtracting any noncontributing portion from the gross drainage area (km^2)
RHBN: Logical. Reference Hydrometric Basin Network station. The Reference Hydrometric Basin Network (RHBN) is a sub-set of the national network that has been identified for use in the detection, monitoring, and assessment of climate change.
REAL_TIME: Logical. Indicates if a station has the capacity to deliver data in real-time or near real-time
CONTRIBUTOR_ID: Unique ID of an agency that contributes data to the HYDAT database. The agency is non-WSC and non WSC funded
OPERATOR_ID: Unique ID of an agency that operates a hydrometric station
DATUM_ID: Unique ID for a datum
A tibble of stations and associated metadata
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: ## Multiple stations province not specified hy_stations(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_stations(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)## Not run: ## Multiple stations province not specified hy_stations(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_stations(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)
hy_stn_data_coll look-up Table
hy_stn_data_coll( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_data_coll( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
DATA_TYPE: The type of data
Year_from: First year of use
Year_to: Last year of use
MEASUREMENT: The sampling method used in the collection of sediment data or the type of the gauge used in the collection of the hydrometric data
OPERATION: The schedule of station operation for the collection of sediment or hydrometric data
A tibble of hy_stn_data_coll
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_stn_data_coll(station_number = c("02JE013", "08MF005")) ## End(Not run)## Not run: hy_stn_data_coll(station_number = c("02JE013", "08MF005")) ## End(Not run)
hy_stn_data_range look-up Table
hy_stn_data_range( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_data_range( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
DATA_TYPE: Code for the type of data
SED_DATA_TYPE: Code for the type of instantaneous sediment data
Year_from: First year of use
Year_to: Last year of use
RECORD_LENGTH: Number of years of data available in the HYDAT database
A tibble of hy_stn_data_range
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_op_schedule(),
hy_stn_regulation(),
hy_version()
## Not run: hy_stn_data_range(station_number = c("02JE013", "08MF005")) ## End(Not run)## Not run: hy_stn_data_range(station_number = c("02JE013", "08MF005")) ## End(Not run)
hy_stn_datum_conv look-up Table
hy_stn_datum_conv( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_datum_conv( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 4 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
DATUM_FROM: Identifying a datum from which water level is being converted
DATUM_TO: Identifying a datum to which water level is being converted
CONVERSTION_FACTOR: The conversion factor applied to water levels referred to one datum to obtain water levels referred to another datum
A tibble of hy_stn_datum_conv
## Not run: hy_stn_datum_conv(station_number = c("02JE013", "08MF005")) ## End(Not run)## Not run: hy_stn_datum_conv(station_number = c("02JE013", "08MF005")) ## End(Not run)
hy_stn_op_schedule look-up Table
hy_stn_op_schedule( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_op_schedule( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
DATA_TYPE: The type of data
Year: Year of operation schedule
Month_from: First month of use
Month_to: Last month of use
A tibble of hy_stn_op_schedule
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_regulation(),
hy_version()
## Not run: hy_stn_op_schedule(station_number = c("02JE013")) ## End(Not run)## Not run: hy_stn_op_schedule(station_number = c("02JE013")) ## End(Not run)
Provides wrapper to turn the hy_stn_regulation table in HYDAT into a tidy data frame of station regulation.
station_number and prov_terr_state_loc can both be supplied. If both are omitted all values
from the hy_stations table are returned.
hy_stn_regulation( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_regulation( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 4 variables:
Unique 7 digit Water Survey of Canada station number
First year of use
Last year of use
logical
A tibble of stations, years of regulation and the regulation status
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_version()
## Not run: ## Multiple stations province not specified hy_stn_regulation(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_stn_regulation(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)## Not run: ## Multiple stations province not specified hy_stn_regulation(station_number = c("08NM083", "08NE102")) ## Multiple province, station number not specified hy_stn_regulation(prov_terr_state_loc = c("AB", "YT")) ## End(Not run)
hy_stn_remarks look-up Table
hy_stn_remarks( station_number = NULL, hydat_path = NULL, prov_terr_state_loc = NULL )hy_stn_remarks( station_number = NULL, hydat_path = 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 |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 4 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
REMARK_TYPE: Type of Remark
Year: Year of the remark
REMARK: Remark
A tibble of hy_stn_remarks
## Not run: hy_stn_remarks(station_number = c("02JE013", "08MF005")) ## End(Not run)## Not run: hy_stn_remarks(station_number = c("02JE013", "08MF005")) ## End(Not run)
The full HYDAT database needs to be downloaded from download_hydat, but for testing
purposes, a small test database is included in this package. Use
hydat_path = hy_test_db() in hy_* functions to explicitly use the test database;
use hydat_path = hy_downloaded_db() to explicitly use the full, most recent
downloaded database (this is also the path returned by hy_default_db()).
hy_test_db() hy_downloaded_db() hy_default_db()hy_test_db() hy_downloaded_db() hy_default_db()
The file location of a HYDAT database.
## Not run: hy_test_db() hy_downloaded_db() hy_default_db() ## End(Not run)## Not run: hy_test_db() hy_downloaded_db() hy_default_db() ## End(Not run)
A function to get version number of hydat
hy_version(hydat_path = NULL)hy_version(hydat_path = NULL)
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
version number and release date
HYDAT
Other HYDAT functions:
hy_agency_list(),
hy_annual_instant_peaks(),
hy_annual_stats(),
hy_daily(),
hy_daily_flows(),
hy_daily_levels(),
hy_data_symbols,
hy_data_types,
hy_datum_list(),
hy_monthly_flows(),
hy_monthly_levels(),
hy_reg_office_list(),
hy_sed_daily_loads(),
hy_sed_daily_suscon(),
hy_sed_monthly_loads(),
hy_sed_monthly_suscon(),
hy_sed_samples(),
hy_sed_samples_psd(),
hy_stations(),
hy_stn_data_coll(),
hy_stn_data_range(),
hy_stn_op_schedule(),
hy_stn_regulation()
## Not run: hy_version() ## End(Not run)## Not run: hy_version() ## End(Not run)
A tibble of parameter id codes and their corresponding explanation/description specific to the ECCC webservice
param_idparam_id
A tibble with 8 rows and 7 variables:
Parameter: Numeric parameter code
Code: Letter parameter code
Name_En: Code name in English
Name_En: Code name in French
Unit: Parameter units
This method plots combined final and provisional data, visually distinguishing between validated (final) and provisional records.
This method plots either daily time series data from HYDAT or realtime data from the datamart. These plots are intended to be convenient and quick methods to visualize hydrometric data.
## S3 method for class 'available' plot(x = NULL, ...) ## S3 method for class 'hy' plot(x = NULL, ...) ## S3 method for class 'realtime' plot(x = NULL, Parameter = c("Flow", "Level"), ...)## S3 method for class 'available' plot(x = NULL, ...) ## S3 method for class 'hy' plot(x = NULL, ...) ## S3 method for class 'realtime' plot(x = NULL, Parameter = c("Flow", "Level"), ...)
x |
Object created by either a hy_daily_* or realtime_dd data retrieval function |
... |
passed to |
Parameter |
Parameter of interest. Either "Flow" or "Level". Defaults to "Flow". |
plot(realtime): plot.realtime
## Not run: # One station flows <- available_flows("08MF005") plot(flows) ## End(Not run) ## Not run: # One station fraser <- hy_daily_flows("08MF005") plot(fraser) ## End(Not run) ## Not run: # One station fraser_realtime <- realtime_dd("08MF005") plot(fraser_realtime) ## End(Not run)## Not run: # One station flows <- available_flows("08MF005") plot(flows) ## End(Not run) ## Not run: # One station fraser <- hy_daily_flows("08MF005") plot(fraser) ## End(Not run) ## Not run: # One station fraser_realtime <- realtime_dd("08MF005") plot(fraser_realtime) ## End(Not run)
This function mimics dplyr::pull to avoid having to always type
dplyr::pull(STATION_NUMBER). Instead we can now take advantage of autocomplete.
This can be used with realtime_ and hy_ functions.
pull_station_number(.data)pull_station_number(.data)
.data |
A table of data |
A vector of station_numbers
## Not run: hy_stations(prov_terr_state_loc = "PE") |> pull_station_number() |> hy_annual_instant_peaks() ## End(Not run)## Not run: hy_stations(prov_terr_state_loc = "PE") |> pull_station_number() |> hy_annual_instant_peaks() ## End(Not run)
Adds local_datetime and tz_used columns based on either the most common timezone in the original data or
a user supplied timezone. This function is meant to used in a pipe with the realtime_dd() function.
realtime_add_local_datetime(.data, set_tz = NULL)realtime_add_local_datetime(.data, set_tz = NULL)
.data |
Tibble created by |
set_tz |
A timezone string in the format of |
Date from realtime_dd is supplied in UTC which is the easiest format to work with across timezones. This function
does not change Date from UTC. Rather station_tz specifies the local timezone name and is useful in instances where
realtime_add_local_datetime adjusts local_datetime to a common timezone that is not the station_tz. This function is most
useful when all stations exist within the same timezone.
## Not run: realtime_dd(c("08MF005", "02LA004")) |> realtime_add_local_datetime() ## End(Not run)## Not run: realtime_dd(c("08MF005", "02LA004")) |> realtime_add_local_datetime() ## End(Not run)
This function is meant to be used within a pipe as a means of easily moving from higher resolution data to daily means.
realtime_daily_mean(.data, na.rm = FALSE)realtime_daily_mean(.data, na.rm = FALSE)
.data |
A data argument that is designed to take only the output of realtime_dd |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
## Not run: realtime_dd("08MF005") |> realtime_daily_mean() ## End(Not run)## Not run: realtime_dd("08MF005") |> realtime_daily_mean() ## End(Not run)
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)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:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
PROV_TERR_STATE_LOC: The province, territory or state in which the station is located
Date: Observation date and time for last thirty days. Formatted as a POSIXct class in UTC for consistency.
Parameter: Parameter being measured. Only possible values are Flow and Level
Value: Value of the measurement. If Parameter equals Flow the units are m^3/s. If Parameter equals Level the units are metres.
Grade: reserved for future use
Symbol: reserved for future use
Code: quality assurance/quality control flag for the discharge
station_tz: 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)## 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)
This is an easy way to visualize a single station using base R graphics.
More complicated plotting needs should consider using ggplot2. Inputting more
5 stations will result in very busy plots and longer load time. Legend position will
sometimes overlap plotted points.
realtime_plot(station_number = NULL, Parameter = c("Flow", "Level"))realtime_plot(station_number = NULL, Parameter = c("Flow", "Level"))
station_number |
A seven digit Water Survey of Canada station number. Can only be one value. |
Parameter |
Parameter of interest. Either "Flow" or "Level". Defaults to "Flow". |
A plot of recent realtime values
## Not run: ## One station realtime_plot("08MF005") ## Multiple stations realtime_plot(c("07EC002", "01AD003")) ## End(Not run)## Not run: ## One station realtime_plot("08MF005") ## Multiple stations realtime_plot(c("07EC002", "01AD003")) ## End(Not run)
An up to date dataframe of all stations in the Realtime Water Survey of Canada hydrometric network operated by Environment and Climate Change Canada
realtime_stations(prov_terr_state_loc = NULL)realtime_stations(prov_terr_state_loc = NULL)
prov_terr_state_loc |
Province, state or territory. If this argument is omitted, the value of |
A tibble with 6 variables:
STATION_NUMBER: Unique 7 digit Water Survey of Canada station number
STATION_NAME: Official name for station identification
LATITUDE: North-South Coordinates of the gauging station in decimal degrees
LONGITUDE: East-West Coordinates of the gauging station in decimal degrees
PROV_TERR_STATE_LOC: The province, territory or state in which the station is located
TIMEZONE: Timezone of the station
Other realtime functions:
realtime_dd(),
realtime_ws()
## Not run: ## Available inputs for prov_terr_state_loc argument: unique(realtime_stations()$prov_terr_state_loc) realtime_stations(prov_terr_state_loc = "BC") realtime_stations(prov_terr_state_loc = c("QC", "PE")) ## End(Not run)## Not run: ## Available inputs for prov_terr_state_loc argument: unique(realtime_stations()$prov_terr_state_loc) realtime_stations(prov_terr_state_loc = "BC") realtime_stations(prov_terr_state_loc = c("QC", "PE")) ## End(Not run)
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.
realtime_ws( station_number, parameters = NULL, start_date = Sys.Date() - lubridate::days(30), end_date = Sys.Date() )realtime_ws( station_number, parameters = NULL, start_date = Sys.Date() - lubridate::days(30), end_date = Sys.Date() )
station_number |
Water Survey of Canada station number. |
parameters |
parameter ID. Can take multiple entries. Parameter is a numeric code. See |
start_date |
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. |
end_date |
Accepts either YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. If only 'end_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. |
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.
Name_En: Code name in English
Value: Value of the measurement.
Unit: Value units
Grade: future use
Symbol: future use
Approval: future use
Parameter: Numeric parameter code
Code: Letter parameter code
Other realtime functions:
realtime_dd(),
realtime_stations()
## Not run: ws_08 <- realtime_ws( station_number = c("08NL071", "08NM174"), parameters = c(47, 5) ) fivedays <- realtime_ws( station_number = c("08NL071", "08NM174"), parameters = c(47, 5), end_date = Sys.Date(), # today start_date = Sys.Date() - lubridate::days(5) # five days ago ) ## End(Not run)## Not run: ws_08 <- realtime_ws( station_number = c("08NL071", "08NM174"), parameters = c(47, 5) ) fivedays <- realtime_ws( station_number = c("08NL071", "08NM174"), parameters = c(47, 5), end_date = Sys.Date(), # today start_date = Sys.Date() - lubridate::days(5) # five days ago ) ## End(Not run)
Use this search function when you only know the partial station name or want to search.
search_stn_name(search_term, hydat_path = NULL) search_stn_number(search_term, hydat_path = NULL)search_stn_name(search_term, hydat_path = NULL) search_stn_number(search_term, hydat_path = NULL)
search_term |
Only accepts one word. |
hydat_path |
The path to the hydat database or NULL to use the default location
used by download_hydat. It is also possible to pass in an existing
database connection from |
A tibble of stations that match the search_term
## Not run: search_stn_name("Cowichan") search_stn_number("08HF") ## End(Not run)## Not run: search_stn_name("Cowichan") search_stn_number("08HF") ## End(Not run)
Returns a tibble with date ranges and record counts for each station, broken down by approval status (final vs provisional).
## S3 method for class 'available' summary(object, ...)## S3 method for class 'available' summary(object, ...)
object |
Object created by |
... |
ignored |
A tibble with columns:
STATION_NUMBER
final_start, final_end - date range for validated data
provisional_start, provisional_end - date range for provisional data
final_n, provisional_n - record counts
## Not run: flows <- available_flows(c("08MF005", "08MF010")) summary(flows) ## End(Not run)## Not run: flows <- available_flows(c("08MF005", "08MF010")) summary(flows) ## End(Not run)