Make a request to the climatedata/climatestations/ endpoint to locate climate stations by AOI, county, division, station name, Site ID or water district.
Usage
get_climate_stations(
aoi = NULL,
radius = NULL,
county = NULL,
division = NULL,
station_name = NULL,
site_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.
- county
character, indicating the county to query
- division
numeric, indicating the water division to query
- station_name
character, surface water station name
- site_id
character vector or list of characters of climate station site IDs
- water_district
numeric, indicating the water district to query
- api_key
character, optional. If more than maximum number of requests per day is desired, an API key can be obtained from CDSS.
Examples
if (FALSE) {
# get climate stations in Adams County, CO
climate_stations <- get_climate_stations(
county = "Adams"
)
# plot latitude/longitude of climate stations
plot(climate_stations$latitude~climate_stations$longitude)
}