Spatiotemporal Air Quality Forecasting in South Africa Using the LSTM Model
Abstract
1. Introduction
2. Study Area
3. Data and Methods
3.1. Datasets
3.2. LSTM
LSTM Model Development
- Data Acquisition and Preprocessing
- Feature Engineering
- Model Architecture Design
- Model Training
- Model Evaluation
- Model Deployment and Interpretation
4. Results and Discussion
4.1. Spatial Distribution Maps for NO2, SO2 and PM2.5
4.2. Spatial Distribution Maps for AQI
4.3. Model Performance and Error Analysis
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Samal, K.K.R.; Panda, A.K.; Babu, K.S.; Das, S.K. An improved pollution forecasting model with meteorological impact using multiple imputation and fine-tuning approach. Sustain. Cities Soc. 2021, 70, 102923. [Google Scholar] [CrossRef]
- Bekkar, A.; Hssina, B.; Douzi, S.; Douzi, K. Air-pollution prediction in smart city, deep learning approach. J. Big Data 2021, 8, 161. [Google Scholar] [CrossRef] [PubMed]
- Mao, W.; Jiao, L.; Wang, W.; Wang, J.; Tong, X.; Zhao, S. A hybrid integrated deep learning model for predicting various air pollutants. GISci. Remote Sens. 2021, 58, 1395–1412. [Google Scholar] [CrossRef]
- Chen, G.; Chen, S.; Li, D.; Chen, C. A hybrid deep learning air pollution prediction approach based on neighborhood selection and spatio-temporal attention. Sci. Rep. 2025, 15, 3685. [Google Scholar] [CrossRef] [PubMed]
- Li, D.; Liu, J.; Zhao, Y. Prediction of multi-site PM2.5 concentrations in Beijing using CNN-BiLSTM with CBAM. Atmosphere 2022, 13, 1719. [Google Scholar] [CrossRef]
- Qin, D.; Yu, J.; Zou, G.; Yong, R.; Zhao, Q.; Zhang, B. A novel combined prediction scheme based on CNN and LSTM for urban PM2.5 concentration. IEEE Access 2019, 7, 20050–20059. [Google Scholar] [CrossRef]
- Necula, S.-C.; Hauer, I.; Fotache, D.; Hurbean, L. Advanced hybrid models for air pollution forecasting: Combining SARIMA and BiLSTM architectures. Electronics 2025, 14, 549. [Google Scholar] [CrossRef]
- Cabaneros, S.M.; Calautit, J.K.; Hughes, B.R. A review of artificial neural network models for ambient air pollution prediction. Environ. Model. Softw. 2019, 119, 285–304. [Google Scholar] [CrossRef]
- Jiang, P.; Dong, Q.; Li, P. A novel hybrid strategy for PM2.5 concentration analysis and prediction. J. Environ. Manag. 2017, 196, 443–457. [Google Scholar] [CrossRef] [PubMed]
- Salman, A.G.; Heryadi, Y.; Abdurahman, E.; Suparta, W. Single-layer and multi-layer long short-term memory (LSTM) model with intermediate variables for weather forecasting. Procedia Comput. Sci. 2018, 135, 89–98. [Google Scholar] [CrossRef]
- Wang, S.; McGibbon, J.; Zhang, Y. Predicting high-resolution air quality using machine learning: Integration of large eddy simulation and urban morphology data. Environ. Pollut. 2024, 344, 123371. [Google Scholar] [CrossRef] [PubMed]
- Ngamlana, N.B.; Malherbe, W.; Gericke, G.; Coetzer, R.L.J. The effect of coal-fired power plants on ambient air quality in Mpumalanga Province, South Africa, 2014–2018. Int. J. Environ. Health Res. 2025, 35, 220–232. [Google Scholar] [CrossRef] [PubMed]
- Williams, C.R.; Leaner, J.J.; Nel, J.M.; Somerset, V.S. Mercury concentrations in water resources potentially impacted by coal-fired power stations and artisanal gold mining in Mpumalanga, South Africa. J. Environ. Sci. Health A 2010, 45, 1363–1373. [Google Scholar] [CrossRef] [PubMed]
- Laisani, J.; Jegede, A.O. Impacts of coal mining in Witbank, Mpumalanga Province of South Africa: An eco-legal perspective. J. Rev. Glob. Econ. 2019, 8, 1586–1597. [Google Scholar] [CrossRef]
- Balashov, N.V.; Thompson, A.M.; Piketh, S.J.; Langerman, K.E. Surface ozone variability and trends over the South African Highveld from 1990 to 2007. J. Geophys. Res. Atmos. 2014, 119, 4323–4342. [Google Scholar] [CrossRef]
- Magagula, M.; Atangana, E.; Oberholster, P. Assessment of the impact of coal mining on water resources in Middelburg, Mpumalanga Province, South Africa using different water quality indices. Hydrology 2024, 11, 113. [Google Scholar] [CrossRef]
- Laakso, L.; Vakkari, V.; Virkkula, A.; Laakso, H.; Backman, J.; Kulmala, M.; Beukes, J.P.; Van Zyl, P.G.; Tiitta, P.; Josipovic, M.; et al. South African EUCAARI measurements: Seasonal variation of trace gases and aerosol optical properties. Atmos. Chem. Phys. 2012, 12, 1847–1864. [Google Scholar] [CrossRef]
- Theys, N.; Hedelt, P.; De Smedt, I.; Lerot, C.; Yu, H.; Vlietinck, J.; Pedergnana, M.; Arellano, S.; Galle, B.; Fernandez, D.; et al. Global monitoring of volcanic SO2 degassing with unprecedented resolution from TROPOMI onboard Sentinel-5 Precursor. Sci. Rep. 2019, 9, 2643. [Google Scholar] [CrossRef] [PubMed]
- Tilstra, L.G.; de Graaf, M.; Wang, P.; Stammes, P. In-orbit Earth reflectance validation of TROPOMI onboard the Sentinel-5 Precursor satellite. Atmos. Meas. Tech. 2020, 13, 4479–4497. [Google Scholar] [CrossRef]
- Verhoelst, T.; Compernolle, S.; Pinardi, G.; Lambert, J.C.; Eskes, H.J.; Eichmann, K.U.; Fjæraa, A.M.; Granville, J.; Niemeijer, S.; Cede, A.; et al. Ground-based validation of the Copernicus Sentinel-5P TROPOMI NO2 measurements with the NDACC ZSL-DOAS, MAX-DOAS and Pandonia global networks. Atmos. Meas. Tech. 2021, 14, 481–510. [Google Scholar] [CrossRef]
- Prakash, S.; Jalal, A.S.; Pathak, P. Forecasting COVID-19 pandemic using Prophet, LSTM, hybrid GRU-LSTM, CNN-LSTM, Bi-LSTM and stacked-LSTM for India. In Proceedings of the 6th International Conference on Information Systems and Computer Networks (ISCON), Mathura, India, 3–4 March 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 1–6. [Google Scholar] [CrossRef]
- Luo, J.; Gong, Y. Air pollutant prediction based on ARIMAWOA-LSTM model. Atmos. Pollut. Res. 2023, 14, 101761. [Google Scholar] [CrossRef]
- Hamayel, M.J.; Owda, A.Y. A novel cryptocurrency price prediction model using GRU, LSTM and Bi-LSTM machine learning algorithms. AI 2021, 2, 477–496. [Google Scholar] [CrossRef]
- Zheng, Y.; Liu, F.; Hsieh, H.P. U-Air: When Urban Air Quality Inference Meets Big Data. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining; ACM: Sydney, Australia, 2015; pp. 1436–1444. [Google Scholar]
- Li, X.; Peng, L.; Hu, Y.; Shao, J.; Chi, T. Deep Learning Architecture for Air Quality Predictions. Environ. Sci. Pollut. Res. 2016, 23, 22408–22417. [Google Scholar] [CrossRef] [PubMed]
- Du, Y.; Xu, Y.; Chu, X.; Guo, J.; Wang, Y. Air Quality Forecasting Using a Hybrid Deep Learning Model. Atmos. Environ. 2018, 181, 244–255. [Google Scholar]
- Kumar, P.; Morawska, L.; Martani, C.; Biskos, G.; Neophytou, M.; Di Sabatino, S.; Bell, M.; Norford, L.; Britter, R. Forecasting Air Quality Using Deep Recurrent Neural Networks. Sci. Total Environ. 2019, 650, 1506–1515. [Google Scholar]







