act.discovery.get_airnow_obs#
- act.discovery.get_airnow_obs(token, date=None, zipcode=None, latlon=None, distance=25)[source]#
This tool will get current or historical observed AQI values and categories for a reporting area by either Zip code or Lat/Lon coordinate. https://docs.airnowapi.org/
- Parameters:
token (str) – The access token for accesing the AirNowAPI web server
date (str) – The date of the data to be acquired. Format is YYYY-MM-DD Default is None which will pull most recent observations
zipcode (str) – The zipcode of the location for the data request. If zipcode is not defined then a latlon coordinate must be defined.
latlon (array) – The latlon coordinate of the loaction for the data request. If latlon is not defined then a zipcode must be defined.
distance (int) – If no reporting are is associated with the specified zipcode or latlon, return a forcast from a nearby reporting area with this distance (in miles). Default is 25 miles
- Returns:
ds (xarray.Dataset) – Returns an xarray dataset object
Example
act.discovery.get_AirNow_obs(token=’XXXXXX’, date=’2021-12-01’, zipcode=’60440’) act.discovery.get_AirNow_obs(token=’XXXXXX’, latlon=[45,-87])