Skip to content
Snippets Groups Projects
Commit 253ef287 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Latest build.

parent 72831bac
No related branches found
No related tags found
1 merge request!39Overhaul of function names. Move some functionality to EGRET.
...@@ -29,7 +29,7 @@ endDate <- "2012-10-01" ...@@ -29,7 +29,7 @@ endDate <- "2012-10-01"
offering <- '00003' offering <- '00003'
property <- '00060' property <- '00060'
obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv') obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
data <- importWaterML1(obs_url) data <- importWaterML1(obs_url,TRUE)
urlMulti <- constructNWISURL("04085427",c("00060","00010"), urlMulti <- constructNWISURL("04085427",c("00060","00010"),
startDate,endDate,'dv',statCd=c("00003","00001")) startDate,endDate,'dv',statCd=c("00003","00001"))
multiData <- importWaterML1(urlMulti) multiData <- importWaterML1(urlMulti)
...@@ -45,6 +45,9 @@ unitData <- importWaterML1(unitDataURL,TRUE) ...@@ -45,6 +45,9 @@ unitData <- importWaterML1(unitDataURL,TRUE)
filePath <- system.file("extdata", package="dataRetrievaldemo") filePath <- system.file("extdata", package="dataRetrievaldemo")
fileName <- "WaterML1Example.xml" fileName <- "WaterML1Example.xml"
fullPath <- file.path(filePath, fileName) 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)
} }
...@@ -37,6 +37,7 @@ rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'), ...@@ -37,6 +37,7 @@ rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'),
startDate, endDate, statCd=c('00001','00003')) startDate, endDate, statCd=c('00001','00003'))
rawDailyMultiSites<- readNWISdv(c("01491000","01645000"),c('00010','00060'), rawDailyMultiSites<- readNWISdv(c("01491000","01645000"),c('00010','00060'),
startDate, endDate, statCd=c('00001','00003')) startDate, endDate, statCd=c('00001','00003'))
x <- readNWISdv("10258500","00060", "2014-09-10", "2014-09-12")
} }
\keyword{USGS} \keyword{USGS}
\keyword{data} \keyword{data}
......
...@@ -13,7 +13,8 @@ readNWISgwl(siteNumber, startDate = "", endDate = "") ...@@ -13,7 +13,8 @@ readNWISgwl(siteNumber, startDate = "", endDate = "")
\item{endDate}{string ending date for data retrieval in the form YYYY-MM-DD.} \item{endDate}{string ending date for data retrieval in the form YYYY-MM-DD.}
} }
\description{ \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{ \examples{
siteNumber <- "434400121275801" siteNumber <- "434400121275801"
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
\alias{renameColumns} \alias{renameColumns}
\title{renameColumns} \title{renameColumns}
\usage{ \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{ \arguments{
\item{rawData}{dataframe returned from retrieval functions} \item{rawData}{dataframe returned from retrieval functions}
...@@ -15,15 +17,12 @@ rawData dataframe with improved column names ...@@ -15,15 +17,12 @@ rawData dataframe with improved column names
Rename columns coming back from NWIS data retrievals Rename columns coming back from NWIS data retrievals
} }
\examples{ \examples{
# This example requires an internet connection to run siteWithTwo <- '01480015'
siteNumber <- '05114000' startDate <- "2012-09-01"
rawData <- readNWISdv(siteNumber,c("00010","00060","00300"), endDate <- "2012-10-01"
"2001-01-01","2002-01-01",statCd=c("00001","00003")) url2 <- constructNWISURL(siteWithTwo, "00060",startDate,endDate,'dv')
rawData <- renameColumns(rawData) twoResults <- importWaterML1(url2,TRUE)
date <- "2014-10-10" twoResults <- renameColumns(twoResults)
rawData2 <- readNWISunit(siteNumber,c("00010","00060"),date,date)
rawData2 <- renameColumns(rawData2)
head(rawData2)
} }
\keyword{USGS} \keyword{USGS}
\keyword{data} \keyword{data}
......
...@@ -487,12 +487,12 @@ An example of plotting the above data (Figure \ref{fig:getNWIStemperaturePlot}): ...@@ -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 par(mar=c(5,5,5,5)) #sets the size of the plot window
with(temperatureAndFlow, plot( with(temperatureAndFlow, plot(
dateTime, Temperature_water_degrees_Celsius_Max_01, dateTime, Wtemp_Max,
xlab="Date",ylab="Max Temperature [C]" xlab="Date",ylab="Max Temperature [C]"
)) ))
par(new=TRUE) par(new=TRUE)
with(temperatureAndFlow, plot( with(temperatureAndFlow, plot(
dateTime, Discharge_cubic_feet_per_second, dateTime, Flow,
col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE col="red",type="l",xaxt="n",yaxt="n",xlab="",ylab="",axes=FALSE
)) ))
axis(4,col="red",col.axis="red") axis(4,col="red",col.axis="red")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment