get_airnow_area {airnow} | R Documentation |
Get air quality data for a given region
Description
get_airnow_area()
retrieves the most recent air quality readings from sites
in a specified region.
Usage
get_airnow_area(
box,
parameters = "pm25",
start_time = NULL,
end_time = NULL,
monitor_type = "both",
data_type = c("aqi", "concentrations", "both"),
verbose = FALSE,
raw_concentrations = FALSE,
clean_names = TRUE,
api_key = get_airnow_token()
)
Arguments
box |
Four-element numeric vector specifying a bounding box for the region of interest. Format is (minX, minY, maxX, maxY), where X and Y are longitude and latitude, respectively. |
parameters |
Parameter(s) to return data for. Choices are PM_2.5
( |
start_time |
Optional. The date and time (UTC) at the start of the time
period requested. If specified, |
end_time |
Optional. The date and time (UTC) at the end of the time
period requested. If specified, |
monitor_type |
Type of monitor to be returned, either |
data_type |
Type of data to be returned, either |
verbose |
Logical value indicating whether or not to include additional
site information including Site Name, Agency Name, AQS ID, and Full AQS ID
(default: |
raw_concentrations |
Logical value indicating whether or not raw
hourly concentration data should be included (default: |
clean_names |
Whether or not column names should be cleaned (default:
|
api_key |
AirNow API key |
Value
A data frame with current air quality conditions
Examples
## Not run:
# Get air quality data around Washington state
get_airnow_area(box = c(-125.394211, 45.295897, -116.736984, 49.172497))
## End(Not run)