Unverified Commit f6bad1dd authored by Laura A DeCicco's avatar Laura A DeCicco Committed by GitHub
Browse files

Merge pull request #530 from ldecicco-USGS/master

new pcode data
parents 329a1a64 42969cac
......@@ -4,7 +4,7 @@ dataRetrieval 2.7.6
* Adjusted Water Quality Portal (WPQ) URLs to follow new structure
* Fixed bug where some WQP results were being duplicated
* Added an argument to readWQPdata to ignore fetching site and parameter attributes.
* Fixed timezone bug in RDB requests that had mixed timezones.
dataRetrieval 2.7.5
==========
......
......@@ -133,6 +133,10 @@
#'
#' today <- readNWISdata(service="iv", startDate = Sys.Date(),
#' parameterCd = "00060", siteNumber = "05114000")
#'
#' peak_data <- readNWISdata(service = "peak",
#' site_no = c("01594440","040851325"),
#' range_selection = "data_range")
#'
#' }
readNWISdata <- function(..., asDateTime=TRUE,convertType=TRUE,tz="UTC"){
......@@ -327,7 +331,9 @@ readNWISdots <- function(...){
service <- "dv"
}
match.arg(service, c("dv","iv","iv_recent","gwlevels","site", "uv","qw","measurements","qwdata","stat","rating"))
match.arg(service, c("dv","iv","iv_recent","gwlevels",
"site", "uv","qw","measurements",
"qwdata","stat","rating", "peak"))
if(service == "uv"){
service <- "iv"
......@@ -409,7 +415,7 @@ readNWISdots <- function(...){
}
}
if(service %in% c("site","gwlevels","stat","rating")){
if(service %in% c("site", "gwlevels", "stat", "rating", "peak")){
format.default <- "rdb"
}
......
No preview for this file type
.onAttach <- function(libname, pkgname) {
if("package:reshape" %in% search()){
packageStartupMessage("Caution: The reshape package interferes with some functions in the dataRetrieval package.")
}
}
#' Retrieval functions for USGS and EPA data
#'
......@@ -29,7 +24,7 @@ NULL
#' List of USGS parameter codes
#'
#' Complete list of USGS parameter codes as of May 22, 2017.
#' Complete list of USGS parameter codes as of Oct. 13, 2020.
#'
#' @name parameterCdFile
#' @return parameterData data frame with information about USGS parameters.
......@@ -51,9 +46,12 @@ NULL
#'head(parameterCdFile[,1:2])
NULL
#' Data to convert USGS parameter code to characteristic names
#'
#' Data pulled from Water Quality Portal on November 25, 2014. The data was pulled from
#' Data pulled from Water Quality Portal on October 13, 2020. The data was pulled from
#' \url{https://www.waterqualitydata.us/public_srsnames?mimeType=json}.
#'
#' @name pCodeToName
......
......@@ -24,7 +24,7 @@ last_rev_dt \tab character \tab Latest revision of information\cr
}
}
\description{
Data pulled from Water Quality Portal on November 25, 2014. The data was pulled from
Data pulled from Water Quality Portal on October 13, 2020. The data was pulled from
\url{https://www.waterqualitydata.us/public_srsnames?mimeType=json}.
}
\examples{
......
......@@ -18,7 +18,7 @@ parameter_units \tab character \tab Parameter units\cr
}
}
\description{
Complete list of USGS parameter codes as of May 22, 2017.
Complete list of USGS parameter codes as of Oct. 13, 2020.
}
\examples{
head(parameterCdFile[,1:2])
......
......@@ -142,6 +142,10 @@ all_sites_24hrs <- readNWISdata(service = "rating", file_type="exsa", period = 2
today <- readNWISdata(service="iv", startDate = Sys.Date(),
parameterCd = "00060", siteNumber = "05114000")
peak_data <- readNWISdata(service = "peak",
site_no = c("01594440","040851325"),
range_selection = "data_range")
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment