Retrospective ML study · Live explorer
Broward Air Quality
Building an auditable next-day PM2.5 pipeline and measuring where prediction improves on persistence.
Overview / Motivation
This project studies next-day PM2.5 at six Broward County monitoring stations using public observations from 2019–2025, with different start dates by station. The local focus turns an applied machine-learning project into a measurable question: does regression improve on predicting that tomorrow will equal today?
Architecture / How It Works
A Python collector audits 390 Florida DEP monthly reports and preserves source files, retrieval metadata and hashes. EPA daily archives supply method-checked modeling observations; DEP values remain a comparison source. Eight ERA5 weather variables are aligned with station days using fixed UTC−5.
The feature builder creates 11,483 eligible examples. Features use pollution history and weather through day t; the observed target is calendar day t+1. Calendar gaps remain gaps. A packaged scikit-learn pipeline generates historical predictions, which are exported to a static browser explorer. The browser does not run a live forecasting service.
Key Technical Decisions
- Select corrected or network-aligned EPA methods and require at least 18 hourly observations and 75% daily coverage. Do not average instruments or mix corrected and original histories.
- Use exact calendar lags, including after missing observations. Exclude missing current readings or targets so persistence and regression models share the same evaluation rows.
- Fit imputation and scaling only within each training period. Never include target-day weather or randomly split correlated station-days.
- Train through 2023, select by 2024 mean absolute error, then refit through 2024 and evaluate 2025. Report the new Pompano monitor separately because it has no earlier training history.
Results / Model Selection
Gradient boosting won the 2024 validation comparison. On 1,789 station-days at five established sites in 2025, its mean absolute error was 1.433 µg/m³, compared with 1.466 for persistence: about a 2.3% improvement. Pollution-only ridge achieved 1.410 in the test year. That result does not retroactively change the original validation selection.
All three regression candidates beat persistence in expanding-year development comparisons for 2021–2024. Their ranking varied by year, and adding historical weather did not deliver a consistent advantage. These earlier folds are development diagnostics, not new untouched tests.
Challenges & Tradeoffs
Instrument method history materially changes the labels. The pipeline selects acceptable EPA records instead of treating every reported PM2.5 number as interchangeable.
Peak pollution remains difficult. On 113 station-days at or above the training-period 90th-percentile concentration cutoff, boosting had MAE 4.415 µg/m³ and mean bias −3.947 µg/m³. This relative concentration group is not a health category. Persistence also outperformed the model at Coconut Creek and Vista View in 2025.
ERA5 is delayed, revised gridded reanalysis, and EPA histories include corrections. Even day-t features may not have been available when a real forecast would have been issued. These results support historical analysis, not operational accuracy claims.
Validation / Reproducibility
Thirty offline tests cover source parsing, measurement selection, calendar alignment, split boundaries, missing values, replay date restrictions and demo data validation. Reloading the saved model reproduces all 1,910 original test predictions to numerical tolerance.
The repository includes a Windows/Linux GitHub Actions workflow, documented dependencies, source and model manifests, an architecture diagram and a model card. Full research reproduction remains separate from the offline repository checks. The committed demo can be explored without downloading raw archives.
What I Would Improve in a V2
- Investigate the largest-error dates and distinguish abrupt pollution changes from station or measurement effects before introducing more features.
- For operational forecasting, use timestamped observations or archived forecasts available at issuance, and audit pollutant reporting latency.
- Reserve a new untouched evaluation period before making further model-selection claims; the 2025 results have now been examined.
- Continue showing persistence and station-level errors alongside model predictions rather than presenting only one aggregate score.
Sources
Pollutant observations: US EPA AirData, with Florida DEP reports used for the coverage audit. Weather: Open-Meteo and Copernicus ECMWF ERA5, with CC BY 4.0 attribution retained in the explorer. Detailed selection rules, provenance and limitations are documented in the repository.