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

Merge pull request #87 from ldecicco-USGS/master

Updated documentation
parents bf2e6cf8 208cea01
No related branches found
Tags v2.1.1
No related merge requests found
#' Raw Data Import for USGS NWIS Data
#' Daily Value USGS NWIS Data Retrieval
#'
#' Imports data from NWIS web service. This function gets the data from here: \url{http://waterservices.usgs.gov/}
#' Information on parameter and statistics codes can be found here: \url{http://help.waterdata.usgs.gov}
......
......@@ -24,6 +24,7 @@
#'SED \tab Sediment \cr
#'POP \tab Population/community \cr
#'}
#'If more than one parameter group is requested, only sites that data for all requested groups are returned.
#'
#' @param siteNumbers character of USGS site numbers. This is usually an 8 digit number
#' @param parameterCd character that contains the code for a parameter
......@@ -165,7 +166,8 @@ readNWISqw <- function (siteNumbers,parameterCd,startDate="",endDate="",
attr(data, "siteInfo") <- siteInfo
attr(data, "variableInfo") <- varInfo
attr(data, "statisticInfo") <- NULL
attr(data, "url") <- url
attr(data, "queryTime") <- Sys.time()
return (data)
}
#' Raw Data Import for Instantaneous USGS NWIS Data
#' Instantaneous value data retrieval from USGS (NWIS)
#'
#' Imports data from NWIS web service. This function gets the data from here: \url{http://waterservices.usgs.gov/}
#' A list of parameter codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/}
......@@ -65,7 +65,7 @@ readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz=""){
return (data)
}
#' Reads peak flow data from NWISweb.
#' Peak flow data from USGS (NWIS)
#'
#' Reads peak flow from NWISweb. Data is retrieved from \url{http://waterdata.usgs.gov/nwis}.
#'
......@@ -126,7 +126,7 @@ readNWISpeak <- function (siteNumbers,startDate="",endDate=""){
return (data)
}
#' Reads the current rating table for an active USGS streamgage.
#' Rating table for an active USGS streamgage retrieval
#'
#' Reads current rating table for an active USGS streamgage from NWISweb.
#' Data is retrieved from \url{http://waterdata.usgs.gov/nwis}.
......@@ -187,7 +187,7 @@ readNWISrating <- function (siteNumber,type="base"){
return (data)
}
#'Reads surface-water measurement data from NWISweb.
#'Surface-water measurement data retrieval from USGS (NWIS)
#'
#'Reads surface-water measurement data from NWISweb. Data is retrieved from \url{http://waterdata.usgs.gov/nwis}.
#'See \url{http://waterdata.usgs.gov/usa/nwis/sw} for details about surface water.
......@@ -248,7 +248,7 @@ readNWISmeas <- function (siteNumbers,startDate="",endDate="", tz=""){
return (data)
}
#' Reads groundwater level measurements from NWISweb.
#' Groundwater level measurements retrieval from USGS (NWIS)
#'
#' 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}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISdv.r
\name{readNWISdv}
\alias{readNWISdv}
\title{Raw Data Import for USGS NWIS Data}
\title{Daily Value USGS NWIS Data Retrieval}
\usage{
readNWISdv(siteNumber, parameterCd, startDate = "", endDate = "",
statCd = "00003")
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISunit.r
\name{readNWISgwl}
\alias{readNWISgwl}
\title{Reads groundwater level measurements from NWISweb.}
\title{Groundwater level measurements retrieval from USGS (NWIS)}
\usage{
readNWISgwl(siteNumbers, startDate = "", endDate = "")
}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISunit.r
\name{readNWISmeas}
\alias{readNWISmeas}
\title{Reads surface-water measurement data from NWISweb.}
\title{Surface-water measurement data retrieval from USGS (NWIS)}
\usage{
readNWISmeas(siteNumbers, startDate = "", endDate = "", tz = "")
}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISunit.r
\name{readNWISpeak}
\alias{readNWISpeak}
\title{Reads peak flow data from NWISweb.}
\title{Peak flow data from USGS (NWIS)}
\usage{
readNWISpeak(siteNumbers, startDate = "", endDate = "")
}
......
......@@ -82,6 +82,7 @@ RAD \tab Radiochemical \cr
SED \tab Sediment \cr
POP \tab Population/community \cr
}
If more than one parameter group is requested, only sites that data for all requested groups are returned.
}
\examples{
siteNumbers <- c('04024430','04024000')
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISunit.r
\name{readNWISrating}
\alias{readNWISrating}
\title{Reads the current rating table for an active USGS streamgage.}
\title{Rating table for an active USGS streamgage retrieval}
\usage{
readNWISrating(siteNumber, type = "base")
}
......
......@@ -2,7 +2,7 @@
% Please edit documentation in R/readNWISunit.r
\name{readNWISuv}
\alias{readNWISuv}
\title{Raw Data Import for Instantaneous USGS NWIS Data}
\title{Instantaneous value data retrieval from USGS (NWIS)}
\usage{
readNWISuv(siteNumbers, parameterCd, startDate = "", endDate = "",
tz = "")
......
......@@ -79,11 +79,6 @@ test_that("NWIS qw tests", {
startDate,endDate)
expect_is(rawNWISNutrients$startDateTime, 'POSIXct')
groups <- c("NUT","OPE")
rawNWISNutOpe <- readNWISqw(siteNumbers,groups,
startDate,endDate)
expect_is(rawNWISNutOpe$startDateTime, 'POSIXct')
})
context("dv")
......
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