Skip to main content

Air Quality (AQI)

The Air Quality panel displays current Air Quality Index (AQI) readings from monitoring stations near the center of the map view.

Enabling the AQI Panel

In the sidebar under Live Observation → Air Quality, click Show Air Quality. The panel expands to show a list of nearby AQI stations. Click the button again to collapse the panel.

How It Works

  1. The app determines the current map center coordinates
  2. The center coordinates are reverse-geocoded to a zip code using the OSM Nominatim API
  3. The zip code is passed to the AirNow API via the server's /airnow proxy
  4. Stations are grouped by area and sorted by AQI value (highest first)

AQI Categories

AQI RangeCategoryMeaning
0–50GoodAir quality is satisfactory
51–100ModerateAcceptable; some pollutants may be a concern for sensitive groups
101–150Unhealthy for Sensitive GroupsMembers of sensitive groups may experience effects
151–200UnhealthyEveryone may begin to experience health effects
201–300Very UnhealthyHealth alert: everyone may experience more serious effects
301–500HazardousHealth warnings of emergency conditions

Displayed Information

Each station entry shows:

  • Pollutant parameter (e.g., PM2.5, Ozone)
  • AQI value
  • Category (colored label)
  • Last update timestamp

Data Source

AQI data comes from the AirNow API. The server proxies requests to:

https://www.airnowapi.org/aq/observation/zipCode/current/?format=application/json&zipCode={zip}&distance=25&API_KEY={key}

The AIRNOW_API_KEY environment variable must be set.

Notes

  • AQI data updates when the panel is opened or when Show Air Quality is re-toggled
  • Coverage depends on AirNow monitoring station density in the area; rural areas may return no data
  • If no zip code can be determined (open ocean, etc.), the panel may show no results