Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

importNGWMN

Function to return data from the National Ground Water Monitoring Network waterML2 format


Description

This function accepts a url parameter for a WaterML2 getObservation. This function is still under development, but the general functionality is correct.

Usage

importNGWMN(input, asDateTime = FALSE, tz = "UTC")

Arguments

input

character or raw, containing the url for the retrieval or a path to the data file, or raw XML.

asDateTime

logical, if TRUE returns date and time as POSIXct, if FALSE, character

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.

Value

mergedDF a data frame source, time, value, uom, uomTitle, comment, gmlID

Examples

obs_url <- paste("https://cida.usgs.gov/ngwmn_cache/sos?request=GetObservation",
"service=SOS","version=2.0.0",
"observedProperty=urn:ogc:def:property:OGC:GroundWaterLevel",
"responseFormat=text/xml",
"featureOfInterest=VW_GWDP_GEOSERVER.USGS.403836085374401",sep="&")

 data_returned <- importNGWMN(obs_url)

dataRetrieval

Retrieval Functions for USGS and EPA Hydrologic and Water Quality Data

v2.7.10
CC0
Authors
Laura DeCicco [aut, cre] (<https://orcid.org/0000-0002-3915-9487>), Robert Hirsch [aut] (<https://orcid.org/0000-0002-4534-075X>), David Lorenz [aut], Jordan Read [ctb], Jordan Walker [ctb], Lindsay Carr [ctb], David Watkins [aut] (<https://orcid.org/0000-0002-7544-0700>), David Blodgett [ctb], Mike Johnson [aut] (<https://orcid.org/0000-0002-5288-8350>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.