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

Switched format.

parent 60266cf3
No related branches found
No related tags found
1 merge request!39Overhaul of function names. Move some functionality to EGRET.
...@@ -20,13 +20,21 @@ readNWISdata <- function(service="dv", ...){ ...@@ -20,13 +20,21 @@ readNWISdata <- function(service="dv", ...){
urlCall <- paste(paste(names(values),values,sep="="),collapse="&") urlCall <- paste(paste(names(values),values,sep="="),collapse="&")
if(service %in% c("dv","iv","gwlevels")){
format <- "waterml"
} else {
format <- "rdb1,1"
}
baseURL <- paste0("http://waterservices.usgs.gov/nwis/",service,"/?format=rdb&") baseURL <- paste0("http://waterservices.usgs.gov/nwis/",service,"/?format=",format,"&")
urlCall <- paste0(baseURL,urlCall) urlCall <- paste0(baseURL,urlCall)
if(service=="qwdata"){ if(service=="qwdata"){
urlCall <- paste0(urlCall,"&siteOutput=expanded") urlCall <- paste0(urlCall,"&siteOutput=expanded")
retval <- importRDB1(urlCall)
} else {
retval <- importWaterML1(urlCall)
} }
retval <- importRDB1(urlCall)
return(retval) return(retval)
} }
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