header_tag.html

Skip to contents

Site data (from Monitoring Location Registry), including the name, identifier, agency, features, and location of the site

Usage

read_ngwmn_sites(
  monitoring_location_id = NA_character_,
  agency_code = NA_character_,
  monitoring_location_number = NA_character_,
  altitude = NA_character_,
  national_aquifer_code = NA_character_,
  national_aquifer_description = NA_character_,
  country_code = NA_character_,
  country_name = NA_character_,
  state_name = NA_character_,
  county_name = NA_character_,
  aquifer_name = NA_character_,
  site_type = NA_character_,
  aquifer_type_code = NA_character_,
  qw_sys_name = NA_character_,
  qw_sn_flag = NA_character_,
  qw_baseline_flag = NA_character_,
  qw_well_chars = NA_character_,
  qw_well_type = NA_character_,
  qw_well_purpose = NA_character_,
  wl_sys_name = NA_character_,
  wl_sn_flag = NA_character_,
  wl_baseline_flag = NA_character_,
  wl_well_chars = NA_character_,
  wl_well_type = NA_character_,
  wl_well_purpose = NA_character_,
  bbox = NA,
  properties = NA_character_,
  skipGeometry = FALSE,
  ...,
  convertType = getOption("dataRetrieval.convertType"),
  no_paging = getOption("dataRetrieval.no_paging"),
  chunk_size = getOption("dataRetrieval.site_chunk_size_data"),
  limit = getOption("dataRetrieval.limit"),
  attach_request = getOption("dataRetrieval.attach_request")
)

Arguments

monitoring_location_id

Site identifier, combination of agency code and site number (format agency_code- monitoring_location_number). A list of values can be passed for this field, seperated by commas.

agency_code

Code for the name of the agency or organization that owns the site and/or contributed it to the network. A list of values can be passed for this field, seperated by commas.

monitoring_location_number

Local, unique well or spring identification number or code. A list of values can be passed for this field, seperated by commas.

altitude

Elevation of the land surface at the site.

national_aquifer_code

Code for U.S. Pricinpal Aquifer, lookup here. A list of values can be passed for this field, seperated by commas.

national_aquifer_description

Name for U.S. Principal Aquifer, lookup here. A list of values can be passed for this field, seperated by commas.

country_code

Abbreviation of country of site location. A list of values can be passed for this field, seperated by commas.

country_name

Name of country of site location.

state_name

Name of state of site location. A list of values can be passed for this field, seperated by commas.

county_name

Name of county of site location. A list of values can be passed for this field, seperated by commas.

aquifer_name

Name of local aquifer of site. A list of values can be passed for this field, seperated by commas.

site_type

Type of groundwater site (Spring or Well).

aquifer_type_code

Characteristic of the type of aquifer that the well is completed in (Confined or Unconfined). For NGWMN, shallow semi-confined wells can be considered unconfined if they respond to climatic fluctuations in a relatively short period of time.

qw_sys_name

The system from which water quality data from the well or spring is served to the portal. A list of values can be passed for this field, seperated by commas.

qw_sn_flag

Flag for whether the well or spring is part of the NGWMN water-quality network.

qw_baseline_flag

Flag for whether the well or spring has completed its 5-year baseline period, classifies it as being in one of the three QW subnetworks.

qw_well_chars

The characteristics of the aquifer the well represents. There are 3 options: 'Background', 'Suspected / Anticipated Changes', 'Known Changes'. The field is NULL if the site is still in the baseline period.

qw_well_type

Description of the assigned QW monitoring category for the well or spring.

qw_well_purpose

Description of the prupose of conducting QW monitoring of the well or spring.

wl_sys_name

The system from which water level data from the well or spring is served to the portal. A list of values can be passed for this field, seperated by commas.

wl_sn_flag

Flag for whether the well or spring is part of the NGWMN water-level network.

wl_baseline_flag

Flag for whether the well or spring has completed its 5-year baseline period, classifies it as being in one of the three WL subnetworks.

wl_well_chars

The characteristics of the aquifer the well represents. There are 3 options: 'Background', 'Suspected / Anticipated Changes', 'Known Changes'. The field is NULL if the site is still in the baseline period.

wl_well_type

Description of the assigned WL monitoring category for the well or spring

wl_well_purpose

Description of the purpose of conducting WL monitoring of the well or spring.

bbox

Only features that have a geometry that intersects the bounding box are selected.The bounding box is provided as four or six numbers, depending on whether the coordinate reference system includes a vertical axis (height or depth). Coordinates are assumed to be in crs 4326. The expected format is a numeric vector structured: c(xmin,ymin,xmax,ymax). Another way to think of it is c(Western-most longitude, Southern-most latitude, Eastern-most longitude, Northern-most longitude).

properties

A vector of requested columns to be returned from the query. Available options are: geometry, monitoring_location_id, agency_code, agency_name, monitoring_location_number, monitoring_location_name, longitude, original_horizontal_datum, horizontal_position_accuracy_code, altitude, vertical_datum, altitude_method_name, altitude_accuracy, well_constructed_depth, well_depth_units, national_aquifer_code, national_aquifer_description, country_code, country_name, state_name, county_name, aquifer_name, site_type, aquifer_type_code, qw_sys_name, qw_sn_flag, qw_baseline_flag, qw_well_chars, qw_well_type, qw_well_purpose, qw_well_purpose_notes, wl_sys_name, wl_sn_flag, wl_baseline_flag, wl_well_chars, wl_well_type, wl_well_purpose, wl_well_purpose_notes, link. The default (NA) will return all columns of the data.

skipGeometry

This option can be used to skip response geometries for each feature. The returning object will be a data frame with no spatial information.

...

Not used. Included to help differentiate official Water Data API arguments from more seldom used, optional dataRetrieval-specific arguments.

convertType

logical, defaults to TRUE. If TRUE, the function will convert the data to dates, any qualifiers to string vector and reorder the returned data frame.

no_paging

logical, defaults to FALSE. If TRUE, the data will be requested from a native csv format. This can be dangerous because the data will cut off at 50,000 rows without indication that more data is available. Use TRUE with caution.

chunk_size

Number of monitoring_location_ids to chunk requests into. The default for functions that don't generally return long-term data records is 250, while the default for time series functions is 10. Setting to NA will eliminate site chunking, giving users full control.

limit

numeric, The optional limit parameter is used to control the subset of the selected features that should be returned in each page. The maximum allowable limit is 50,000. It may be beneficial to set this number lower if your internet connection is spotty. The default (NA) will set the limit to the maximum allowable limit for the service.

attach_request

logical, defaults to TRUE. If set to TRUE, the full request sent to the Water Data API is attached as an attribute to the data set.

Examples


# \donttest{

ngwmn_sites <- read_ngwmn_sites(state_name = "Minnesota")
#> Requesting:
#> https://api.waterdata.usgs.gov/ngwmn/ogcapi/collections/sites/items?f=json&lang=en-US&state_name=Minnesota&skipGeometry=FALSE&limit=50000
#> Remaining requests this hour:2165 

org_type <- read_ngwmn_sites(agency_code = "MN_DNR",
                             county_name = "Washington County")
#> Requesting:
#> https://api.waterdata.usgs.gov/ngwmn/ogcapi/collections/sites/items?f=json&lang=en-US&agency_code=MN_DNR&county_name=Washington%20County&skipGeometry=FALSE&limit=50000
#> Remaining requests this hour:2163 

# }