journal article·2026-03-04Open access

Spatial Modeling of PM2.5 Concentrations Using Random Forest and Geostatistical Interpolation in Kraków, Poland

Elżbieta Węglińska, Mateusz Zaręba, Tomasz Danek

Applied Sciences· Volume 16· Issue 5

Abstract

Spatial mapping of PM2.5 in complex urban and suburban terrains remains challenging for classical geostatistical interpolation. This study evaluates a Random Forest (RF) framework for high-resolution air pollution mapping and compares its performance with ordinary kriging in the Kraków region. The analysis integrates measurements from 51 low-cost air quality sensors with topographic and meteorological predictors, including elevation, temperature, relative humidity, and wind speed. Five representative hours during a relatively windless, inversion dominated day were selected to examine hourly variability in pollution patterns. Model robustness was assessed using leave-one-out (LOO) cross-validation, while interpretability was addressed through permutation-based predictor importance analysis. The RF model achieved high predictive accuracy (R2 = 0.85 to 0.95) and good spatial stability with an LOO standard error below 5%. Elevation consistently emerged as the dominant predictor, confirming the key role of terrain-controlled accumulation, while temperature and humidity gained importance during evening and nighttime hours. The RF approach captured fine-scale transport features along river valleys that were not resolved by ordinary kriging, which produced smoother but less interpretable surfaces. The results demonstrate that RF mapping provides an accurate and explainable support to traditional geostatistical methods for analyzing urban air pollution dynamics in complex terrain.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Air Quality Monitoring and Forecasting · Air Quality and Health Impacts · Atmospheric chemistry and aerosols

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Geoinformatics and Applied Computer Science, Faculty of Geology, Geophysics and Environmental Protection, AGH University of Kraków, 30-059 Krakow, Poland

Funding

AGH University of Krakow, Faculty of Geology, Geophysics and Environmental Protection · Excellence initiative-research university for the AGH University of Krakow

References (39)

