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

New update to roxygen2.

parent 1979c01f
No related branches found
No related tags found
1 merge request!147Roxygen update.
Showing with 79 additions and 79 deletions
...@@ -2,6 +2,7 @@ vignettes/figure ...@@ -2,6 +2,7 @@ vignettes/figure
appveyor.yml appveyor.yml
.travis.yml .travis.yml
.gitignore .gitignore
examplePhosQuery.R
dataRetrieval-concordance.tex dataRetrieval-concordance.tex
^.*\.Rproj$ ^.*\.Rproj$
^\.Rproj\.user$ ^\.Rproj\.user$
......
...@@ -12,7 +12,7 @@ Authors@R: c( person("Robert", "Hirsch", role = c("aut"), ...@@ -12,7 +12,7 @@ Authors@R: c( person("Robert", "Hirsch", role = c("aut"),
Description: Collection of functions to help retrieve U.S. Geological Survey Description: Collection of functions to help retrieve U.S. Geological Survey
(USGS) and U.S. Environmental Protection Agency (EPA) water quality and (USGS) and U.S. Environmental Protection Agency (EPA) water quality and
hydrology data from web services. USGS web services are discovered from the hydrology data from web services. USGS web services are discovered from the
National Water Information System (NWIS) tools. Both EPA and USGS water National Water Information System (NWIS) tools. Both EPA and USGS water
quality data are obtained from the Water Quality Portal. quality data are obtained from the Water Quality Portal.
License: CC0 License: CC0
Copyright: This software is in the public domain because it contains materials Copyright: This software is in the public domain because it contains materials
...@@ -39,3 +39,4 @@ VignetteBuilder: knitr ...@@ -39,3 +39,4 @@ VignetteBuilder: knitr
BuildVignettes: true BuildVignettes: true
BugReports: https://github.com/USGS-R/dataRetrieval/issues BugReports: https://github.com/USGS-R/dataRetrieval/issues
URL: https://github.com/USGS-R/dataRetrieval, http://pubs.usgs.gov/tm/04/a10/ URL: https://github.com/USGS-R/dataRetrieval, http://pubs.usgs.gov/tm/04/a10/
RoxygenNote: 5.0.0
# Generated by roxygen2 (4.1.1): do not edit by hand # Generated by roxygen2: do not edit by hand
export(checkWQPdates) export(checkWQPdates)
export(constructNWISURL) export(constructNWISURL)
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkWQPdates.r % Please edit documentation in R/checkWQPdates.r
\name{checkWQPdates} \name{checkWQPdates}
\alias{checkWQPdates} \alias{checkWQPdates}
...@@ -13,11 +13,11 @@ checkWQPdates(values) ...@@ -13,11 +13,11 @@ checkWQPdates(values)
values named list with corrected arguments to send to the Water Quality Portal values named list with corrected arguments to send to the Water Quality Portal
} }
\description{ \description{
Checks date format for inputs to the Water Quality Portal. Used in \code{readWQPqw} Checks date format for inputs to the Water Quality Portal. Used in \code{readWQPqw}
and \code{readWQPdata}. and \code{readWQPdata}.
} }
\examples{ \examples{
values <- list(startDateLo="01-01-2002", characteristicName="Phosphorous", values <- list(startDateLo="01-01-2002", characteristicName="Phosphorous",
endDate=as.Date("2014-01-01")) endDate=as.Date("2014-01-01"))
values <- checkWQPdates(values) values <- checkWQPdates(values)
} }
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constructNWISURL.r % Please edit documentation in R/constructNWISURL.r
\name{constructNWISURL} \name{constructNWISURL}
\alias{constructNWISURL} \alias{constructNWISURL}
...@@ -19,13 +19,13 @@ retrieval for the earliest possible record.} ...@@ -19,13 +19,13 @@ retrieval for the earliest possible record.}
\item{endDate}{character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates \item{endDate}{character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates
retrieval for the latest possible record.} retrieval for the latest possible record.}
\item{service}{string USGS service to call. Possible values are "dv" (daily values), "uv" (unit/instantaneous values), \item{service}{string USGS service to call. Possible values are "dv" (daily values), "uv" (unit/instantaneous values),
"qw" (water quality data), "gwlevels" (groundwater),and "rating" (rating curve), "peak", "meas" (discrete streamflow measurements).} "qw" (water quality data), "gwlevels" (groundwater),and "rating" (rating curve), "peak", "meas" (discrete streamflow measurements).}
\item{statCd}{string or vector USGS statistic code only used for daily value service. This is usually 5 digits. Daily mean (00003) is the default.} \item{statCd}{string or vector USGS statistic code only used for daily value service. This is usually 5 digits. Daily mean (00003) is the default.}
\item{format}{string, can be "tsv" or "xml", and is only applicable for daily and unit value requests. "tsv" returns results faster, but there is a possiblitiy that an incomplete file is returned without warning. XML is slower, \item{format}{string, can be "tsv" or "xml", and is only applicable for daily and unit value requests. "tsv" returns results faster, but there is a possiblitiy that an incomplete file is returned without warning. XML is slower,
but will offer a warning if the file was incomplete (for example, if there was a momentary problem with the internet connection). It is possible to safely use the "tsv" option, but will offer a warning if the file was incomplete (for example, if there was a momentary problem with the internet connection). It is possible to safely use the "tsv" option,
but the user must carefully check the results to see if the data returns matches what is expected. The default is therefore "xml".} but the user must carefully check the results to see if the data returns matches what is expected. The default is therefore "xml".}
\item{expanded}{logical defaults to \code{TRUE}. If \code{TRUE}, retrieves additional information, only applicable for qw data.} \item{expanded}{logical defaults to \code{TRUE}. If \code{TRUE}, retrieves additional information, only applicable for qw data.}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constructNWISURL.r % Please edit documentation in R/constructNWISURL.r
\name{constructWQPURL} \name{constructWQPURL}
\alias{constructWQPURL} \alias{constructWQPURL}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabbedDataRetrievals.R % Please edit documentation in R/tabbedDataRetrievals.R
\docType{data} \docType{data}
\name{countyCd} \name{countyCd}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabbedDataRetrievals.R % Please edit documentation in R/tabbedDataRetrievals.R
\docType{package} \docType{package}
\name{dataRetrieval-package} \name{dataRetrieval-package}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getWebServiceData.R % Please edit documentation in R/getWebServiceData.R
\name{getWebServiceData} \name{getWebServiceData}
\alias{getWebServiceData} \alias{getWebServiceData}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importRDB1.r % Please edit documentation in R/importRDB1.r
\name{importRDB1} \name{importRDB1}
\alias{importRDB1} \alias{importRDB1}
...@@ -17,7 +17,7 @@ importRDB1(obs_url, asDateTime = FALSE, qw = FALSE, convertType = TRUE, ...@@ -17,7 +17,7 @@ importRDB1(obs_url, asDateTime = FALSE, qw = FALSE, convertType = TRUE,
\item{convertType}{logical, defaults to \code{TRUE}. If \code{TRUE}, the function will convert the data to dates, datetimes, \item{convertType}{logical, defaults to \code{TRUE}. If \code{TRUE}, the function will convert the data to dates, datetimes,
numerics based on a standard algorithm. If false, everything is returned as a character} numerics based on a standard algorithm. If false, everything is returned as a character}
\item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the
datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"} "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"}
...@@ -28,19 +28,19 @@ A data frame with the following columns: ...@@ -28,19 +28,19 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr site_no \tab character \tab The USGS site number \cr
datetime \tab POSIXct \tab The date and time of the value converted to UTC (if asDateTime = \code{TRUE}), \cr datetime \tab POSIXct \tab The date and time of the value converted to UTC (if asDateTime = \code{TRUE}), \cr
\tab character \tab or raw character string (if asDateTime = FALSE) \cr \tab character \tab or raw character string (if asDateTime = FALSE) \cr
tz_cd \tab character \tab The time zone code for datetime \cr tz_cd \tab character \tab The time zone code for datetime \cr
code \tab character \tab Any codes that qualify the corresponding value\cr code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr value \tab numeric \tab The numeric value for the parameter \cr
tz_cd_reported \tab The originally reported time zone \cr tz_cd_reported \tab The originally reported time zone \cr
} }
Note that code and value are repeated for the parameters requested. The names are of the form Note that code and value are repeated for the parameters requested. The names are of the form
XD_P_S, where X is literal, XD_P_S, where X is literal,
D is an option description of the parameter, D is an option description of the parameter,
P is the parameter code, P is the parameter code,
and S is the statistic code (if applicable). and S is the statistic code (if applicable).
If a date/time (dt) column contained incomplete date and times, a new column of dates was inserted. This could happen If a date/time (dt) column contained incomplete date and times, a new column of dates and time was inserted. This could happen
when older data was reported as dates, and newer data was reported as a date/time. when older data was reported as dates, and newer data was reported as a date/time.
There are also several useful attributes attached to the data frame: There are also several useful attributes attached to the data frame:
...@@ -76,7 +76,7 @@ unitDataURL <- constructNWISURL(siteNumber,property, ...@@ -76,7 +76,7 @@ unitDataURL <- constructNWISURL(siteNumber,property,
unitData <- importRDB1(unitDataURL, asDateTime=TRUE) unitData <- importRDB1(unitDataURL, asDateTime=TRUE)
qwURL <- constructNWISURL(c('04024430','04024000'), qwURL <- constructNWISURL(c('04024430','04024000'),
c('34247','30234','32104','34220'), c('34247','30234','32104','34220'),
"2010-11-03","","qw",format="rdb") "2010-11-03","","qw",format="rdb")
qwData <- importRDB1(qwURL, qw=TRUE, tz="America/Chicago") qwData <- importRDB1(qwURL, qw=TRUE, tz="America/Chicago")
iceSite <- '04024000' iceSite <- '04024000'
start <- "2014-11-09" start <- "2014-11-09"
...@@ -90,5 +90,6 @@ filePath <- system.file("extdata", package="dataRetrieval") ...@@ -90,5 +90,6 @@ filePath <- system.file("extdata", package="dataRetrieval")
fileName <- "RDB1Example.txt" fileName <- "RDB1Example.txt"
fullPath <- file.path(filePath, fileName) fullPath <- file.path(filePath, fileName)
importUserRDB <- importRDB1(fullPath) importUserRDB <- importRDB1(fullPath)
} }
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importWQP.R % Please edit documentation in R/importWQP.R
\name{importWQP} \name{importWQP}
\alias{importWQP} \alias{importWQP}
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
importWQP(obs_url, zip = FALSE, tz = "") importWQP(obs_url, zip = FALSE, tz = "")
} }
\arguments{ \arguments{
\item{obs_url}{character URL to Water Quality Portal#'} \item{obs_url}{character URL to Water Quality Portal#' @keywords data import USGS web service}
\item{zip}{logical used to request the data in a zip format (TRUE)} \item{zip}{logical used to request the data in a zip format (TRUE)}
\item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the
datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"} "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"}
} }
\value{ \value{
retval dataframe raw data returned from the Water Quality Portal. Additionally, a POSIXct dateTime column is supplied for retval dataframe raw data returned from the Water Quality Portal. Additionally, a POSIXct dateTime column is supplied for
start and end times, and converted to UTC. See \url{http://www.waterqualitydata.us/portal_userguide.jsp} for more information. start and end times, and converted to UTC. See \url{http://www.waterqualitydata.us/portal_userguide.jsp} for more information.
} }
\description{ \description{
...@@ -41,9 +41,4 @@ STORETdata <- importWQP(STORETex) ...@@ -41,9 +41,4 @@ STORETdata <- importWQP(STORETex)
\seealso{ \seealso{
\code{\link{readWQPdata}}, \code{\link{readWQPqw}}, \code{\link{whatWQPsites}} \code{\link{readWQPdata}}, \code{\link{readWQPqw}}, \code{\link{whatWQPsites}}
} }
\keyword{USGS}
\keyword{data}
\keyword{import}
\keyword{service}
\keyword{web}
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importWaterML1.r % Please edit documentation in R/importWaterML1.r
\name{importWaterML1} \name{importWaterML1}
\alias{importWaterML1} \alias{importWaterML1}
...@@ -11,7 +11,7 @@ importWaterML1(obs_url, asDateTime = FALSE, tz = "") ...@@ -11,7 +11,7 @@ importWaterML1(obs_url, asDateTime = FALSE, tz = "")
\item{asDateTime}{logical, if \code{TRUE} returns date and time as POSIXct, if \code{FALSE}, Date} \item{asDateTime}{logical, if \code{TRUE} returns date and time as POSIXct, if \code{FALSE}, Date}
\item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the
datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"} "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"}
...@@ -22,16 +22,16 @@ A data frame with the following columns: ...@@ -22,16 +22,16 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr site_no \tab character \tab The USGS site number \cr
datetime \tab POSIXct \tab The date and time of the value converted to UTC (if asDateTime = TRUE), \cr datetime \tab POSIXct \tab The date and time of the value converted to UTC (if asDateTime = TRUE), \cr
\tab character \tab or raw character string (if asDateTime = FALSE) \cr \tab character \tab or raw character string (if asDateTime = FALSE) \cr
tz_cd \tab character \tab The time zone code for datetime \cr tz_cd \tab character \tab The time zone code for datetime \cr
code \tab character \tab Any codes that qualify the corresponding value\cr code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr value \tab numeric \tab The numeric value for the parameter \cr
} }
Note that code and value are repeated for the parameters requested. The names are of the form Note that code and value are repeated for the parameters requested. The names are of the form
X_D_P_S, where X is literal, X_D_P_S, where X is literal,
D is an option description of the parameter, D is an option description of the parameter,
P is the parameter code, P is the parameter code,
and S is the statistic code (if applicable). and S is the statistic code (if applicable).
There are also several useful attributes attached to the data frame: There are also several useful attributes attached to the data frame:
...@@ -98,6 +98,7 @@ filePath <- system.file("extdata", package="dataRetrieval") ...@@ -98,6 +98,7 @@ filePath <- system.file("extdata", package="dataRetrieval")
fileName <- "WaterML1Example.xml" fileName <- "WaterML1Example.xml"
fullPath <- file.path(filePath, fileName) fullPath <- file.path(filePath, fileName)
imporFile <- importWaterML1(fullPath,TRUE) imporFile <- importWaterML1(fullPath,TRUE)
} }
\seealso{ \seealso{
\code{\link{renameNWISColumns}} \code{\link{renameNWISColumns}}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importWaterML2.r % Please edit documentation in R/importWaterML2.r
\name{importWaterML2} \name{importWaterML2}
\alias{importWaterML2} \alias{importWaterML2}
...@@ -11,7 +11,7 @@ importWaterML2(obs_url, asDateTime = FALSE, tz = "") ...@@ -11,7 +11,7 @@ importWaterML2(obs_url, asDateTime = FALSE, tz = "")
\item{asDateTime}{logical, if \code{TRUE} returns date and time as POSIXct, if \code{FALSE}, Date} \item{asDateTime}{logical, if \code{TRUE} returns date and time as POSIXct, if \code{FALSE}, Date}
\item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of datetime. Default is an empty quote, which converts the
datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"} "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"}
...@@ -49,5 +49,6 @@ filePath <- system.file("extdata", package="dataRetrieval") ...@@ -49,5 +49,6 @@ filePath <- system.file("extdata", package="dataRetrieval")
fileName <- "WaterML2Example.xml" fileName <- "WaterML2Example.xml"
fullPath <- file.path(filePath, fileName) fullPath <- file.path(filePath, fileName)
UserData <- importWaterML2(fullPath) UserData <- importWaterML2(fullPath)
} }
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabbedDataRetrievals.R % Please edit documentation in R/tabbedDataRetrievals.R
\docType{data} \docType{data}
\name{pCodeToName} \name{pCodeToName}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabbedDataRetrievals.R % Please edit documentation in R/tabbedDataRetrievals.R
\docType{data} \docType{data}
\name{parameterCdFile} \name{parameterCdFile}
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readNWISdata.r % Please edit documentation in R/readNWISdata.r
\name{readNWISdata} \name{readNWISdata}
\alias{readNWISdata} \alias{readNWISdata}
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
readNWISdata(service = "dv", ...) readNWISdata(service = "dv", ...)
} }
\arguments{ \arguments{
\item{service}{string. Possible values are "iv" (for instantaneous), "dv" (for daily values), "gwlevels" \item{service}{string. Possible values are "iv" (for instantaneous), "dv" (for daily values), "gwlevels"
(for groundwater levels), "site" (for site service), and "qw" (water-quality). Note: "qw" calls go to: (for groundwater levels), "site" (for site service), and "qw" (water-quality). Note: "qw" calls go to:
\url{http://nwis.waterdata.usgs.gov/usa/nwis/qwdata} for data requests, and use different call requests schemes.} \url{http://nwis.waterdata.usgs.gov/usa/nwis/qwdata} for data requests, and use different call requests schemes.}
\item{\dots}{see \url{http://waterservices.usgs.gov/rest/Site-Service.html#Service} for a complete list of options} \item{\dots}{see \url{http://waterservices.usgs.gov/rest/Site-Service.html#Service} for a complete list of options}
...@@ -19,8 +19,8 @@ A data frame with the following columns: ...@@ -19,8 +19,8 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr Name \tab Type \tab Description \cr
agency \tab character \tab The NWIS code for the agency reporting the data\cr agency \tab character \tab The NWIS code for the agency reporting the data\cr
site \tab character \tab The USGS site number \cr site \tab character \tab The USGS site number \cr
dateTime \tab POSIXct \tab The date and time (if applicable) of the measurement, dateTime \tab POSIXct \tab The date and time (if applicable) of the measurement,
converted to UTC for unit value data. R only allows one time zone attribute per column. For unit data converted to UTC for unit value data. R only allows one time zone attribute per column. For unit data
spanning a time zone change, converting the data to UTC solves this problem. For daily data, spanning a time zone change, converting the data to UTC solves this problem. For daily data,
the time zone attribute is the time zone of the first returned measurement. the time zone attribute is the time zone of the first returned measurement.
\cr \cr
...@@ -28,10 +28,10 @@ tz_cd \tab character \tab The time zone code for dateTime column\cr ...@@ -28,10 +28,10 @@ tz_cd \tab character \tab The time zone code for dateTime column\cr
code \tab character \tab Any codes that qualify the corresponding value\cr code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr value \tab numeric \tab The numeric value for the parameter \cr
} }
Note that code and value are repeated for the parameters requested. The names are of the form Note that code and value are repeated for the parameters requested. The names are of the form
X_D_P_S, where X is literal, X_D_P_S, where X is literal,
D is an option description of the parameter, D is an option description of the parameter,
P is the parameter code, P is the parameter code,
and S is the statistic code (if applicable). and S is the statistic code (if applicable).
There are also several useful attributes attached to the data frame: There are also several useful attributes attached to the data frame:
...@@ -53,26 +53,26 @@ See examples below for ideas of constructing queries. ...@@ -53,26 +53,26 @@ See examples below for ideas of constructing queries.
\dontrun{ \dontrun{
# Examples not run for time considerations # Examples not run for time considerations
dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv") dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv")
instFlow <- readNWISdata(sites="05114000", service="iv", instFlow <- readNWISdata(sites="05114000", service="iv",
parameterCd="00060", parameterCd="00060",
startDate="2014-05-01T00:00Z",endDate="2014-05-01T12:00Z") startDate="2014-05-01T00:00Z",endDate="2014-05-01T12:00Z")
instFlowCDT <- readNWISdata(sites="05114000", service="iv", instFlowCDT <- readNWISdata(sites="05114000", service="iv",
parameterCd="00060", parameterCd="00060",
startDate="2014-05-01T00:00",endDate="2014-05-01T12:00", startDate="2014-05-01T00:00",endDate="2014-05-01T12:00",
tz="America/Chicago") tz="America/Chicago")
#Empty: #Empty:
multiSite <- readNWISdata(sites=c("04025000","04072150"), service="iv", multiSite <- readNWISdata(sites=c("04025000","04072150"), service="iv",
parameterCd="00010") parameterCd="00010")
#Not empty: #Not empty:
multiSite <- readNWISdata(sites=c("04025500","040263491"), multiSite <- readNWISdata(sites=c("04025500","040263491"),
service="iv", parameterCd="00060") service="iv", parameterCd="00060")
bBoxEx <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010") bBoxEx <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010")
startDate <- as.Date("2013-10-01") startDate <- as.Date("2013-10-01")
endDate <- as.Date("2014-09-30") endDate <- as.Date("2014-09-30")
waterYear <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010", waterYear <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010",
service="dv", startDate=startDate, endDate=endDate) service="dv", startDate=startDate, endDate=endDate)
siteInfo <- readNWISdata(stateCd="WI", parameterCd="00010", siteInfo <- readNWISdata(stateCd="WI", parameterCd="00010",
hasDataTypeCd="iv", service="site") hasDataTypeCd="iv", service="site")
...@@ -80,7 +80,7 @@ qwData <- readNWISdata(bBox=c(-82.5,41.52,-81,41),startDate=as.Date("2000-01-01" ...@@ -80,7 +80,7 @@ qwData <- readNWISdata(bBox=c(-82.5,41.52,-81,41),startDate=as.Date("2000-01-01"
drain_area_va_min=50, qw_count_nu=50,qw_attributes="expanded", drain_area_va_min=50, qw_count_nu=50,qw_attributes="expanded",
qw_sample_wide="wide",list_of_search_criteria=c("lat_long_bounding_box", qw_sample_wide="wide",list_of_search_criteria=c("lat_long_bounding_box",
"drain_area_va","obs_count_nu"),service="qw") "drain_area_va","obs_count_nu"),service="qw")
temp <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010", service="site", temp <- readNWISdata(bBox=c(-83,36.5,-81,38.5), parameterCd="00010", service="site",
seriesCatalogOutput=TRUE) seriesCatalogOutput=TRUE)
wiGWL <- readNWISdata(stateCd="WI",service="gwlevels") wiGWL <- readNWISdata(stateCd="WI",service="gwlevels")
} }
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readNWISdv.r % Please edit documentation in R/readNWISdv.r
\name{readNWISdv} \name{readNWISdv}
\alias{readNWISdv} \alias{readNWISdv}
...@@ -26,14 +26,14 @@ A data frame with the following columns: ...@@ -26,14 +26,14 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr Name \tab Type \tab Description \cr
agency \tab character \tab The NWIS code for the agency reporting the data\cr agency \tab character \tab The NWIS code for the agency reporting the data\cr
site \tab character \tab The USGS site number \cr site \tab character \tab The USGS site number \cr
Date \tab Date \tab The date of the value \cr Date \tab Date \tab The date of the value \cr
code \tab character \tab Any codes that qualify the corresponding value\cr code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr value \tab numeric \tab The numeric value for the parameter \cr
} }
Note that code and value are repeated for the parameters requested. The names are of the form Note that code and value are repeated for the parameters requested. The names are of the form
X_D_P_S, where X is literal, X_D_P_S, where X is literal,
D is an option description of the parameter, D is an option description of the parameter,
P is the parameter code, P is the parameter code,
and S is the statistic code (if applicable). and S is the statistic code (if applicable).
There are also several useful attributes attached to the data frame: There are also several useful attributes attached to the data frame:
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readNWISunit.r % Please edit documentation in R/readNWISunit.r
\name{readNWISgwl} \name{readNWISgwl}
\alias{readNWISgwl} \alias{readNWISgwl}
...@@ -21,7 +21,7 @@ A data frame with the following columns: ...@@ -21,7 +21,7 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr site_no \tab character \tab The USGS site number \cr
site_tp_cd \tab character \tab Site type code \cr site_tp_cd \tab character \tab Site type code \cr
lev_dt \tab Date \tab Date level measured\cr lev_dt \tab Date \tab Date level measured\cr
lev_tm \tab character \tab Time level measured \cr lev_tm \tab character \tab Time level measured \cr
lev_tz_cd \tab character \tab Time datum \cr lev_tz_cd \tab character \tab Time datum \cr
...@@ -41,9 +41,9 @@ siteInfo \tab data.frame \tab A data frame containing information on the request ...@@ -41,9 +41,9 @@ siteInfo \tab data.frame \tab A data frame containing information on the request
} }
} }
\description{ \description{
Reads groundwater level measurements from NWISweb. Mixed date/times come back from the service Reads groundwater level measurements from NWISweb. Mixed date/times come back from the service
depending on the year that the data was collected. See \url{http://waterdata.usgs.gov/usa/nwis/gw} depending on the year that the data was collected. See \url{http://waterdata.usgs.gov/usa/nwis/gw}
for details about groundwater. Groundwater dates and times are returned in many different formats, therefore the for details about groundwater. Groundwater dates and times are returned in many different formats, therefore the
date/time information is returned as a character string. Users will need to convert to a date object. date/time information is returned as a character string. Users will need to convert to a date object.
See \url{http://waterservices.usgs.gov/rest/GW-Levels-Service.html} for more information. See \url{http://waterservices.usgs.gov/rest/GW-Levels-Service.html} for more information.
} }
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readNWISunit.r % Please edit documentation in R/readNWISunit.r
\name{readNWISmeas} \name{readNWISmeas}
\alias{readNWISmeas} \alias{readNWISmeas}
...@@ -15,7 +15,7 @@ retrieval for the earliest possible record.} ...@@ -15,7 +15,7 @@ retrieval for the earliest possible record.}
\item{endDate}{character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates \item{endDate}{character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates
retrieval for the latest possible record.} retrieval for the latest possible record.}
\item{tz}{character to set timezone attribute of dateTime. Default is an empty quote, which converts the \item{tz}{character to set timezone attribute of dateTime. Default is an empty quote, which converts the
dateTimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). dateTimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"} "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"}
...@@ -27,12 +27,12 @@ Name \tab Type \tab Description \cr ...@@ -27,12 +27,12 @@ Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr site_no \tab character \tab The USGS site number \cr
measurement_dt \tab POSIXct \tab The date and time (in POSIXct) of the measurement. Unless specified measurement_dt \tab POSIXct \tab The date and time (in POSIXct) of the measurement. Unless specified
with the tz parameter, this is converted to UTC. If the measurement_dt column is an incomplete, a measurement_dt_date column is added to the with the tz parameter, this is converted to UTC. If the measurement_dt column is an incomplete, a measurement_dt_date and
returned data frame. \cr measurement_dt_time column are added to the returned data frame. \cr
tz_cd \tab character \tab The time zone code for the measurement_dt column \cr tz_cd \tab character \tab The time zone code for the measurement_dt column \cr
} }
See \url{http://waterdata.usgs.gov/usa/nwis/sw} for details about surface water, and See \url{http://waterdata.usgs.gov/usa/nwis/sw} for details about surface water, and
\url{http://waterdata.usgs.gov/nwis/help?output_formats_help#streamflow_measurement_data} \url{http://waterdata.usgs.gov/nwis/help?output_formats_help#streamflow_measurement_data}
for help on the columns and codes. for help on the columns and codes.
......
% Generated by roxygen2 (4.1.1): do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readNWISpCode.r % Please edit documentation in R/readNWISpCode.r
\name{readNWISpCode} \name{readNWISpCode}
\alias{readNWISpCode} \alias{readNWISpCode}
...@@ -8,11 +8,11 @@ readNWISpCode(parameterCd) ...@@ -8,11 +8,11 @@ readNWISpCode(parameterCd)
} }
\arguments{ \arguments{
\item{parameterCd}{character of USGS parameter codes (or multiple parameter codes). These are 5 digit number codes, \item{parameterCd}{character of USGS parameter codes (or multiple parameter codes). These are 5 digit number codes,
more information can be found here: \url{http://help.waterdata.usgs.gov/}. To get a more information can be found here: \url{http://help.waterdata.usgs.gov/}. To get a
complete list of all current parameter codes in the USGS, use "all" as the input.} complete list of all current parameter codes in the USGS, use "all" as the input.}
} }
\value{ \value{
parameterData data frame with the following information: parameterData data frame with the following information:
\tabular{lll}{ \tabular{lll}{
Name \tab Type \tab Description\cr Name \tab Type \tab Description\cr
parameter_cd \tab character \tab 5-digit USGS parameter code \cr parameter_cd \tab character \tab 5-digit USGS parameter code \cr
......
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