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
80880be0
Commit
80880be0
authored
10 years ago
by
Laura A DeCicco
Browse files
Options
Downloads
Patches
Plain Diff
Switching groundwater back to rdb.
parent
37ae6cb2
No related branches found
No related tags found
1 merge request
!60
Final CRAN 2.1 updates.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/readNWISunit.r
+19
-17
19 additions, 17 deletions
R/readNWISunit.r
man/readNWISgwl.Rd
+10
-15
10 additions, 15 deletions
man/readNWISgwl.Rd
with
29 additions
and
32 deletions
R/readNWISunit.r
+
19
−
17
View file @
80880be0
...
...
@@ -257,30 +257,25 @@ readNWISmeas <- function (siteNumbers,startDate="",endDate="", tz=""){
#' Name \tab Type \tab Description \cr
#' agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
#' site_no \tab character \tab The USGS site number \cr
#' dateTime \tab character \tab The date and time of the value as a character \cr
#' dateTimeAccuracyCd \tab character \tab Information on the date/time accuracy \cr
#' censorCode \tab character \tab Censoring information \cr
#' sourceCode \tab character \tab Information on source of the data \cr
#' code \tab character \tab Any codes that qualify the corresponding value\cr
#' value \tab numeric \tab The numeric value for the parameter \cr
#' site_tp_cd \tab character \tab Site type code \cr
#' lev_dt \tab Date \tab Date level measured\cr
#' lev_tm \tab character \tab Time level measured \cr
#' lev_tz_cd \tab character \tab Time datum \cr
#' lev_va \tab numeric \tab Water level value in feet below land surface\cr
#' sl_lev_va \tab numeric \tab Water level value in feet above specific vertical datum \cr
#' lev_status_cd \tab character \tab The status of the site at the time the water level was measured \cr
#' lev_agency_cd \tab character \tab The agency code of the person measuring the water level \cr
#' }
#' Note that code and value are repeated for the parameters requested. The names are of the form
#' X_D_P_S, where X is literal,
#' D is an option description of the parameter,
#' P is the parameter code,
#' and S is the statistic code (if applicable).
#'
#' There are also several useful attributes attached to the data frame:
#' \tabular{lll}{
#' Name \tab Type \tab Description \cr
#' url \tab character \tab The url used to generate the data \cr
#' siteInfo \tab data.frame \tab A data frame containing information on the requested sites \cr
#' variableInfo \tab data.frame \tab A data frame containing information on the requested parameters \cr
#' statisticInfo \tab data.frame \tab A data frame containing information on the requested statistics on the data \cr
#' queryTime \tab POSIXct \tab The time the data was returned \cr
#' }
#'
#' @seealso \code{\link{
renameNWISColumns}}, \code{\link{importWaterML
1}}
#' @seealso \code{\link{
importRDB
1}}
#' @export
#' @examples
#' siteNumber <- "434400121275801"
...
...
@@ -290,9 +285,16 @@ readNWISmeas <- function (siteNumbers,startDate="",endDate="", tz=""){
#' data3 <- readNWISgwl("420125073193001", '','')
readNWISgwl
<-
function
(
siteNumbers
,
startDate
=
""
,
endDate
=
""
){
url
<-
constructNWISURL
(
siteNumbers
,
NA
,
startDate
,
endDate
,
"gwlevels"
,
format
=
"wml1"
)
data
<-
importWaterML1
(
url
,
asDateTime
=
FALSE
)
data
$
tz_cd
<-
NULL
# url <- constructNWISURL(siteNumbers,NA,startDate,endDate,"gwlevels",format="wml1")
# data <- importWaterML1(url,asDateTime=FALSE)
# data$tz_cd <- NULL
url
<-
constructNWISURL
(
siteNumbers
,
NA
,
startDate
,
endDate
,
"gwlevels"
,
format
=
"tsv"
)
data
<-
importRDB1
(
url
,
asDateTime
=
FALSE
)
data
$
lev_dt
<-
as.Date
(
data
$
lev_dt
)
siteInfo
<-
readNWISsite
(
siteNumbers
)
attr
(
data
,
"siteInfo"
)
<-
siteInfo
return
(
data
)
}
This diff is collapsed.
Click to expand it.
man/readNWISgwl.Rd
+
10
−
15
View file @
80880be0
...
...
@@ -20,26 +20,21 @@ A data frame with the following columns:
Name \tab Type \tab Description \cr
agency_cd \tab character \tab The NWIS code for the agency reporting the data\cr
site_no \tab character \tab The USGS site number \cr
dateTime \tab character \tab The date and time of the value as a character \cr
dateTimeAccuracyCd \tab character \tab Information on the date/time accuracy \cr
censorCode \tab character \tab Censoring information \cr
sourceCode \tab character \tab Information on source of the data \cr
code \tab character \tab Any codes that qualify the corresponding value\cr
value \tab numeric \tab The numeric value for the parameter \cr
}
Note that code and value are repeated for the parameters requested. The names are of the form
X_D_P_S, where X is literal,
D is an option description of the parameter,
P is the parameter code,
and S is the statistic code (if applicable).
site_tp_cd \tab character \tab Site type code \cr
lev_dt \tab Date \tab Date level measured\cr
lev_tm \tab character \tab Time level measured \cr
lev_tz_cd \tab character \tab Time datum \cr
lev_va \tab numeric \tab Water level value in feet below land surface\cr
sl_lev_va \tab numeric \tab Water level value in feet above specific vertical datum \cr
lev_status_cd \tab character \tab The status of the site at the time the water level was measured \cr
lev_agency_cd \tab character \tab The agency code of the person measuring the water level \cr
}
There are also several useful attributes attached to the data frame:
\tabular{lll}{
Name \tab Type \tab Description \cr
url \tab character \tab The url used to generate the data \cr
siteInfo \tab data.frame \tab A data frame containing information on the requested sites \cr
variableInfo \tab data.frame \tab A data frame containing information on the requested parameters \cr
statisticInfo \tab data.frame \tab A data frame containing information on the requested statistics on the data \cr
queryTime \tab POSIXct \tab The time the data was returned \cr
}
}
...
...
@@ -58,6 +53,6 @@ data2 <- readNWISgwl(sites, '','')
data3 <- readNWISgwl("420125073193001", '','')
}
\seealso{
\code{\link{renameNWISColumns}},
\code{\link{import
WaterML
1}}
\code{\link{import
RDB
1}}
}
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