From 253ef2879883e2c09da60591da0094d7e9572ee2 Mon Sep 17 00:00:00 2001 From: unknown <ldecicco@usgs.gov> Date: Mon, 3 Nov 2014 17:13:30 -0600 Subject: [PATCH] Latest build. --- man/importWaterML1.Rd | 7 +++++-- man/readNWISdv.Rd | 1 + man/readNWISgwl.Rd | 3 ++- man/renameColumns.Rd | 19 +++++++++---------- vignettes/dataRetrieval.Rnw | 4 ++-- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/man/importWaterML1.Rd b/man/importWaterML1.Rd index f2602018..3117ef72 100644 --- a/man/importWaterML1.Rd +++ b/man/importWaterML1.Rd @@ -29,7 +29,7 @@ endDate <- "2012-10-01" offering <- '00003' property <- '00060' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv') -data <- importWaterML1(obs_url) +data <- importWaterML1(obs_url,TRUE) urlMulti <- constructNWISURL("04085427",c("00060","00010"), startDate,endDate,'dv',statCd=c("00003","00001")) multiData <- importWaterML1(urlMulti) @@ -45,6 +45,9 @@ unitData <- importWaterML1(unitDataURL,TRUE) filePath <- system.file("extdata", package="dataRetrievaldemo") fileName <- "WaterML1Example.xml" fullPath <- file.path(filePath, fileName) -importUserWM1 <- importWaterML1(fullPath) +importUserWM1 <- importWaterML1(fullPath,TRUE) +siteWithTwo <- '01480015' +url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv') +twoResults <- importWaterML1(url2,TRUE) } diff --git a/man/readNWISdv.Rd b/man/readNWISdv.Rd index 203fbbf3..74118b21 100644 --- a/man/readNWISdv.Rd +++ b/man/readNWISdv.Rd @@ -37,6 +37,7 @@ rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'), startDate, endDate, statCd=c('00001','00003')) rawDailyMultiSites<- readNWISdv(c("01491000","01645000"),c('00010','00060'), startDate, endDate, statCd=c('00001','00003')) +x <- readNWISdv("10258500","00060", "2014-09-10", "2014-09-12") } \keyword{USGS} \keyword{data} diff --git a/man/readNWISgwl.Rd b/man/readNWISgwl.Rd index 050dcd20..86483894 100644 --- a/man/readNWISgwl.Rd +++ b/man/readNWISgwl.Rd @@ -13,7 +13,8 @@ readNWISgwl(siteNumber, startDate = "", endDate = "") \item{endDate}{string ending date for data retrieval in the form YYYY-MM-DD.} } \description{ -Reads groundwater level measurements from NWISweb. +Reads groundwater level measurements from NWISweb. Mixed date/times come back from the service +depending on the year that the data was collected. } \examples{ siteNumber <- "434400121275801" diff --git a/man/renameColumns.Rd b/man/renameColumns.Rd index 6a747b7b..c8ca1e9d 100644 --- a/man/renameColumns.Rd +++ b/man/renameColumns.Rd @@ -3,7 +3,9 @@ \alias{renameColumns} \title{renameColumns} \usage{ -renameColumns(rawData) +renameColumns(rawData, p00010 = "Wtemp", p00045 = "Precip", + p00060 = "Flow", p00065 = "GH", p00095 = "SpecCond", p00300 = "DO", + p00400 = "pH", p62611 = "GWL", p63680 = "Turb", p72019 = "WLBLS", ...) } \arguments{ \item{rawData}{dataframe returned from retrieval functions} @@ -15,15 +17,12 @@ rawData dataframe with improved column names Rename columns coming back from NWIS data retrievals } \examples{ -# This example requires an internet connection to run -siteNumber <- '05114000' -rawData <- readNWISdv(siteNumber,c("00010","00060","00300"), - "2001-01-01","2002-01-01",statCd=c("00001","00003")) -rawData <- renameColumns(rawData) -date <- "2014-10-10" -rawData2 <- readNWISunit(siteNumber,c("00010","00060"),date,date) -rawData2 <- renameColumns(rawData2) -head(rawData2) +siteWithTwo <- '01480015' +startDate <- "2012-09-01" +endDate <- "2012-10-01" +url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv') +twoResults <- importWaterML1(url2,TRUE) +twoResults <- renameColumns(twoResults) } \keyword{USGS} \keyword{data} diff --git a/vignettes/dataRetrieval.Rnw b/vignettes/dataRetrieval.Rnw index 37c2e3d0..559db31e 100644 --- a/vignettes/dataRetrieval.Rnw +++ b/vignettes/dataRetrieval.Rnw @@ -487,12 +487,12 @@ An example of plotting the above data (Figure \ref{fig:getNWIStemperaturePlot}): par(mar=c(5,5,5,5)) #sets the size of the plot window with(temperatureAndFlow, plot( - dateTime, Temperature_water_degrees_Celsius_Max_01, + dateTime, Wtemp_Max, xlab="Date",ylab="Max Temperature [C]" )) par(new=TRUE) with(temperatureAndFlow, plot( - dateTime, Discharge_cubic_feet_per_second, + dateTime, Flow, col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE )) axis(4,col="red",col.axis="red") -- GitLab