Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance scheduled for Thursday, May 26th at 15:00 MST. Expected downtime <1 hour.
Open sidebar
Water
dataRetrieval
Commits
7acb0451
Commit
7acb0451
authored
Sep 09, 2021
by
Laura A DeCicco
Browse files
Try the try
parent
895a6778
Changes
14
Hide whitespace changes
Inline
Side-by-side
.github/workflows/R-CMD-check.yaml
View file @
7acb0451
...
@@ -20,9 +20,7 @@ jobs:
...
@@ -20,9 +20,7 @@ jobs:
config
:
config
:
-
{
os
:
macOS-latest
,
r
:
'
release'
}
-
{
os
:
macOS-latest
,
r
:
'
release'
}
-
{
os
:
windows-latest
,
r
:
'
release'
}
-
{
os
:
windows-latest
,
r
:
'
release'
}
-
{
os
:
ubuntu-16.04
,
r
:
'
devel'
,
rspm
:
"
https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"
,
http-user-agent
:
"
R/4.0.0
(ubuntu-16.04)
R
(4.0.0
x86_64-pc-linux-gnu
x86_64
linux-gnu)
on
GitHub
Actions"
}
-
{
os
:
ubuntu-18.04
,
r
:
'
release'
,
rspm
:
"
https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"
}
-
{
os
:
ubuntu-16.04
,
r
:
'
release'
,
rspm
:
"
https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"
}
-
{
os
:
ubuntu-16.04
,
r
:
'
oldrel'
,
rspm
:
"
https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"
}
env
:
env
:
R_REMOTES_NO_ERRORS_FROM_WARNINGS
:
true
R_REMOTES_NO_ERRORS_FROM_WARNINGS
:
true
...
...
R/readNWISpCode.r
View file @
7acb0451
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#' @export
#' @export
#' @seealso \code{\link{importRDB1}}
#' @seealso \code{\link{importRDB1}}
#' @examples
#' @examples
#' if(!httr::http_error("https://waterservices.usgs.gov")){
#' paramINFO <- readNWISpCode(c('01075','00060','00931'))
#' paramINFO <- readNWISpCode(c('01075','00060','00931'))
#' paramINFO <- readNWISpCode(c('01075','00060','00931', NA))
#' paramINFO <- readNWISpCode(c('01075','00060','00931', NA))
readNWISpCode
<-
function
(
parameterCd
){
readNWISpCode
<-
function
(
parameterCd
){
...
...
R/readNWISsite.r
View file @
7acb0451
...
@@ -61,8 +61,10 @@
...
@@ -61,8 +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
){
...
...
R/readNWISunit.r
View file @
7acb0451
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +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())
...
@@ -68,8 +69,8 @@
...
@@ -68,8 +69,8 @@
#' # 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"
){
if
(
as.character
(
startDate
)
==
""
||
(
as.Date
(
startDate
)
<=
Sys.Date
()
-120
)){
if
(
as.character
(
startDate
)
==
""
||
(
as.Date
(
startDate
)
<=
Sys.Date
()
-120
)){
...
...
R/whatNWISData.r
View file @
7acb0451
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +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")
...
@@ -58,6 +59,7 @@
...
@@ -58,6 +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
){
...
...
R/whatNWISsites.R
View file @
7acb0451
...
@@ -30,8 +30,10 @@
...
@@ -30,8 +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
(
...
){
...
...
R/whatWQPdata.R
View file @
7acb0451
...
@@ -3,10 +3,12 @@
...
@@ -3,10 +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
(
...
){
...
...
R/whatWQPsites.R
View file @
7acb0451
...
@@ -58,12 +58,14 @@
...
@@ -58,12 +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
(
...
){
...
...
man/readNWISpCode.Rd
View file @
7acb0451
...
@@ -27,10 +27,6 @@ parameterData data frame with the following information:
...
@@ -27,10 +27,6 @@ parameterData data frame with the following information:
Imports data from NWIS about meaured parameter based on user-supplied parameter code or codes.
Imports data from NWIS about meaured parameter based on user-supplied parameter code or codes.
This function gets the data from here: \url{https://nwis.waterdata.usgs.gov/nwis/pmcodes}
This function gets the data from here: \url{https://nwis.waterdata.usgs.gov/nwis/pmcodes}
}
}
\examples{
paramINFO <- readNWISpCode(c('01075','00060','00931'))
paramINFO <- readNWISpCode(c('01075','00060','00931', NA))
}
\seealso{
\seealso{
\code{\link{importRDB1}}
\code{\link{importRDB1}}
}
}
...
...
man/readNWISsite.Rd
View file @
7acb0451
...
@@ -70,8 +70,10 @@ Imports data from USGS site file site. This function gets data from here: \url{h
...
@@ -70,8 +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}
...
...
man/readNWISuv.Rd
View file @
7acb0451
...
@@ -65,6 +65,7 @@ parameterCd <- '00060'
...
@@ -65,6 +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())
...
@@ -79,8 +80,8 @@ centralTime <- readNWISuv(site_id,parameterCd,
...
@@ -79,8 +80,8 @@ 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{
\code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}
\code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}
...
...
man/whatNWISdata.Rd
View file @
7acb0451
...
@@ -61,6 +61,7 @@ for more information.
...
@@ -61,6 +61,7 @@ for more information.
}
}
\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")
...
@@ -68,6 +69,7 @@ uvDataMulti <- whatNWISdata(siteNumber = c('05114000','09423350'),service=c("uv"
...
@@ -68,6 +69,7 @@ uvDataMulti <- whatNWISdata(siteNumber = c('05114000','09423350'),service=c("uv"
flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv",
flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv",
parameterCd = c("00060","00010"),
parameterCd = c("00060","00010"),
statCd = "00003")
statCd = "00003")
})
}
}
}
}
\keyword{USGS}
\keyword{USGS}
...
...
man/whatNWISsites.Rd
View file @
7acb0451
...
@@ -36,7 +36,9 @@ Mapper format is used
...
@@ -36,7 +36,9 @@ Mapper format is used
}
}
\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")
})
}
}
}
}
man/wqpSpecials.Rd
View file @
7acb0451
...
@@ -73,10 +73,12 @@ The \code{readWQPsummary} function has
...
@@ -73,10 +73,12 @@ The \code{readWQPsummary} function has
}
}
\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)
})
}
}
\donttest{
\donttest{
...
@@ -85,12 +87,14 @@ sites <- whatWQPmetrics(countycode="US:55:025",siteType=type)
...
@@ -85,12 +87,14 @@ sites <- whatWQPmetrics(countycode="US:55:025",siteType=type)
lakeSites <- whatWQPmetrics(siteType = "Lake, Reservoir, Impoundment", statecode = "US:55")
lakeSites <- whatWQPmetrics(siteType = "Lake, Reservoir, Impoundment", statecode = "US:55")
}
}
\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)
})
}
}
\donttest{
\donttest{
site1 <- readWQPsummary(siteid="USGS-07144100",
site1 <- readWQPsummary(siteid="USGS-07144100",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment