header_tag.html

Skip to contents

Well Construction Observations data

Usage

read_ngwmn_well_construction(
  monitoring_location_id = NA_character_,
  monitoring_location_obs_number = NA_character_,
  material = NA_character_,
  properties = NA_character_,
  ...,
  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

This field is required. Combined site identifier of agency code and site number (format of {agency_code}-{monitoring_location_number}). A list of values can be passed for this field, seperated by commas.

monitoring_location_obs_number

Number of observation for given site. A list of values can be passed for this field, seperated by commas.

material

Screen type or material.

properties

A vector of requested columns to be returned from the query. Available options are: agency_code, monitoring_location_number, monitoring_location_id, monitoring_location_obs_number, type, depth_from, depth_to, depth_from_unit, depth_to_unit, material, diameter, diameter_unit, hole_size, hole_size_unit. The default (NA) will return all columns of the data.

...

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{
site <- "USGS-272838082142201"
ngwmn_well <- read_ngwmn_well_construction(monitoring_location_id = site)
#> Requesting:
#> https://api.waterdata.usgs.gov/ngwmn/ogcapi/collections/constructionObs/items?f=json&lang=en-US&monitoring_location_id=USGS-272838082142201&limit=50000
#> Remaining requests this hour:2156 

ngwmn_well_sub <- read_ngwmn_well_construction(monitoring_location_id = site,
                     monitoring_location_obs_number = 2)
#> Requesting:
#> https://api.waterdata.usgs.gov/ngwmn/ogcapi/collections/constructionObs/items?f=json&lang=en-US&monitoring_location_id=USGS-272838082142201&monitoring_location_obs_number=2&limit=50000
#> Remaining requests this hour:2156 

sites <- c("USGS-272838082142201", "USGS-404159100494601",
           "USGS-401216080362703", "MBMG-702934")
ngwml_well_sites <- read_ngwmn_well_construction(monitoring_location_id = sites)
#> Requesting:
#> https://api.waterdata.usgs.gov/ngwmn/ogcapi/collections/constructionObs/items?f=json&lang=en-US&monitoring_location_id=USGS-272838082142201,USGS-404159100494601,USGS-401216080362703,MBMG-702934&limit=50000
#> Remaining requests this hour:2155 

# }