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

Added UTC option.

parent 3d6745ac
No related branches found
No related tags found
1 merge request!117More tz and state code updates.
...@@ -105,6 +105,11 @@ readNWISdata <- function(service="dv", ...){ ...@@ -105,6 +105,11 @@ readNWISdata <- function(service="dv", ...){
values["stateCd"] <- stateCdLookup(values["stateCd"], "postal") values["stateCd"] <- stateCdLookup(values["stateCd"], "postal")
} }
if("statecode" %in% names(values)){
values["statecode"] <- stateCdLookup(values["statecode"], "postal")
names(values)[names(values) == "statecode"] <- "stateCd"
}
if(service == "iv"){ if(service == "iv"){
baseURL <- "http://nwis.waterservices.usgs.gov/nwis/" baseURL <- "http://nwis.waterservices.usgs.gov/nwis/"
} else if (service == "qwdata"){ } else if (service == "qwdata"){
...@@ -138,8 +143,9 @@ readNWISdata <- function(service="dv", ...){ ...@@ -138,8 +143,9 @@ readNWISdata <- function(service="dv", ...){
"America/Denver","America/Los_Angeles", "America/Denver","America/Los_Angeles",
"America/Anchorage","America/Honolulu", "America/Anchorage","America/Honolulu",
"America/Jamaica","America/Managua", "America/Jamaica","America/Managua",
"America/Phoenix","America/Metlakatla") "America/Phoenix","America/Metlakatla","UTC")
tz <- match.arg(tz, rTZ) tz <- match.arg(tz, rTZ)
if("UTC" == tz) tz <- ""
} }
values <- values[!(names(values) %in% "tz")] values <- values[!(names(values) %in% "tz")]
} else { } else {
......
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