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
- The app determines the current map center coordinates
- The center coordinates are reverse-geocoded to a zip code using the OSM Nominatim API
- The zip code is passed to the AirNow API via the server's
/airnowproxy - Stations are grouped by area and sorted by AQI value (highest first)
AQI Categories
| AQI Range | Category | Meaning |
|---|---|---|
| 0–50 | Good | Air quality is satisfactory |
| 51–100 | Moderate | Acceptable; some pollutants may be a concern for sensitive groups |
| 101–150 | Unhealthy for Sensitive Groups | Members of sensitive groups may experience effects |
| 151–200 | Unhealthy | Everyone may begin to experience health effects |
| 201–300 | Very Unhealthy | Health alert: everyone may experience more serious effects |
| 301–500 | Hazardous | Health 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