Commit ad557e7b authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Try again

parent 7acb0451
Package: dataRetrieval Package: dataRetrieval
Type: Package Type: Package
Title: Retrieval Functions for USGS and EPA Hydrologic and Water Quality Data Title: Retrieval Functions for USGS and EPA Hydrologic and Water Quality Data
Version: 2.7.9.0001 Version: 2.7.10
Authors@R: c( Authors@R: c(
person("Laura", "DeCicco", role = c("aut","cre"), person("Laura", "DeCicco", role = c("aut","cre"),
email = "ldecicco@usgs.gov", email = "ldecicco@usgs.gov",
......
dataRetrieval 2.8.10
==================
* Functions that come back from a server that had and error now return with a message and NULL rather than error.
dataRetrieval 2.7.9 dataRetrieval 2.7.9
=================== ===================
* Fix bug caused by changes in NLDI services * Fix bug caused by changes in NLDI services
......
...@@ -230,7 +230,6 @@ valid_ask = function(all, type) { ...@@ -230,7 +230,6 @@ valid_ask = function(all, type) {
#' # Find Features / Define origin features #' # Find Features / Define origin features
#' #'
#' ## Find feature by COMID #' ## Find feature by COMID
#' if(!httr::http_error("https://labs.waterdata.usgs.gov/api/nldi/linked-data")){
#' findNLDI(comid = 101) #' findNLDI(comid = 101)
#' #'
#' ## Find feature by NWIS ID #' ## Find feature by NWIS ID
...@@ -268,7 +267,6 @@ valid_ask = function(all, type) { ...@@ -268,7 +267,6 @@ valid_ask = function(all, type) {
#' ## Limit search to 50 km #' ## Limit search to 50 km
#' findNLDI(comid = 101, nav = "DM", find = c("nwis", "wqp", "flowlines"), distance_km = 50) #' findNLDI(comid = 101, nav = "DM", find = c("nwis", "wqp", "flowlines"), distance_km = 50)
#'} #'}
#'}
findNLDI <- function(comid = NULL, findNLDI <- function(comid = NULL,
nwis = NULL, nwis = NULL,
wqp = NULL, wqp = NULL,
......
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
#' property <- '00060' #' property <- '00060'
#' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv') #' obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
#' \donttest{ #' \donttest{
#' if(!httr::http_error(obs_url)){
#' rawData <- getWebServiceData(obs_url) #' rawData <- getWebServiceData(obs_url)
#' } #' }
#' }
getWebServiceData <- function(obs_url, ...){ getWebServiceData <- function(obs_url, ...){
if (!curl::has_internet()) { if (!curl::has_internet()) {
...@@ -35,10 +33,12 @@ getWebServiceData <- function(obs_url, ...){ ...@@ -35,10 +33,12 @@ getWebServiceData <- function(obs_url, ...){
response400 <- httr::content(returnedList, type="text", encoding = "UTF-8") response400 <- httr::content(returnedList, type="text", encoding = "UTF-8")
statusReport <- xml_text(xml_child(read_xml(response400), 2)) # making assumption that - body is second node statusReport <- xml_text(xml_child(read_xml(response400), 2)) # making assumption that - body is second node
statusMsg <- gsub(pattern=", server=.*", replacement="", x = statusReport) statusMsg <- gsub(pattern=", server=.*", replacement="", x = statusReport)
stop(statusMsg) message(statusMsg)
return(invisible(NULL))
} else if(httr::status_code(returnedList) != 200){ } else if(httr::status_code(returnedList) != 200){
message("For: ", obs_url,"\n") message("For: ", obs_url,"\n")
httr::stop_for_status(returnedList) httr::message_for_status(returnedList)
return(invisible(NULL))
} else { } else {
headerInfo <- httr::headers(returnedList) headerInfo <- httr::headers(returnedList)
......
...@@ -52,34 +52,33 @@ ...@@ -52,34 +52,33 @@
#' obs_url <- constructNWISURL(site_id,property, #' obs_url <- constructNWISURL(site_id,property,
#' startDate,endDate,"dv",format="tsv") #' startDate,endDate,"dv",format="tsv")
#' \donttest{ #' \donttest{
#' if(!httr::http_error(obs_url)){ #' data <- importRDB1(obs_url)
#' data <- importRDB1(obs_url) #'
#' }
#' #'
#' urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"), #' urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"),
#' startDate,endDate,"dv",statCd=c("00003","00001"),"tsv") #' startDate,endDate,"dv",statCd=c("00003","00001"),"tsv")
#' if(!httr::http_error(urlMultiPcodes)){ #'
#' multiData <- importRDB1(urlMultiPcodes) #' multiData <- importRDB1(urlMultiPcodes)
#' } #'
#' unitDataURL <- constructNWISURL(site_id,property, #' unitDataURL <- constructNWISURL(site_id,property,
#' "2020-10-30","2020-11-01","uv",format="tsv") #includes timezone switch #' "2020-10-30","2020-11-01","uv",format="tsv") #includes timezone switch
#' if(!httr::http_error(unitDataURL)){ #'
#' unitData <- importRDB1(unitDataURL, asDateTime=TRUE) #' unitData <- importRDB1(unitDataURL, asDateTime=TRUE)
#' } #'
#' qwURL <- constructNWISURL(c('04024430','04024000'), #' qwURL <- constructNWISURL(c('04024430','04024000'),
#' c('34247','30234','32104','34220'), #' c('34247','30234','32104','34220'),
#' "2010-11-03","","qw",format="rdb") #' "2010-11-03","","qw",format="rdb")
#' if(!httr::http_error(qwURL)){ #'
#' qwData <- importRDB1(qwURL, asDateTime=TRUE, tz="America/Chicago") #' qwData <- importRDB1(qwURL, asDateTime=TRUE, tz="America/Chicago")
#' } #'
#' iceSite <- '04024000' #' iceSite <- '04024000'
#' start <- "2015-11-09" #' start <- "2015-11-09"
#' end <- "2015-11-24" #' end <- "2015-11-24"
#' urlIce <- constructNWISURL(iceSite,"00060",start, end,"uv",format="tsv") #' urlIce <- constructNWISURL(iceSite,"00060",start, end,"uv",format="tsv")
#' if(!httr::http_error(urlIce)){ #'
#' ice <- importRDB1(urlIce, asDateTime=TRUE) #' ice <- importRDB1(urlIce, asDateTime=TRUE)
#' iceNoConvert <- importRDB1(urlIce, convertType=FALSE) #' iceNoConvert <- importRDB1(urlIce, convertType=FALSE)
#' } #'
#' } #' }
#' # User file: #' # User file:
#' filePath <- system.file("extdata", package="dataRetrieval") #' filePath <- system.file("extdata", package="dataRetrieval")
......
...@@ -22,20 +22,17 @@ ...@@ -22,20 +22,17 @@
#' \donttest{ #' \donttest{
#' rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '') #' rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '')
#' #'
#' if(!httr::http_error(rawSampleURL)){ #' rawSample <- importWQP(rawSampleURL)
#' rawSample <- importWQP(rawSampleURL)
#' }
#' #'
#' rawSampleURL_NoZip <- constructWQPURL('USGS-01594440','01075', '', '', zip=FALSE) #' rawSampleURL_NoZip <- constructWQPURL('USGS-01594440','01075', '', '', zip=FALSE)
#' if(!httr::http_error(rawSampleURL_NoZip)){ #'
#' rawSample2 <- importWQP(rawSampleURL_NoZip, zip=FALSE) #' rawSample2 <- importWQP(rawSampleURL_NoZip, zip=FALSE)
#' } #'
#' #'
#' STORETex <- constructWQPURL('WIDNR_WQX-10032762','Specific conductance', '', '') #' STORETex <- constructWQPURL('WIDNR_WQX-10032762','Specific conductance', '', '')
#' if(!httr::http_error(STORETex)){ #'
#' STORETdata <- importWQP(STORETex) #' STORETdata <- importWQP(STORETex)
#' }
#' } #' }
#'
importWQP <- function(obs_url, zip=TRUE, tz="UTC", importWQP <- function(obs_url, zip=TRUE, tz="UTC",
csv=FALSE){ csv=FALSE){
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' # Examples not run for time considerations #' # Examples not run for time considerations
#' if(!httr::http_error("https://waterservices.usgs.gov")){ #'
#' dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv") #' dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv")
#' instFlow <- readNWISdata(sites="05114000", service="iv", #' instFlow <- readNWISdata(sites="05114000", service="iv",
#' parameterCd="00060", #' parameterCd="00060",
...@@ -117,10 +117,7 @@ ...@@ -117,10 +117,7 @@
#' va_counties <- c("51001","51003","51005","51007","51009","51011","51013","51015") #' va_counties <- c("51001","51003","51005","51007","51009","51011","51013","51015")
#' va_counties_data <- readNWISdata(startDate = "2015-01-01", endDate = "2015-12-31", #' va_counties_data <- readNWISdata(startDate = "2015-01-01", endDate = "2015-12-31",
#' parameterCd = "00060", countycode = va_counties) #' parameterCd = "00060", countycode = va_counties)
#' } #'
#'
#'
#' if(!httr::http_error("https://nwis.waterdata.usgs.gov")){
#' site_id <- '01594440' #' site_id <- '01594440'
#' rating_curve <- readNWISdata(service = "rating", site_no = site_id, file_type="base") #' rating_curve <- readNWISdata(service = "rating", site_no = site_id, file_type="base")
#' all_sites_base <- readNWISdata(service = "rating", file_type="base") #' all_sites_base <- readNWISdata(service = "rating", file_type="base")
...@@ -132,7 +129,7 @@ ...@@ -132,7 +129,7 @@
#' site_no = c("01594440","040851325"), #' site_no = c("01594440","040851325"),
#' range_selection = "data_range") #' range_selection = "data_range")
#' #'
#' } #'
#' } #' }
readNWISdata <- function(..., asDateTime=TRUE,convertType=TRUE,tz="UTC"){ readNWISdata <- function(..., asDateTime=TRUE,convertType=TRUE,tz="UTC"){
......
...@@ -61,10 +61,10 @@ ...@@ -61,10 +61,10 @@
#' @export #' @export
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' try({ #'
#' siteINFO <- readNWISsite('05114000') #' siteINFO <- readNWISsite('05114000')
#' siteINFOMulti <- readNWISsite(c('05114000','09423350')) #' siteINFOMulti <- readNWISsite(c('05114000','09423350'))
#' }) #'
#' } #' }
readNWISsite <- function(siteNumbers){ readNWISsite <- function(siteNumbers){
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#' startDate <- "2014-10-10" #' startDate <- "2014-10-10"
#' endDate <- "2014-10-10" #' endDate <- "2014-10-10"
#' \donttest{ #' \donttest{
#' try({ #'
#' rawData <- readNWISuv(site_id,parameterCd,startDate,endDate) #' rawData <- readNWISuv(site_id,parameterCd,startDate,endDate)
#' #'
#' rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date()) #' rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date())
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
#' # Adding 'Z' to the time indicates to the web service to call the data with UTC time: #' # Adding 'Z' to the time indicates to the web service to call the data with UTC time:
#' GMTdata <- readNWISuv(site_id,parameterCd, #' GMTdata <- readNWISuv(site_id,parameterCd,
#' "2014-10-10T00:00Z", "2014-10-10T23:59Z") #' "2014-10-10T00:00Z", "2014-10-10T23:59Z")
#' }) #'
#' } #' }
readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz="UTC"){ readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz="UTC"){
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#' @export #' @export
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' try({ #'
#' availableData <- whatNWISdata(siteNumber = '05114000') #' availableData <- whatNWISdata(siteNumber = '05114000')
#' # To find just unit value ('instantaneous') data: #' # To find just unit value ('instantaneous') data:
#' uvData <- whatNWISdata(siteNumber = '05114000',service="uv") #' uvData <- whatNWISdata(siteNumber = '05114000',service="uv")
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#' flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv", #' flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv",
#' parameterCd = c("00060","00010"), #' parameterCd = c("00060","00010"),
#' statCd = "00003") #' statCd = "00003")
#' }) #'
#' } #' }
whatNWISdata <- function(..., convertType=TRUE){ whatNWISdata <- function(..., convertType=TRUE){
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
#' #'
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' try({ #'
#' siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665") #' siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665")
#' oneSite <- whatNWISsites(sites="05114000") #' oneSite <- whatNWISsites(sites="05114000")
#' }) #'
#' } #' }
whatNWISsites <- function(...){ whatNWISsites <- function(...){
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
#' @export #' @export
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' try({ #'
#' site1 <- whatWQPsamples(siteid="USGS-01594440") #' site1 <- whatWQPsamples(siteid="USGS-01594440")
#' #'
#' type <- "Stream" #' type <- "Stream"
#' sites <- whatWQPsamples(countycode="US:55:025",siteType=type) #' sites <- whatWQPsamples(countycode="US:55:025",siteType=type)
#' }) #'
#' } #' }
whatWQPsamples <- function(...){ whatWQPsamples <- function(...){
......
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
#' @seealso whatNWISdata #' @seealso whatNWISdata
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' try({ #'
#' site1 <- whatWQPsites(siteid="USGS-01594440") #' site1 <- whatWQPsites(siteid="USGS-01594440")
#' #'
#' type <- "Stream" #' type <- "Stream"
#' sites <- whatWQPsites(countycode="US:55:025", #' sites <- whatWQPsites(countycode="US:55:025",
#' characteristicName = "Phosphorus", #' characteristicName = "Phosphorus",
#' siteType=type) #' siteType=type)
#' }) #'
#' } #' }
whatWQPsites <- function(...){ whatWQPsites <- function(...){
......
...@@ -69,7 +69,6 @@ arguments: comid, nwis, huc12, wqp, location, and start. ...@@ -69,7 +69,6 @@ arguments: comid, nwis, huc12, wqp, location, and start.
# Find Features / Define origin features # Find Features / Define origin features
## Find feature by COMID ## Find feature by COMID
if(!httr::http_error("https://labs.waterdata.usgs.gov/api/nldi/linked-data")){
findNLDI(comid = 101) findNLDI(comid = 101)
## Find feature by NWIS ID ## Find feature by NWIS ID
...@@ -108,5 +107,4 @@ if(!httr::http_error("https://labs.waterdata.usgs.gov/api/nldi/linked-data")){ ...@@ -108,5 +107,4 @@ if(!httr::http_error("https://labs.waterdata.usgs.gov/api/nldi/linked-data")){
findNLDI(comid = 101, nav = "DM", find = c("nwis", "wqp", "flowlines"), distance_km = 50) findNLDI(comid = 101, nav = "DM", find = c("nwis", "wqp", "flowlines"), distance_km = 50)
} }
} }
}
\keyword{nldi} \keyword{nldi}
...@@ -26,8 +26,6 @@ offering <- '00003' ...@@ -26,8 +26,6 @@ offering <- '00003'
property <- '00060' property <- '00060'
obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv') obs_url <- constructNWISURL(siteNumber,property,startDate,endDate,'dv')
\donttest{ \donttest{
if(!httr::http_error(obs_url)){
rawData <- getWebServiceData(obs_url) rawData <- getWebServiceData(obs_url)
} }
} }
}
...@@ -64,34 +64,33 @@ property <- "00060" ...@@ -64,34 +64,33 @@ property <- "00060"
obs_url <- constructNWISURL(site_id,property, obs_url <- constructNWISURL(site_id,property,
startDate,endDate,"dv",format="tsv") startDate,endDate,"dv",format="tsv")
\donttest{ \donttest{
if(!httr::http_error(obs_url)){ data <- importRDB1(obs_url)
data <- importRDB1(obs_url)
}
urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"), urlMultiPcodes <- constructNWISURL("04085427",c("00060","00010"),
startDate,endDate,"dv",statCd=c("00003","00001"),"tsv") startDate,endDate,"dv",statCd=c("00003","00001"),"tsv")
if(!httr::http_error(urlMultiPcodes)){
multiData <- importRDB1(urlMultiPcodes) multiData <- importRDB1(urlMultiPcodes)
}
unitDataURL <- constructNWISURL(site_id,property, unitDataURL <- constructNWISURL(site_id,property,
"2020-10-30","2020-11-01","uv",format="tsv") #includes timezone switch "2020-10-30","2020-11-01","uv",format="tsv") #includes timezone switch
if(!httr::http_error(unitDataURL)){
unitData <- importRDB1(unitDataURL, asDateTime=TRUE) unitData <- importRDB1(unitDataURL, asDateTime=TRUE)
}
qwURL <- constructNWISURL(c('04024430','04024000'), qwURL <- constructNWISURL(c('04024430','04024000'),
c('34247','30234','32104','34220'), c('34247','30234','32104','34220'),
"2010-11-03","","qw",format="rdb") "2010-11-03","","qw",format="rdb")
if(!httr::http_error(qwURL)){
qwData <- importRDB1(qwURL, asDateTime=TRUE, tz="America/Chicago") qwData <- importRDB1(qwURL, asDateTime=TRUE, tz="America/Chicago")
}
iceSite <- '04024000' iceSite <- '04024000'
start <- "2015-11-09" start <- "2015-11-09"
end <- "2015-11-24" end <- "2015-11-24"
urlIce <- constructNWISURL(iceSite,"00060",start, end,"uv",format="tsv") urlIce <- constructNWISURL(iceSite,"00060",start, end,"uv",format="tsv")
if(!httr::http_error(urlIce)){
ice <- importRDB1(urlIce, asDateTime=TRUE) ice <- importRDB1(urlIce, asDateTime=TRUE)
iceNoConvert <- importRDB1(urlIce, convertType=FALSE) iceNoConvert <- importRDB1(urlIce, convertType=FALSE)
}
} }
# User file: # User file:
filePath <- system.file("extdata", package="dataRetrieval") filePath <- system.file("extdata", package="dataRetrieval")
......
...@@ -32,20 +32,17 @@ Imports data from the Water Quality Portal based on a specified url. ...@@ -32,20 +32,17 @@ Imports data from the Water Quality Portal based on a specified url.
\donttest{ \donttest{
rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '') rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '')
if(!httr::http_error(rawSampleURL)){ rawSample <- importWQP(rawSampleURL)
rawSample <- importWQP(rawSampleURL)
}
rawSampleURL_NoZip <- constructWQPURL('USGS-01594440','01075', '', '', zip=FALSE) rawSampleURL_NoZip <- constructWQPURL('USGS-01594440','01075', '', '', zip=FALSE)
if(!httr::http_error(rawSampleURL_NoZip)){
rawSample2 <- importWQP(rawSampleURL_NoZip, zip=FALSE) rawSample2 <- importWQP(rawSampleURL_NoZip, zip=FALSE)
}
#'
STORETex <- constructWQPURL('WIDNR_WQX-10032762','Specific conductance', '', '') STORETex <- constructWQPURL('WIDNR_WQX-10032762','Specific conductance', '', '')
if(!httr::http_error(STORETex)){
STORETdata <- importWQP(STORETex) STORETdata <- importWQP(STORETex)
}
} }
} }
\seealso{ \seealso{
\code{\link{readWQPdata}}, \code{\link{readWQPqw}}, \code{\link{whatWQPsites}} \code{\link{readWQPdata}}, \code{\link{readWQPqw}}, \code{\link{whatWQPsites}}
......
...@@ -67,7 +67,7 @@ See examples below for ideas of constructing queries. ...@@ -67,7 +67,7 @@ See examples below for ideas of constructing queries.
\examples{ \examples{
\donttest{ \donttest{
# Examples not run for time considerations # Examples not run for time considerations
if(!httr::http_error("https://waterservices.usgs.gov")){
dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv") dataTemp <- readNWISdata(stateCd="OH",parameterCd="00010", service="dv")
instFlow <- readNWISdata(sites="05114000", service="iv", instFlow <- readNWISdata(sites="05114000", service="iv",
parameterCd="00060", parameterCd="00060",
...@@ -128,10 +128,7 @@ dailyStaffordVA <- readNWISdata(stateCd = "Virginia", ...@@ -128,10 +128,7 @@ dailyStaffordVA <- readNWISdata(stateCd = "Virginia",
va_counties <- c("51001","51003","51005","51007","51009","51011","51013","51015") va_counties <- c("51001","51003","51005","51007","51009","51011","51013","51015")
va_counties_data <- readNWISdata(startDate = "2015-01-01", endDate = "2015-12-31", va_counties_data <- readNWISdata(startDate = "2015-01-01", endDate = "2015-12-31",
parameterCd = "00060", countycode = va_counties) parameterCd = "00060", countycode = va_counties)
}
if(!httr::http_error("https://nwis.waterdata.usgs.gov")){
site_id <- '01594440' site_id <- '01594440'
rating_curve <- readNWISdata(service = "rating", site_no = site_id, file_type="base") rating_curve <- readNWISdata(service = "rating", site_no = site_id, file_type="base")
all_sites_base <- readNWISdata(service = "rating", file_type="base") all_sites_base <- readNWISdata(service = "rating", file_type="base")
...@@ -143,7 +140,7 @@ peak_data <- readNWISdata(service = "peak", ...@@ -143,7 +140,7 @@ peak_data <- readNWISdata(service = "peak",
site_no = c("01594440","040851325"), site_no = c("01594440","040851325"),
range_selection = "data_range") range_selection = "data_range")
}
} }
} }
\seealso{ \seealso{
......
...@@ -70,10 +70,10 @@ Imports data from USGS site file site. This function gets data from here: \url{h ...@@ -70,10 +70,10 @@ Imports data from USGS site file site. This function gets data from here: \url{h
} }
\examples{ \examples{
\donttest{ \donttest{
try({
siteINFO <- readNWISsite('05114000') siteINFO <- readNWISsite('05114000')
siteINFOMulti <- readNWISsite(c('05114000','09423350')) siteINFOMulti <- readNWISsite(c('05114000','09423350'))
})
} }
} }
\keyword{USGS} \keyword{USGS}
......
...@@ -65,7 +65,7 @@ parameterCd <- '00060' ...@@ -65,7 +65,7 @@ parameterCd <- '00060'
startDate <- "2014-10-10" startDate <- "2014-10-10"
endDate <- "2014-10-10" endDate <- "2014-10-10"
\donttest{ \donttest{
try({
rawData <- readNWISuv(site_id,parameterCd,startDate,endDate) rawData <- readNWISuv(site_id,parameterCd,startDate,endDate)
rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date()) rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date())
...@@ -80,7 +80,7 @@ centralTime <- readNWISuv(site_id,parameterCd, ...@@ -80,7 +80,7 @@ centralTime <- readNWISuv(site_id,parameterCd,
# Adding 'Z' to the time indicates to the web service to call the data with UTC time: # Adding 'Z' to the time indicates to the web service to call the data with UTC time:
GMTdata <- readNWISuv(site_id,parameterCd, GMTdata <- readNWISuv(site_id,parameterCd,
"2014-10-10T00:00Z", "2014-10-10T23:59Z") "2014-10-10T00:00Z", "2014-10-10T23:59Z")
})
} }
} }
\seealso{ \seealso{
......
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