| Component | Configuration |
|---|---|
| Model Type | Long Short-Term Memory (LSTM) |
| Input Shape | (3615, 1) |
| Input Features | PM2.5, SO2, NO2, AQI |
| LSTM Layer 1 | 64 units, return sequences = True |
| Dropout Layer 1 | 0.2 |
| LSTM Layer 2 | 32 units, return sequences = False |
| Dropout Layer 2 | 0.2 |
| Dense Layer | 16 units, ReLU activation |
| Output Layer | 1 unit, Linear activation |
| Loss Function | Mean Squared Error (MSE) |
| Optimizer | Adam |
| Learning Rate | 0.001 |
| Batch Size | 32 |
| Epochs | 50 |
| Validation Split | 30% |
| Evaluation Metrics | RMSE, MSE |
| Variable | RMSE | MSE |
|---|---|---|
| SO2 | 0.01616764797007 | 0.0002628326944634 |
| NO2 | 0.01181624955378 | 0.0001395414387 |
| PM2.5 | 0.0020567375749126217 | 4.230169452057453 × 10−6 |
| AQI | 0.020390 | 0.000416 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Shikwambana, L.; Sebake, M.; Molefe, M.; Havenga, H.; Mbatha, N. Spatiotemporal Air Quality Forecasting in South Africa Using the LSTM Model. Atmosphere 2026, 17, 610. https://doi.org/10.3390/atmos17060610
Shikwambana L, Sebake M, Molefe M, Havenga H, Mbatha N. Spatiotemporal Air Quality Forecasting in South Africa Using the LSTM Model. Atmosphere. 2026; 17(6):610. https://doi.org/10.3390/atmos17060610
Chicago/Turabian StyleShikwambana, Lerato, Moloko Sebake, Moleboheng Molefe, Henno Havenga, and Nkanyiso Mbatha. 2026. "Spatiotemporal Air Quality Forecasting in South Africa Using the LSTM Model" Atmosphere 17, no. 6: 610. https://doi.org/10.3390/atmos17060610
APA StyleShikwambana, L., Sebake, M., Molefe, M., Havenga, H., & Mbatha, N. (2026). Spatiotemporal Air Quality Forecasting in South Africa Using the LSTM Model. Atmosphere, 17(6), 610. https://doi.org/10.3390/atmos17060610