Show source-provided references
1. The Respiratory Risks of Ambient/Outdoor Air Pollution10.1016/j.ccm.2020.08.013 ↗
2. Chronic Exposure to Ambient PM2.5/NO2 and Respiratory Health in School Children: A Prospective Cohort Study in Hong Kong10.1016/j.ecoenv.2023.114558 ↗
3. Long-Term Association of Air Pollution and Hospital Admissions Among Medicare Participants Using a Doubly Robust Additive Model10.1161/CIRCULATIONAHA.120.050252 ↗
4. Fine Particulate Air Pollution and Hospital Admission for Cardiovascular and Respiratory Diseases10.1001/jama.295.10.1127 ↗
5. PM2.5 and Its Components and Respiratory Disease Healthcare Encounters—Unanticipated Increased Exposure–Response Relationships in Recent Years after Environmental Policies10.1016/j.envpol.2024.124585 ↗
6. Effect of Ambient Fine Particulates (PM2.5) on Hospital Admissions for Respiratory and Cardiovascular Diseases in Wuhan, China10.1186/s12931-021-01731-x ↗
7. Particulate Matter Air Pollution: Effects on the Respiratory System10.1172/JCI194312 ↗
8. Air pollution and lung cancer incidence in 17 European cohorts: Prospective analyses from the European Study of Cohorts for Air Pollution Effects (ESCAPE)10.1016/S1470-2045(13)70279-1 ↗
9. The influence of meteorological factors and terrain on air pollution concentration and migration: A geostatistical case study from Krakow, Poland10.1038/s41598-022-15160-3 ↗
10. Air pollution seasons in urban moderate climate areas through big data analytics10.1038/s41598-024-52733-w ↗
11. Explainable AI for effective management of urban heat sources10.1038/s41598-025-24305-z ↗
12. Hůnová, I. (2020). Ambient Air Quality in the Czech Republic: Past and Present. Atmosphere, 11.10.3390/atmos11020214 ↗
13. Arnaut, F., Đurđević, V., Kolarski, A., Srećković, V.A., and Jevremović, S. (2024). Improving Air Quality Data Reliability through Bi-Directional Univariate Imputation with the Random Forest Algorithm. Sustainability, 16.10.3390/su16177629 ↗
14. Choi, S.-M., and Choi, H. (2021). Statistical Modeling for PM10, PM2.5 and PM1 at Gangneung Affected by Local Meteorological Variables and PM10 and PM2.5 at Beijing for Non- and Dust Periods. Appl. Sci., 11.10.3390/app112411958 ↗
15. Cisneros, R., Schweizer, D., Amiri, M., Zarate-Gonzalez, G., and Gharibi, H. (2025). Long-Term Fine Particulate Matter (PM2.5) Trends and Exposure Patterns in the San Joaquin Valley of California. Atmosphere, 16.10.3390/atmos16060721 ↗
16. Evaluating Machine Learning Models for Air Quality Error Mapping in Kraków, Poland
17. A novel methodology for Explainable Artificial Intelligence integrated with geostatistics for air pollution control and environmental management10.1016/j.ecoinf.2025.103450 ↗
18. Cogiel, S., Zareba, M., Danek, T., and Arnaut, F. (2026). Automating Air Pollution Map Analysis with Multi-Modal AI and Visual Context Engineering. Atmosphere, 17.10.3390/atmos17010002 ↗
19. Oliver, M.A., and Webster, R. (2015). Basic Steps in Geostatistics: The Variogram and Kriging, Springer.10.1007/978-3-319-15865-5 ↗
20. Random Forests10.1023/A:1010933404324 ↗
21. Random forest as a generic framework for predictive modeling of spatial and spatio-temporal variables10.7717/peerj.5518 ↗
22. Geographical random forests: A spatial extension of the random forest algorithm to address spatial heterogeneity in remote sensing and population modelling10.1080/10106049.2019.1595177 ↗
23. A Truly Spatial Random Forests Algorithm for Geoscience Data Analysis and Modelling10.1007/s11004-021-09946-w ↗
24. Morawiec, T., Zaręba, M., Danek, T., and Chuchro, M. (2026). Air Pollution Macro-Regions Identification Using Machine Learning and Spatio-Temporal Analysis. PLoS ONE, 21.10.1371/journal.pone.0340191 ↗
25. Zareba, M. (2025). Assessing the Role of Energy Mix in Long-Term Air Pollution Trends: Initial Evidence from Poland. Energies, 18.10.3390/en18051211 ↗
26. (2026, January 01). Directive 2008/50/EC of the European Parliament and of the Council of 21 May 2008 on ambient air quality and cleaner air for Europe. Available online: http://data.europa.eu/eli/dir/2008/50/oj.
27. (2026, January 01). Airly Pure. Available online: https://airly.org/en/solutions/airly-pure/.
28. Vogt, M., Schneider, P., Castell, N., and Hamer, P. (2021). Assessment of Low-Cost Particulate Matter Sensor Systems against Optical and Gravimetric Methods in a Field Co-Location in Norway. Atmosphere, 12.10.3390/atmos12080961 ↗
29. (2026, January 01). Airly Air Quality Monitors Comply with MCERTS Performance Standards for Indicative Ambient Particulate Monitoring. Available online: https://airly.org/en/airly-air-quality-monitors-comply-with-mcerts-performance-standards-for-indicative-ambient-particulate-monitoring/.
30. European Space Agency (ESA), and Airbus (2025, November 26). Copernicus DEM; Copernicus Data Space Ecosystem: 2022. Available online: https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM.
31. Zippenfenig, P. (2023). Open-Meteo.com Weather API [Computer Software], Zenodo, CERN.
32. Ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R10.18637/jss.v077.i01 ↗
33. Strobl, C., Boulesteix, A., Kneib, T., Augustin, T., and Zeileis, A. (2008). Conditional variable importance for random forests. BMC Bioinf., 9.10.1186/1471-2105-9-307 ↗
34. Wackernagel, H. (1995). Ordinary Kriging. Multivariate Geostatistics, Springer.10.1007/978-3-662-03098-1_11 ↗
35. The use of the GIS tools in the analysis of air quality on the selected University campus in Poland
36. Felici-Castell, S., Fernandez-Vargas, E., Segura-Garcia, J., Perez-Solano, J.J., Fayos-Jordan, R., and Lopez-Ballester, J. (2023). Accurate Estimation of Air Pollution in Outdoor Routes for Citizens and Decision Making. Appl. Sci., 13.10.3390/app13179930 ↗
37. Prediction of PM2.5 in DKI Jakarta Using Ordinary Kriging Method10.20885/enthusiastic.vol3.iss1.art5 ↗
38. Shin, J., Woo, J., Choe, Y., Min, G., Kim, D., Kim, D., Lee, S., and Yang, W. (2024). Spatiotemporal Exposure Assessment of PM2.5 Concentration Using a Sensor-Based Air Monitoring System. Atmosphere, 15.10.3390/atmos15060664 ↗
39. Węglińska, E., Sabal, M., Zareba, M., and Danek, T. (2026). Income, Heating Technologies and Behavioral Patterns as Drivers of Particulate Matter Emissions in the Kraków Metropolitan Area. Energies, 19.10.3390/en19010283 ↗