Import data from the National Groundwater Monitoring Network.
Source:R/readNGWMNdata.R
readNGWMNdata.Rd
Only water level data and site locations and names are currently available through the web service.
Arguments
- service
char Service for the request - "observation" and "featureOfInterest" are implemented.
- ...
Other parameters to supply, namely
siteNumbers
orbbox
- asDateTime
logical if
TRUE
, will convert times to POSIXct format. Currently defaults toFALSE
since time zone information is not included.- tz
character to set timezone attribute of dateTime. Default is "UTC", and converts the date times to UTC, properly accounting for daylight savings times based on the data's provided time zone offset. Possible values to provide are "America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", as well as the following which do not use daylight savings time: "America/Honolulu", "America/Jamaica", "America/Managua", "America/Phoenix", and "America/Metlakatla". See also
OlsonNames()
for more information on time zones.
Examples
# \donttest{
# one site
site <- "USGS.430427089284901"
#oneSite <- readNGWMNdata(siteNumbers = site, service = "observation")
# multiple sites
sites <- c("USGS.272838082142201", "USGS.404159100494601", "USGS.401216080362703")
# Very slow:
# multiSiteData <- readNGWMNdata(siteNumbers = sites, service = "observation")
# attributes(multiSiteData)
# non-USGS site
# accepts colon or period between agency and ID
site <- "MBMG:702934"
# data <- readNGWMNdata(siteNumbers = site, service = "featureOfInterest")
# bounding box
# bboxSites <- readNGWMNdata(service = "featureOfInterest", bbox = c(30, -102, 31, 99))
# retrieve sites. Set asDateTime to false since one site has an invalid date
# Very slow:
# bboxData <- readNGWMNdata(service = "observation", siteNumbers = bboxSites$site[1:3],
# asDateTime = FALSE)
# }