This study develops AirGuide AI, a machine learning system that combines hyperlocal air quality sensor data and weather information to forecast neighborhood-level AQI one to three hours in advance. The system was deployed as a real-time application in Fremont, California, demonstrating how hyperlocal forecasting can support more informed outdoor activity and route-planning decisions.
Air quality is a critical determinant of public health, yet publicly reported Air Quality Index (AQI) values are typically aggregated at the city or regional level and may mask substantial intra-city variability. Relying solely on city-level AQI can lead individuals to make decisions that do not reflect actual air quality conditions at their specific location. This study presents the design, production deployment, and operational validation of a machine learning–based system for short-horizon (1-hour and 3-hour) neighborhood-level air quality forecasting. The proposed framework integrates hyperlocal PM2.5 sensor data from PurpleAir IoT network with meteorological variables from Open-Meteo, including temperature, relative humidity, wind speed and wind direction. Gradient-boosted tree models (XGBoost) were trained to predict short-term PM2.5 concentrations, which were then converted to AQI. To improve stability across pollution regimes, a calibrated ensemble combining model predictions with short-term persistence was implemented. The system was developed for the city of Fremont, California. The trained models were validated on a two-year historical dataset capturing seasonal variability, as well as on an unseen test set comprising of two months of observations. The system demonstrated stable performance across most AQI ranges. To better incorporate current air quality conditions an ensemble blending methodology was added to the Inference pipeline. The forecasting engine was deployed as a real-time API and integrated into a front-end application that supports single-location AQI forecasts and route-planning between two locations. This study demonstrates the feasibility of operational hyperlocal AQI forecasting using ML and highlights its practical applicability for real-time environment decision support.
Related Projects