Open Hexagon-Based Air Pollution Prediction Service with Public API and Embeddable Web Widget
摘要
Air pollution prediction services are often locked behind proprietary dashboards, limiting their reuse in external applications and city-scale decision support tools. This paper presents a city-agnostic air pollution prediction system that combines an H3 hexagonal spatial index with a RESTful data API and an embeddable web widget for public access. The backend integrates measurements from heterogeneous fixed and mobile sensors, stores time series in a document database, and maintains current aggregations and predictions in a relational schema linked to hexagonal cells. Prediction results and raw measurements are exposed through JSON endpoints, returning both sensor-level data and hex-level aggregations (N \(_{2}\) , PM \(_{10}\) , PM \(_{2.5}\) , temperature, humidity, pressure, etc.). In addition to this API, a configurable JavaScript widget renders interactive hexagon maps and meter views that can be embedded into any HTML5 website to inform citizens, drivers, and third-party services in real-time. The system is designed to be reproducible and portable: any city with basic sensor infrastructure can deploy the stack, expose open data, and integrate its predictions into existing web portals, mobile apps, and transport information systems.