Skip to contents

Internal function to perform geospatial lookup by state.

Usage

lookup_by_state(
  endpoint,
  bdate,
  edate,
  state.fips,
  param,
  cached = TRUE,
  cache_directory = "/cache",
  duration = NULL,
  cbdate = NULL,
  cedate = NULL
)

Arguments

endpoint

Base url to make call.

bdate

Beginning date to check. Year, month, day format.

edate

Ending date to check. Year, month, day format.

state.fips

State FIPS code. Use get_state_fips() if unsure.

param

Pollutant parameter that site is measuring.

cached

TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional)

cache_directory

Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional)

duration

The 1-character AQS sample duration code. (Optional)

cbdate

Beginning date of last change to DB. (Optional)

cedate

Ending date of last change to DB. (Optional)

Value

API response containing operational information about the monitor.

Examples

if (FALSE) {
bdate <- "20200101"
edate <- "20200102"
state.fips <- "37"
param <- "42401"
result <- lookup_by_state(MONITORS, bdate, edate, state.fips, param)
result$Data
}