Skip to content
Snippets Groups Projects
getWaterML1Data.Rd 1.29 KiB
Newer Older
% Generated by roxygen2 (4.0.2): do not edit by hand
Laura A DeCicco's avatar
Laura A DeCicco committed
\name{getWaterML1Data}
\alias{getWaterML1Data}
\title{Function to return data from the NWISWeb WaterML1.1 service}
Laura A DeCicco's avatar
Laura A DeCicco committed
\usage{
Laura A DeCicco's avatar
Laura A DeCicco committed
getWaterML1Data(obs_url)
Laura A DeCicco's avatar
Laura A DeCicco committed
}
\arguments{
Laura A DeCicco's avatar
Laura A DeCicco committed
\item{obs_url}{string containing the url for the retrieval}
Laura A DeCicco's avatar
Laura A DeCicco committed
}
\value{
Laura A DeCicco's avatar
Laura A DeCicco committed
mergedDF a data frame containing columns agency, site, dateTime, values, and remark codes for all requested combinations
Laura A DeCicco's avatar
Laura A DeCicco committed
}
\description{
Laura A DeCicco's avatar
Laura A DeCicco committed
This function accepts a url parameter that already contains the desired
NWIS site, parameter code, statistic, startdate and enddate.
Laura A DeCicco's avatar
Laura A DeCicco committed
}
\examples{
siteNumber <- "02177000"
Laura A DeCicco's avatar
Laura A DeCicco committed
startDate <- "2012-09-01"
endDate <- "2012-10-01"
offering <- '00003'
property <- '00060'
obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
Laura A DeCicco's avatar
Laura A DeCicco committed
data <- getWaterML1Data(obs_url)
urlMulti <- constructNWISURL("04085427",c("00060","00010"),
            startDate,endDate,'dv',statCd=c("00003","00001"))
Laura A DeCicco's avatar
Laura A DeCicco committed
multiData <- getWaterML1Data(urlMulti)
goundwaterExampleURL <-
    "http://waterservices.usgs.gov/nwis/gwlevels/?format=waterml&sites=431049071324301&startDT=2013-10-01&endDT=2014-06-30"
Laura A DeCicco's avatar
Laura A DeCicco committed
groundWater <- getWaterML1Data(goundwaterExampleURL)
unitDataURL <- constructNWISURL(siteNumber,property,
         as.character(Sys.Date()),as.character(Sys.Date()),'uv',format='xml')
unitData <- getWaterML1Data(unitDataURL)
Laura A DeCicco's avatar
Laura A DeCicco committed
}