header_tag.html

Skip to contents

Many read_waterdata functions have a long list of arguments that can be used to find sites that have data. Users can use this function to create a list of possible arguments that can be used as input to the monitoring_location_arguments argument (found in many of the read_waterdata functions). This function also is used to check that user supplied available parameters to their queries when using the monitoring_location_arguments argument.

Usage

make_monitoring_location_arguments(
  service = "daily",
  agency_code = NA_character_,
  agency_name = NA_character_,
  monitoring_location_number = NA_character_,
  monitoring_location_name = NA_character_,
  district_code = NA_character_,
  country_code = NA_character_,
  country_name = NA_character_,
  state_code = NA_character_,
  state_name = NA_character_,
  county_code = NA_character_,
  county_name = NA_character_,
  minor_civil_division_code = NA_character_,
  site_type_code = NA_character_,
  site_type = NA_character_,
  hydrologic_unit_code = NA_character_,
  basin_code = NA_character_,
  altitude = NA_character_,
  altitude_accuracy = NA_character_,
  altitude_method_code = NA_character_,
  altitude_method_name = NA_character_,
  vertical_datum = NA_character_,
  vertical_datum_name = NA_character_,
  horizontal_positional_accuracy_code = NA_character_,
  horizontal_positional_accuracy = NA_character_,
  horizontal_position_method_code = NA_character_,
  horizontal_position_method_name = NA_character_,
  original_horizontal_datum = NA_character_,
  original_horizontal_datum_name = NA_character_,
  drainage_area = NA_character_,
  contributing_drainage_area = NA_character_,
  time_zone_abbreviation = NA_character_,
  uses_daylight_savings = NA_character_,
  construction_date = NA_character_,
  aquifer_code = NA_character_,
  national_aquifer_code = NA_character_,
  aquifer_type_code = NA_character_,
  well_constructed_depth = NA_character_,
  hole_constructed_depth = NA_character_,
  depth_source_code = NA_character_,
  data_gap_interval = NA_character_,
  ...,
  check_arguments = FALSE
)

Arguments

service

Endpoint to check arguments against. Possible values are "daily", "latest-continuous", "field-measurements", "latest-daily", "latest-field-measurements", "continuous", "peaks".

agency_code

The agency that is reporting the data. Agency codes are fixed values assigned by the National Water Information System (NWIS). A list of agency codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/agency-codes/items.

agency_name

The name of the agency that is reporting the data.

monitoring_location_number

Each monitoring location in the USGS data base has a unique 8- to 15-digit identification number.

monitoring_location_name

This is the official name of the monitoring location in the database. For well information this can be a district-assigned local number.

district_code

The Water Science Centers (WSCs) across the United States use the FIPS state code as the district code. In some case, monitoring locations and samples may be managed by a water science center that is adjacent to the state in which the monitoring location actually resides. For example a monitoring location may have a district code of 30 which translates to Montana, but the state code could be 56 for Wyoming because that is where the monitoring location actually is located.

country_code

The code for the country in which the monitoring location is located.

country_name

The name of the country in which the monitoring location is located.

state_code

State code. A two-digit ANSI code (formerly FIPS code) as defined by the American National Standards Institute, to define States and equivalents. A three-digit ANSI code is used to define counties and county equivalents. A lookup table is available. The only countries with political subdivisions other than the US are Mexico and Canada. The Mexican states have US state codes ranging from 81-86 and Canadian provinces have state codes ranging from 90-98.

state_name

The name of the state or state equivalent in which the monitoring location is located.

county_code

The code for the county or county equivalent (parish, borough, etc.) in which the monitoring location is located. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/counties/items.

county_name

