Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{getWQPInfo}
\alias{getWQPInfo}
\title{Import Metadata for Water Quality Portal Data}
\usage{
getWQPInfo(siteNumber, parameterCd, interactive = FALSE)
}
\arguments{
\item{siteNumber}{string site number.}
\item{parameterCd}{string USGS parameter code or characteristic name.}
\item{interactive}{logical Option for interactive mode. If true, there is user interaction for error handling and data checks.}
}
\value{
INFO dataframe with agency, site, dateTime, value, and code columns
}
\description{
Populates INFO data frame for EGRET study. If either station number or parameter code supplied, imports data about a particular USGS site from NWIS web service.
This function gets the data from here: \url{http://waterservices.usgs.gov/}
A list of parameter codes can be found here: \url{http://nwis.waterdata.usgs.gov/nwis/pmcodes/}
If either station number or parameter code is not supplied, the user will be asked to input data.
Additionally, the user will be asked for:
staAbbrev - station abbreviation, will be used in naming output files and for structuring batch jobs
constitAbbrev - constitute abbreviation
}
\examples{
# These examples require an internet connection to run
# Automatically gets information about site 01594440 and temperature, no interaction with user
nameToUse <- 'Specific conductance'
pcodeToUse <- '00095'
INFO <- getWQPInfo('USGS-04024315',pcodeToUse,interactive=TRUE)
INFO2 <- getWQPInfo('WIDNR_WQX-10032762',nameToUse)
# To adjust the label names:
INFO$shortName <- "Little"
INFO$paramShortName <- "SC"
}
\keyword{USGS}
\keyword{WRTDS}
\keyword{data}
\keyword{import}
\keyword{service}
\keyword{web}