Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dataRetrieval
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water
dataRetrieval
Commits
185c19c2
Commit
185c19c2
authored
10 years ago
by
Laura A DeCicco
Browse files
Options
Downloads
Patches
Plain Diff
Updated doc.
parent
de25c7a9
No related branches found
No related tags found
1 merge request
!11
Added generalized NWIS data function, and functionality to WQP raw pulls (datetimes).
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/getNWISData.r
+4
-3
4 additions, 3 deletions
R/getNWISData.r
man/getNWISData.Rd
+3
-2
3 additions, 2 deletions
man/getNWISData.Rd
with
7 additions
and
5 deletions
R/getNWISData.r
+
4
−
3
View file @
185c19c2
#' General Data Import from NWIS
#'
#' Returns data from the NWIS web service.
#' Arguments to the function should be based on \url{http://waterservices.usgs.gov
/rest/Site-Service.html#Service}
#' Arguments to the function should be based on \url{http://waterservices.usgs.gov
} service calls.
#'
#' @param service string
#' @param service string. Possible values are "iv" (for instantaneous), "dv" (for daily values), "gwlevels"
#' (for groundwater levels), and "qwdata" (for water quality)
#' @param \dots see \url{http://waterservices.usgs.gov/rest/Site-Service.html#Service} for a complete list of options
#' @keywords data import NWIS web service
#' @return retval dataframe
...
...
@@ -21,7 +22,7 @@ getNWISData <- function(service="dv", ...){
baseURL
<-
paste0
(
"http://waterservices.usgs.gov/nwis/"
,
service
,
"/?format=rdb&"
)
urlCall
<-
paste0
(
baseURL
,
urlCall
)
if
(
service
==
"qw"
){
if
(
service
==
"qw
data
"
){
urlCall
<-
paste0
(
urlCall
,
"&siteOutput=expanded"
)
}
...
...
This diff is collapsed.
Click to expand it.
man/getNWISData.Rd
+
3
−
2
View file @
185c19c2
...
...
@@ -6,7 +6,8 @@
getNWISData(service = "dv", ...)
}
\arguments{
\item{services}{string}
\item{service}{string. Possible values are "iv" (for instantaneous), "dv" (for daily values), "gwlevels"
(for groundwater levels), and "qwdata" (for water quality)}
\item{\dots}{see \url{http://waterservices.usgs.gov/rest/Site-Service.html#Service} for a complete list of options}
}
...
...
@@ -15,7 +16,7 @@ retval dataframe
}
\description{
Returns data from the NWIS web service.
Arguments to the function should be based on \url{http://waterservices.usgs.gov
/rest/Site-Service.html#Service}
Arguments to the function should be based on \url{http://waterservices.usgs.gov
} service calls.
}
\examples{
dataTemp <- getNWISData(stateCd="OH",parameterCd="00010")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment