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

Merge pull request #41 from ldecicco-USGS/master

Reducing example times even more.
parents a8696fc7 102e1c4c
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,8 @@ Authors@R: c( person("Robert", "Hirsch", role = c("aut"),
email = "ldecicco@usgs.gov"),
person("David","Lorenz", role=c("aut"),
email = "lorenz@usgs.gov"))
Description: Collection of functions to help retrieve USGS data from web
services.
Description: Collection of functions to help retrieve USGS and EPA water
quality and hydrology data from web services.
License: Unlimited | file LICENSE
Copyright: This software is in the public domain because it contains materials
that originally came from the United States Geological Survey, an agency of
......
dataRetrieval 1.4.0-in developement
dataRetrieval 2.0.0
===========
* Overhaul of function names based on initial user feedback
* Metadata attributes added to returned dataframes
* EGRET specific functions moved to EGRET
dataRetrieval 1.4.0
===========
* Changed naming convention:
getDVData -> getNWISDaily
getSampleData -> getNWISSample
getSTORETData* -> getWQPSample
getSampleDataFromFile -> getUserSample
getDailyDataFromFile -> getUserDaily
getMetaData -> splits into getNWISInfo and getUserInfo
getSiteFileData <- getNWISSiteInfo
getParameterInfo <- getNWISPcodeInfo
getDataAvailability <- getNWISDataAvailability
'retrieve' functions changed to 'get'
* Changed WaterML2 rbind fill from plyr function to dplyr. Removed plyr import, added dplyr.
*
......
......@@ -17,6 +17,7 @@
#' startDate <- '2012-01-01'
#' endDate <- '2012-06-30'
#' pCode <- '00060'
#' \dontrun{
#' rawDailyQ <- readNWISdv(siteNumber,pCode, startDate, endDate)
#' rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'),
#' startDate, endDate, statCd=c('00001','00003'))
......@@ -28,6 +29,7 @@
#' names(attributes(x))
#' attr(x, "siteInfo")
#' attr(x, "variableInfo")
#' }
readNWISdv <- function (siteNumber,parameterCd,startDate="",endDate="",statCd="00003"){
url <- constructNWISURL(siteNumber,parameterCd,startDate,endDate,"dv",statCd=statCd)
......
#' Retrieval functions for USGS data
#' Retrieval functions for USGS and EPA data
#'
#' \tabular{ll}{
#' Package: \tab dataRetrieval\cr
#' Type: \tab Package\cr
#' Version: \tab 1.5.0\cr
#' Date: \tab 2014-11-16\cr
#' Version: \tab 2.0.0\cr
#' Date: \tab 2014-11-13\cr
#' License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr
#' Copyright: \tab This software is in the public domain because it contains materials
#' that originally came from the United States Geological Survey, an agency of
......@@ -14,12 +14,11 @@
#' LazyLoad: \tab yes\cr
#' }
#'
#' Collection of functions to help retrieve USGS data from either web services or user provided data files.
#' Retrieval functions for USGS and EPA hydrologic and water quality data
#'
#' @name dataRetrieval-package
#' @docType package
#' @author Robert M. Hirsch \email{rhirsch@@usgs.gov}, Laura De Cicco \email{ldecicco@@usgs.gov}
#' @references Hirsch, R. M., Moyer, D. L. and Archfield, S. A. (2010), Weighted Regressions on Time, Discharge, and Season (WRTDS), with an Application to Chesapeake Bay River Inputs. JAWRA Journal of the American Water Resources Association, 46: 857-880. doi: 10.1111/j.1752-1688.2010.00482.x
#' @keywords data, retrieval
NULL
......
......@@ -17,12 +17,14 @@
#' @import RCurl
#' @import lubridate
#' @examples
#' \dontrun{
#' availableData <- whatNWISdata('05114000')
#' # To find just unit value ('instantaneous') data:
#' uvData <- whatNWISdata('05114000',service="uv")
#' uvDataMulti <- whatNWISdata(c('05114000','09423350'),service=c("uv","dv"))
#' siteNumbers <- c("01491000","01645000")
#' flowAndTemp <- whatNWISdata(siteNumbers, parameterCd=c("00060","00010"))
#' }
whatNWISdata <- function(siteNumbers,service="all",parameterCd="all",statCd="all"){
siteNumber <- paste(siteNumbers,collapse=",")
......
......@@ -2,13 +2,13 @@
\docType{package}
\name{dataRetrieval-package}
\alias{dataRetrieval-package}
\title{Retrieval functions for USGS data}
\title{Retrieval functions for USGS and EPA data}
\description{
\tabular{ll}{
Package: \tab dataRetrieval\cr
Type: \tab Package\cr
Version: \tab 1.5.0\cr
Date: \tab 2014-11-16\cr
Version: \tab 2.0.0\cr
Date: \tab 2014-11-13\cr
License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr
Copyright: \tab This software is in the public domain because it contains materials
that originally came from the United States Geological Survey, an agency of
......@@ -19,14 +19,11 @@ LazyLoad: \tab yes\cr
}
}
\details{
Collection of functions to help retrieve USGS data from either web services or user provided data files.
Retrieval functions for USGS and EPA hydrologic and water quality data
}
\author{
Robert M. Hirsch \email{rhirsch@usgs.gov}, Laura De Cicco \email{ldecicco@usgs.gov}
}
\references{
Hirsch, R. M., Moyer, D. L. and Archfield, S. A. (2010), Weighted Regressions on Time, Discharge, and Season (WRTDS), with an Application to Chesapeake Bay River Inputs. JAWRA Journal of the American Water Resources Association, 46: 857-880. doi: 10.1111/j.1752-1688.2010.00482.x
}
\keyword{data,}
\keyword{retrieval}
......@@ -34,6 +34,7 @@ siteNumber <- '04085427'
startDate <- '2012-01-01'
endDate <- '2012-06-30'
pCode <- '00060'
\dontrun{
rawDailyQ <- readNWISdv(siteNumber,pCode, startDate, endDate)
rawDailyQAndTempMeanMax <- readNWISdv(siteNumber,c('00010','00060'),
startDate, endDate, statCd=c('00001','00003'))
......@@ -46,6 +47,7 @@ names(attributes(x))
attr(x, "siteInfo")
attr(x, "variableInfo")
}
}
\keyword{USGS}
\keyword{data}
\keyword{import}
......
......@@ -30,6 +30,7 @@ Imports a table of available parameters, period of record, and count. See \url{h
for more information.
}
\examples{
\dontrun{
availableData <- whatNWISdata('05114000')
# To find just unit value ('instantaneous') data:
uvData <- whatNWISdata('05114000',service="uv")
......@@ -37,6 +38,7 @@ uvDataMulti <- whatNWISdata(c('05114000','09423350'),service=c("uv","dv"))
siteNumbers <- c("01491000","01645000")
flowAndTemp <- whatNWISdata(siteNumbers, parameterCd=c("00060","00010"))
}
}
\keyword{USGS}
\keyword{data}
\keyword{import}
......
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