Newer
Older
% Generated by roxygen2 (4.0.2): do not edit by hand
\title{Function to return data from the NWIS RDB 1.0 format}
\usage{
\item{obs_url}{string containing the url for the retrieval}
\item{asDateTime}{logical, if TRUE returns date and time as POSIXct, if FALSE, Date}
\item{qw}{logical, if TRUE parses as water quality data (where dates/times are in start and end times)}
data a data frame containing columns agency, site, dateTime (converted to UTC), values, and remark codes for all requested combinations
This function accepts a url parameter that already contains the desired
NWIS site, parameter code, statistic, startdate and enddate.
startDate <- "2012-09-01"
endDate <- "2012-10-01"
Laura A DeCicco
committed
offering <- "00003"
property <- "00060"
obs_url <- constructNWISURL(siteNumber,property,
Laura A DeCicco
committed
startDate,endDate,"dv",format="tsv")
urlMulti <- constructNWISURL("04085427",c("00060","00010"),
Laura A DeCicco
committed
startDate,endDate,"dv",statCd=c("00003","00001"),"tsv")
unitDataURL <- constructNWISURL(siteNumber,property,
"2013-11-03","2013-11-03","uv",format="tsv") #includes timezone switch
qwURL <- constructNWISURL(c('04024430','04024000'),
c('34247','30234','32104','34220'),
"2010-11-03","","qw",format="rdb")
qwData <- importRDB1(qwURL, qw=TRUE)
# User file:
filePath <- system.file("extdata", package="dataRetrievaldemo")
fileName <- "RDB1Example.txt"
fullPath <- file.path(filePath, fileName)
importUserRDB <- importRDB1(fullPath)