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

Sites.

parent fa7bdbd2
No related branches found
No related tags found
1 merge request!39Overhaul of function names. Move some functionality to EGRET.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#' A list of parameter codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/} #' A list of parameter codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/}
#' A list of statistic codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table} #' A list of statistic codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table}
#' #'
#' @param siteNumber string USGS site number. This is usually an 8 digit number #' @param siteNumbers string USGS site number (or multiple sites). This is usually an 8 digit number
#' @param parameterCd string USGS parameter code. This is usually an 5 digit number. #' @param parameterCd string USGS parameter code. This is usually an 5 digit number.
#' @param startDate string starting date for data retrieval in the form YYYY-MM-DD. #' @param startDate string starting date for data retrieval in the form YYYY-MM-DD.
#' @param endDate string ending date for data retrieval in the form YYYY-MM-DD. #' @param endDate string ending date for data retrieval in the form YYYY-MM-DD.
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#' timeZoneChange <- readNWISuv(c('04024430','04024000'),parameterCd, #' timeZoneChange <- readNWISuv(c('04024430','04024000'),parameterCd,
#' "2013-11-03","2013-11-03") #' "2013-11-03","2013-11-03")
#' firstSite <- timeZoneChange[timeZoneChange$site_no == '04024430',] #' firstSite <- timeZoneChange[timeZoneChange$site_no == '04024430',]
readNWISuv <- function (siteNumber,parameterCd,startDate="",endDate="", tz=""){ readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz=""){
url <- constructNWISURL(siteNumber,parameterCd,startDate,endDate,"uv",format="xml") url <- constructNWISURL(siteNumbers,parameterCd,startDate,endDate,"uv",format="xml")
data <- importWaterML1(url,asDateTime=TRUE,tz=tz) data <- importWaterML1(url,asDateTime=TRUE,tz=tz)
...@@ -104,14 +104,16 @@ readNWISmeas <- function (siteNumber,startDate="",endDate="", tz=""){ ...@@ -104,14 +104,16 @@ readNWISmeas <- function (siteNumber,startDate="",endDate="", tz=""){
#' 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. #' depending on the year that the data was collected.
#' #'
#' @param siteNumber string USGS site number. This is usually an 8 digit number #' @param siteNumbers string USGS site number (or multiple sites). This is usually an 8 digit number
#' @param startDate string starting date for data retrieval in the form YYYY-MM-DD. #' @param startDate string starting date for data retrieval in the form YYYY-MM-DD.
#' @param endDate string ending date for data retrieval in the form YYYY-MM-DD. #' @param endDate string ending date for data retrieval in the form YYYY-MM-DD.
#' @export #' @export
#' @examples #' @examples
#' siteNumber <- "434400121275801" #' siteNumber <- "434400121275801"
#' data <- readNWISgwl(siteNumber, '','') #' data <- readNWISgwl(siteNumber, '','')
readNWISgwl <- function (siteNumber,startDate="",endDate=""){ #' sites <- c("434400121275801", "375907091432201")
#' data2 <- readNWISgwl(sites, '','')
readNWISgwl <- function (siteNumbers,startDate="",endDate=""){
url <- constructNWISURL(siteNumber,NA,startDate,endDate,"gwlevels",format="wml1") url <- constructNWISURL(siteNumber,NA,startDate,endDate,"gwlevels",format="wml1")
data <- importWaterML1(url,asDateTime=FALSE) data <- importWaterML1(url,asDateTime=FALSE)
......
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