RealTimeData: Gets current available data for hydrometric station

Description Usage Arguments Value Note See Also Examples

View source: R/Real_Time_Data.r

Description

Gets near real-time (within 6 hours) hydrometric data for the past 30 days for a particular hydrometric station operated by the National Hydrological Service of Canada, Water Survey Division.

Usage

1
2
RealTimeData(base_url = "http://dd.weather.gc.ca/hydrometric", prov_terr_loc,
  station_number)

Arguments

base_url

Base URL to access the data mart

prov_terr_loc

Two-digit provincial or territorial abbreviation in which the station is located (e.g., "BC")

station_number

A seven-digit station identifier (e.g., "08MF005")

Value

A data frame (station_number, date_time, hg, hg_grade, hg_sym, hg_code, qr, qr_grade, qr_sym, qr_code)

Note

Returned date/times are in Universal Time Coordinated (UTC).

See Also

RealTimeNetwork

Examples

1
2
3
4
5
6
# get realtime data for Fraser River at Hope (08MF005)
data <- RealTimeData(prov_terr_loc="BC", station_number="08MF005")
plot(
  data$date_time, data$qr,
 type="l", col="blue",
  xlab="DateTime [UTC]", ylab="Discharge")

CentreForHydrology/HYDAT documentation built on May 27, 2019, 7:24 a.m.