The name of the county or county equivalent (parish, borough, etc.) in which the monitoring location is located. [A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/counties/items.

minor_civil_division_code

Codes for primary governmental or administrative divisions of the county or county equivalent in which the monitoring location is located.

site_type_code

A code describing the hydrologic setting of the monitoring location. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/site-types/items.

site_type

A description of the hydrologic setting of the monitoring location. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/site-types/items.

hydrologic_unit_code

The hydrologic unit code (HUC) for the monitoring location. Supports prefix matching — querying with a shorter HUC (e.g. "04") matches all locations within that hydrologic region.

basin_code

The Basin Code or "drainage basin code" is a two-digit code that further subdivides the 8-digit hydrologic-unit code. The drainage basin code is defined by the USGS State Office where the monitoring location is located.

altitude

Altitude of the monitoring location referenced to the specified Vertical Datum.

altitude_accuracy

Accuracy of the altitude, in feet. An accuracy of +/- 0.1 foot would be entered as “.1”. Many altitudes are interpolated from the contours on topographic maps; accuracies determined in this way are generally entered as one-half of the contour interval.

altitude_method_code

Codes representing the method used to measure altitude.

altitude_method_name

The name of the method used to measure altitude.

vertical_datum

The datum used to determine altitude and vertical position at the monitoring location. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/altitude-datums/items.

vertical_datum_name

The datum used to determine altitude and vertical position at the monitoring location. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/altitude-datums/items.

horizontal_positional_accuracy_code

Indicates the accuracy of the latitude longitude values. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/coordinate-accuracy-codes/items.

horizontal_positional_accuracy

The agency that is reporting the data. Agency codes are fixed values assigned by the National Water Information System (NWIS). A list of agency codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/agency-codes/items.

horizontal_position_method_code

Indicates the method used to determine latitude longitude values. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/coordinate-method-codes/items.

horizontal_position_method_name

Indicates the method used to determine latitude longitude values. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/coordinate-method-codes/items.

original_horizontal_datum

Coordinates are published in EPSG:4326 / WGS84 / World Geodetic System 1984. This field indicates the original datum used to determine coordinates before they were converted. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/coordinate-datum-codes/items.

original_horizontal_datum_name

Coordinates are published in EPSG:4326 / WGS84 / World Geodetic System 1984. This field indicates the original datum used to determine coordinates before they were converted. A list of codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/coordinate-datum-codes/items.

drainage_area

The area enclosed by a topographic divide from which direct surface runoff from precipitation normally drains by gravity into the stream above that point.

contributing_drainage_area

The contributing drainage area of a lake, stream, wetland, or estuary monitoring location, in square miles. This item should be present only if the contributing area is different from the total drainage area. This situation can occur when part of the drainage area consists of very porous soil or depressions that either allow all runoff to enter the groundwater or traps the water in ponds so that rainfall does not contribute to runoff. A transbasin diversion can also affect the total drainage area.

time_zone_abbreviation

A short code describing the time zone used by a monitoring location.

uses_daylight_savings

The agency that is reporting the data. Agency codes are fixed values assigned by the National Water Information System (NWIS). A list of agency codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/agency-codes/items.

construction_date

Date the well was completed.

aquifer_code

Local aquifers in the USGS water resources data base are identified by a geohydrologic unit code (a three-digit number related to the age of the formation, followed by a 4 or 5 character abbreviation for the geologic unit or aquifer name).

national_aquifer_code

National aquifers are the principal aquifers or aquifer systems in the United States, defined as regionally extensive aquifers or aquifer systems that have the potential to be used as a source of potable water. Not all groundwater monitoring locations can be associated with a National Aquifer. Such monitoring locations will not be retrieved using this search criteria. A list of National aquifer codes and names is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/national-aquifer-codes/items.

aquifer_type_code

The agency that is reporting the data. Agency codes are fixed values assigned by the National Water Information System (NWIS). A list of agency codes is available at https://api.waterdata.usgs.gov/ogcapi/v0/collections/agency-codes/items.

well_constructed_depth

The depth of the finished well, in feet below land surface datum. Note: Not all groundwater monitoring locations have information on Well Depth. Such monitoring locations will not be retrieved using this search criteria.

hole_constructed_depth

The total depth to which the hole is drilled, in feet below land surface datum. Note: Not all groundwater monitoring locations have information on Hole Depth. Such monitoring locations will not be retrieved using this search criteria.

depth_source_code

A code indicating the source of water-level data.

data_gap_interval

The time interval threshold used for gap detection in the time series.

...

Not used. Used to make sure the user isn't passing in arguments that aren't available.

check_arguments

Logical. Used to decide if the arguments passed in are available or not. The default is FALSE. Using TRUE will make two calls to the API, so if you are concerned with minimizing API calls, keep this value as FALSE. If you are concerned with making sure your calls are accepted by the service, set to TRUE.

Examples


make_monitoring_location_arguments(service = "daily", agency_name = "USGS")
#> $agency_code
#> [1] NA
#> 
#> $agency_name
#> [1] "USGS"
#> 
#> $monitoring_location_number
#> [1] NA
#> 
#> $monitoring_location_name
#> [1] NA
#> 
#> $district_code
#> [1] NA
#> 
#> $country_code
#> [1] NA
#> 
#> $country_name
#> [1] NA
#> 
#> $state_code
#> [1] NA
#> 
#> $state_name
#> [1] NA
#> 
#> $county_code
#> [1] NA
#> 
#> $county_name
#> [1] NA
#> 
#> $minor_civil_division_code
#> [1] NA
#> 
#> $site_type_code
#> [1] NA
#> 
#> $site_type
#> [1] NA
#> 
#> $hydrologic_unit_code
#> [1] NA
#> 
#> $basin_code
#> [1] NA
#> 
#> $altitude
#> [1] NA
#> 
#> $altitude_accuracy
#> [1] NA
#> 
#> $altitude_method_code
#> [1] NA
#> 
#> $altitude_method_name
#> [1] NA
#> 
#> $vertical_datum
#> [1] NA
#> 
#> $vertical_datum_name
#> [1] NA
#> 
#> $horizontal_positional_accuracy_code
#> [1] NA
#> 
#> $horizontal_positional_accuracy
#> [1] NA
#> 
#> $horizontal_position_method_code
#> [1] NA
#> 
#> $horizontal_position_method_name
#> [1] NA
#> 
#> $original_horizontal_datum
#> [1] NA
#> 
#> $original_horizontal_datum_name
#> [1] NA
#> 
#> $drainage_area
#> [1] NA
#> 
#> $contributing_drainage_area
#> [1] NA
#> 
#> $time_zone_abbreviation
#> [1] NA
#> 
#> $uses_daylight_savings
#> [1] NA
#> 
#> $construction_date
#> [1] NA
#> 
#> $aquifer_code
#> [1] NA
#> 
#> $national_aquifer_code
#> [1] NA
#> 
#> $aquifer_type_code
#> [1] NA
#> 
#> $well_constructed_depth
#> [1] NA
#> 
#> $hole_constructed_depth
#> [1] NA
#> 
#> $depth_source_code
#> [1] NA
#> 
#> $data_gap_interval
#> [1] NA
#> 
make_monitoring_location_arguments(service = "field-measurements",
                                   state_name = c("Ohio", "Wisconsin"))
#> $agency_code
#> [1] NA
#> 
#> $agency_name
#> [1] NA
#> 
#> $monitoring_location_number
#> [1] NA
#> 
#> $monitoring_location_name
#> [1] NA
#> 
#> $district_code
#> [1] NA
#> 
#> $country_code
#> [1] NA
#> 
#> $country_name
#> [1] NA
#> 
#> $state_code
#> [1] NA
#> 
#> $state_name
#> [1] "Ohio"      "Wisconsin"
#> 
#> $county_code
#> [1] NA
#> 
#> $county_name
#> [1] NA
#> 
#> $minor_civil_division_code
#> [1] NA
#> 
#> $site_type_code
#> [1] NA
#> 
#> $site_type
#> [1] NA
#> 
#> $hydrologic_unit_code
#> [1] NA
#> 
#> $basin_code
#> [1] NA
#> 
#> $altitude
#> [1] NA
#> 
#> $altitude_accuracy
#> [1] NA
#> 
#> $altitude_method_code
#> [1] NA
#> 
#> $altitude_method_name
#> [1] NA
#> 
#> $vertical_datum
#> [1] NA
#> 
#> $vertical_datum_name
#> [1] NA
#> 
#> $horizontal_positional_accuracy_code
#> [1] NA
#> 
#> $horizontal_positional_accuracy
#> [1] NA
#> 
#> $horizontal_position_method_code
#> [1] NA
#> 
#> $horizontal_position_method_name
#> [1] NA
#> 
#> $original_horizontal_datum
#> [1] NA
#> 
#> $original_horizontal_datum_name
#> [1] NA
#> 
#> $drainage_area
#> [1] NA
#> 
#> $contributing_drainage_area
#> [1] NA
#> 
#> $time_zone_abbreviation
#> [1] NA
#> 
#> $uses_daylight_savings
#> [1] NA
#> 
#> $construction_date
#> [1] NA
#> 
#> $aquifer_code
#> [1] NA
#> 
#> $national_aquifer_code
#> [1] NA
#> 
#> $aquifer_type_code
#> [1] NA
#> 
#> $well_constructed_depth
#> [1] NA
#> 
#> $hole_constructed_depth
#> [1] NA
#> 
#> $depth_source_code
#> [1] NA
#> 
#> $data_gap_interval
#> [1] NA
#>