ReadUsgsGage: Read standard-format text data table downloaded from USGS...

Description Usage Arguments Details Value See Also Examples

View source: R/read_observations.R

Description

ReadUsgsGage reads USGS data table (streamflow and/or stage) and puts into a dataframe.

Usage

1
2
ReadUsgsGage(pathGageData, returnMetric = TRUE, returnEnglish = TRUE,
  timeZone = NULL)

Arguments

pathGageData

The full pathname to the streamflow/stage time series text file as downloaded from USGS Water Data. The file should include the standard USGS header info and the data time series with standard USGS columns.

returnMetric

Logical: Return variables in these units (cms and m)?

returnEnglish

Logical: Return variables in english units (cfs and ft)?

timeZone

(OPTIONAL) The time zone for the USGS gage data. Only necessary if tz code is NOT provided in the input file (e.g., daily streamflow gage data files). Time zone name must be R-friendly for your current OS. See: http://stat.ethz.ch/R-manual/R-devel/library/base/html/timezones.html

Details

ReadUsgsGage reads a streamflow or stage time series data table (standard USGS Water Data format) and outputs a dataframe with consistent date and data columns for use with other rwrfhydro tools.

Value

A dataframe containing the USGS flow and/or stage data.

See Also

Other obsDataReads: GetStage4Files, ReadAmerifluxCSVOldFormat, ReadAmerifluxNCOldFormat, ReadCoDwrGage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Take a text file downloaded from the USGS Water Data website for 
## 5-minute flow at Fourmile Creekand create a dataframe called
## "obsStr5min.fc".
## Not run: 
obsStr5min.fc <- 
  ReadUsgsGage("../OBS/STRFLOW/5min_str_06727500_110401_140810.txt")
obsStr5min.fc <- 
  ReadUsgsGage("../OBS/STRFLOW/5min_str_06727500_110401_140810.txt, 
               returnEnglish=FALSE")

## End(Not run)

mccreigh/rwrfhydro documentation built on Feb. 28, 2021, 1:53 p.m.