diff --git a/man/importRDB1.Rd b/man/importRDB1.Rd index 2d2e830eb9021a117c7aedc970a475755a06ba6c..0fcc978834df0b84e337edb8a2cd4f5c5a2b8d2b 100644 --- a/man/importRDB1.Rd +++ b/man/importRDB1.Rd @@ -54,7 +54,7 @@ end <- "2013-11-28" urlIce <- constructNWISURL(iceSite,"00060",start, end,"uv",format="tsv") # User file: -filePath <- system.file("extdata", package="dataRetrievaldemo") +filePath <- system.file("extdata", package="dataRetrieval") fileName <- "RDB1Example.txt" fullPath <- file.path(filePath, fileName) importUserRDB <- importRDB1(fullPath) diff --git a/man/importWaterML1.Rd b/man/importWaterML1.Rd index 3117ef72aaecd590b73fffcdaf9e2531790ad08a..9b80f695ec100c5da4195af618bc82f1c2b5f19f 100644 --- a/man/importWaterML1.Rd +++ b/man/importWaterML1.Rd @@ -30,24 +30,31 @@ offering <- '00003' property <- '00060' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv') data <- importWaterML1(obs_url,TRUE) -urlMulti <- constructNWISURL("04085427",c("00060","00010"), - startDate,endDate,'dv',statCd=c("00003","00001")) -multiData <- importWaterML1(urlMulti) + groundWaterSite <- "431049071324301" startGW <- "2013-10-01" endGW <- "2014-06-30" groundwaterExampleURL <- constructNWISURL(groundWaterSite, NA, - startGW,endGW, service="gwlevels", format="xml") + startGW,endGW, service="gwlevels") groundWater <- importWaterML1(groundwaterExampleURL) + unitDataURL <- constructNWISURL(siteNumber,property, - "2013-11-03","2013-11-03",'uv',format='xml') + "2013-11-03","2013-11-03",'uv') unitData <- importWaterML1(unitDataURL,TRUE) -filePath <- system.file("extdata", package="dataRetrievaldemo") + +filePath <- system.file("extdata", package="dataRetrieval") fileName <- "WaterML1Example.xml" fullPath <- file.path(filePath, fileName) importUserWM1 <- importWaterML1(fullPath,TRUE) -siteWithTwo <- '01480015' -url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv') -twoResults <- importWaterML1(url2,TRUE) + +# Two sites, two pcodes, one site has two data descriptors: +siteNumber <- c('01480015',"04085427") +obs_url <- constructNWISURL(siteNumber,c("00060","00010"),startDate,endDate,'dv') +data <- importWaterML1(obs_url) +data$dateTime <- as.Date(data$dateTime) +data <- renameNWISColumns(data) +names(attributes(data)) +attr(data, "url") +attr(data, "disclaimer") } diff --git a/man/importWaterML2.Rd b/man/importWaterML2.Rd index bf77757ed241a1f019eaf57dbd8682fd44e7c321..c8f3bc680cb3d6a7f76932040dffae7ba4148335 100644 --- a/man/importWaterML2.Rd +++ b/man/importWaterML2.Rd @@ -42,7 +42,7 @@ URLmulti <- paste(baseURL, "statCd=00003", "parameterCd=00060",sep="&") dataReturnMulti <- importWaterML2(URLmulti) -filePath <- system.file("extdata", package="dataRetrievaldemo") +filePath <- system.file("extdata", package="dataRetrieval") fileName <- "WaterML2Example.xml" fullPath <- file.path(filePath, fileName) UserData <- importWaterML2(fullPath) diff --git a/man/readNWISdata.Rd b/man/readNWISdata.Rd index d56e82ebf80e0bf9b8d47429b5a0af8ca478ad63..28aac9ce859cb35d76472beea60939dbbec53c54 100644 --- a/man/readNWISdata.Rd +++ b/man/readNWISdata.Rd @@ -24,6 +24,10 @@ Arguments to the function should be based on \url{http://waterservices.usgs.gov} \examples{ dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010") dataTempUnit <- readNWISdata(sites="03086500", service="iv", parameterCd="00010") +#Empty: +multiSite <- readNWISdata(sites=c("04025000","04072150"), service="iv", parameterCd="00010") +#Not empty: +multiSite <- readNWISdata(sites=c("04025500","040263491"), service="iv", parameterCd="00060") } \keyword{NWIS} \keyword{data} diff --git a/man/readNWISdv.Rd b/man/readNWISdv.Rd index b58e275c8f0a9270bab188b94b0adb6141d9371f..507b71d8615d06996ea6b17d72c7087f3db5fc6a 100644 --- a/man/readNWISdv.Rd +++ b/man/readNWISdv.Rd @@ -35,13 +35,16 @@ startDate <- '2012-01-01' endDate <- '2012-06-30' pCode <- '00060' rawDailyQ <- readNWISdv(siteNumber,pCode, startDate, endDate) -rawDailyTemperature <- readNWISdv(siteNumber,'00010', - startDate, endDate, statCd='00001') rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'), startDate, endDate, statCd=c('00001','00003')) +rawDailyQAndTempMeanMax <- renameNWISColumns(rawDailyQAndTempMeanMax) rawDailyMultiSites<- readNWISdv(c("01491000","01645000"),c('00010','00060'), startDate, endDate, statCd=c('00001','00003')) -x <- readNWISdv("10258500","00060", "2014-09-10", "2014-09-12") +# Site with no data: +x <- readNWISdv("10258500","00060", "2014-09-08", "2014-09-14") +names(attributes(x)) +attr(x, "siteInfo") +attr(x, "variableInfo") } \keyword{USGS} \keyword{data} diff --git a/man/whatNWISData.Rd b/man/whatNWISData.Rd index ce4096cd99784ba3a434c85c39555a6f57d23032..2ca8c1ca887c82a189dcfb5d902561586e1e8972 100644 --- a/man/whatNWISData.Rd +++ b/man/whatNWISData.Rd @@ -16,7 +16,7 @@ whatNWISdata(siteNumbers, service = "all", parameterCd = "all", "uv","rt", or "iv"(unit values), "qw"(water-quality),"sv"(sites visits),"pk"(peak measurements), "gw"(groundwater levels), "ad" (sites included in USGS Annual Water Data Reports External Link), "aw" (sites monitored by the USGS Active Groundwater Level Network External Link), "id" (historical -instantaneous values), "} +instantaneous values)} \item{parameterCd}{string vector of valid parameter codes to return. Defaults to "all" which will not perform a filter.} @@ -26,7 +26,8 @@ instantaneous values), "} retval dataframe with all information found in the expanded site file } \description{ -Imports a table of available parameters, period of record, and count. +Imports a table of available parameters, period of record, and count. See \url{http://waterservices.usgs.gov/rest/Site-Service.html} +for more information. } \examples{ availableData <- whatNWISdata('05114000')