Make a request to the /surfacewater/surfacewaterstations endpoint to locate surface water stations by AOI, station abbreviation, county, division, station name, USGS ID or water_district.
Usage
get_sw_stations(
aoi = NULL,
radius = NULL,
abbrev = NULL,
county = NULL,
division = NULL,
station_name = NULL,
usgs_id = NULL,
water_district = NULL,
api_key = NULL
)
Arguments
- aoi
list of length 2 containing an XY coordinate pair, 2 column matrix/dataframe of XY coordinates, sf or Terra SpatVector point/polygon/linestring geometry
- radius
numeric, search radius in miles around given point (or the centroid of a polygon). If an AOI is given, radius defaults to 20 miles. If no AOI is given, then default is NULL.
- abbrev
character vector or list of characters of station abbreviation
- county
character, indicating the county to query
- division
numeric, indicating the water division to query
- station_name
character, surface water station name
- usgs_id
character vector or list of characters of USGS Site IDs
- water_district
numeric, indicating the water district to query
- api_key
character, API authorization token, optional. If more than maximum number of requests per day is desired, an API key can be obtained from CDSS.
Examples
if (FALSE) {
# Retrieve surface water station info from Larimer county
sw_stations <- get_sw_stations(
county = "Larimer"
)
# plot latitude/longitude of surface water stations
plot(sw_stations$latitude~sw_stations$longitude)
}