ch_get_ECDE_metadata: Reads Environment Canada Date Explorer (ECDE) meta data file

View source: R/ch_get_ECDE_metadata.R

ch_get_ECDE_metadataR Documentation

Reads Environment Canada Date Explorer (ECDE) meta data file

Description

Reads the file that is generated from ECDE 'save favourite stations' to capture the ECDE metadata. The dataframe returned contains 20 fields from ECDE.

Usage

ch_get_ECDE_metadata(filename, writefile = NULL)

Arguments

filename

The name of the ECDE file, FavHydatStations.tb0.

writefile

Default is NULL, but if it is a filename e.g. filename.csv then the dataframe is saved to a csv file.

Value

Returns a dataframe consisting of:

Station

StationID

StationName

Station Name

HYDStatus

Active or Discontinued

Prov

Province

Latitude
Longitude
DrainageArea

km^2

Years

Number of years with data

From

Start Year

To

End Year

Reg.

Regulated?

Flow

If TRUE/Yes flow data exists

Level

If TRUE/Yes level data exists

Sed

If TRUE/Yes sediment data exists

OperSched

Operations current - Continuous or Seasonal

RealTime

If TRUE/Yes real time data is available

RHBN

If TRUE/Yes the stations is in the reference hydrologic basin network

Region

Name of regional office operating station

Datum

Elevation datum

Operator

Operator or provider of the data

Author(s)

Paul Whitfield <paul.h.whitfield@gmail.com>

Examples


# Not tested by check() as requires downloaded file
filename <- "FavHydatStations.tb0"
meta0 <- ch_get_ECDE_metadata(filename)
meta1 <- ch_get_ECDE_metadata(filename, writefile="study52_metadata.csv")


CSHS-hydRology/CSHShydRology documentation built on Aug. 18, 2022, 4:44 p.m.