get_conditions: Get air quality conditions

Description Usage Arguments Value Note Examples

View source: R/get_conditions.R

Description

\lifecycle

experimental

get_conditions gets forecast conditions for a given ZIP code or latitude/longitude pair

Usage

1
2
3
4
5
6
7
8
get_conditions(
  zip = NULL,
  latitude = NULL,
  longitude = NULL,
  date = NULL,
  distance = 25,
  api_key = Sys.getenv("AIRNOW_API_KEY")
)

Arguments

zip

US ZIP code

latitude

TODO

longitude

TODO

date

Date at which to observe historical conditions. If not provided, current conditions will be returned.

distance

If no data are associated with the given ZIP code, find observations from nearby reporting areas within this distance (in miles) (default: 25)

api_key

AirNow API key. By default, the AIRNOW_API_KEY environment variable is used.

Value

Tibble containing current conditions for the given location

Note

API keys can be created by signing up for an account at https://docs.airnowapi.org

Examples

1
2
3
4
## Not run: 
get_conditions(zip = 90210)

## End(Not run)

briandconnelly/aiR documentation built on Sept. 24, 2020, 10:31 a.m.