Skip to content
Snippets Groups Projects
readNWISpeak.Rd 1.71 KiB
Newer Older
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{readNWISpeak}
\alias{readNWISpeak}
\title{Reads peak flow data from NWISweb.}
\usage{
Laura A DeCicco's avatar
Laura A DeCicco committed
readNWISpeak(siteNumber, startDate = "", endDate = "")
\item{siteNumber}{character USGS site number.  This is usually an 8 digit number}
\item{startDate}{character starting date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates
retrieval for the earliest possible record.}
\item{endDate}{character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates
retrieval for the latest possible record.}
}
\value{
A data frame with the following columns:
\tabular{lll}{
Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr
Laura A DeCicco's avatar
Laura A DeCicco committed
dateTime \tab POSIXct \tab The date and time of the value converted to UTC (if asDateTime = TRUE), \cr
\tab character \tab or raw character string (if asDateTime = FALSE) \cr
Laura A DeCicco's avatar
Laura A DeCicco committed
tz_cd \tab character \tab The time zone code for dateTime \cr
code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr
}

There are also several useful attributes attached to the data frame:
\tabular{lll}{
Name \tab Type \tab Description \cr
url \tab character \tab The url used to generate the data \cr
queryTime \tab POSIXct \tab The time the data was returned \cr
comment \tab character \tab Header comments from the RDB file \cr
Laura A DeCicco's avatar
Laura A DeCicco committed
siteInfo \tab data.frame \tab A data frame containing information on the requested sites \cr
}
\description{
Reads peak flow data from NWISweb.
}
\examples{
siteNumber <- '01594440'
Laura A DeCicco's avatar
Laura A DeCicco committed
data <- readNWISpeak(siteNumber)