Transformer-based Deep Learning for COVID-19 Prediction Based on Climate Variables in Indonesia

- Kurnianingsih, Anindya Wirasatriya, Lutfan Lazuardi, Adi Wibowo, Nurseno Bayu Aji, Beno Kunto Pradekso, Sigit Prasetyo, Eri Sato-Shimokawara


Recent research on the effect of climate variables on coronavirus (COVID-19) transmission has emerged. Climate change has the potential to cause new viral outbreaks, illness, and death. This study contributes to COVID-19 disease prevention efforts. This study makes two contributions: (1) we investigated the impact of climate variables on the number of COVID-19 cases in 34 Indonesian provinces; and (2) we developed a transformer-based deep learning model for time series forecasting for the number of positive COVID-19 cases the following day based on climate variables in 34 Indonesian provinces. We obtained data from March 15, 2020 to July 22, 2021 on the number of positive COVID-19 cases and climate change variables (wind, temperature, humidity) in Indonesia. To examine the effect of climate change on the number of positive COVID-19 cases, we employed 15 scenarios for training. The experiment results of the proposed model show that the combination of wind speed and humidity has a weakly positive correlation with positive COVID-19 incidence. However, temperature has a considerably negative association with positive COVID-19 incidences. Compared to the other testing scenarios, the transformer-based deep learning model produced the lowest MAE of 175.96 and the lowest RMSE of 375.81. This study demonstrates that the transformer model works well in several provinces, such as Sumatra, Java, Papua, Bali, West Nusa Tenggara, East Nusa Tenggara, East Kalimantan, and Sulawesi, but not in Central Kalimantan, West Sulawesi, South Sulawesi, and North Sulawesi.


COVID-19 prediction; climate variables; transformer-based deep learning

Full Text:



G. J. Soufi et al., “SARS-CoV-2 (COVID-19): New discoveries and current challenges,†Appl. Sci., vol. 10, no. 10, 2020, doi: 10.3390/app10103641.

T. Singhal, “A Review of Coronavirus Disease-2019 (COVID-19),†Indian J. Pediatr., vol. 87, no. 4, pp. 281–286, 2020, doi: 10.1007/s12098-020-03263-6.

G. Cacciapaglia, C. Cot, and F. Sannino, “Second wave COVID-19 pandemics in Europe: a temporal playbook,†Sci. Rep., vol. 10, no. 1, pp. 1–8, 2020, doi: 10.1038/s41598-020-72611-5.

L. A. Post et al., “SARS-CoV-2 wave two surveillance in east Asia and the pacific: Longitudinal trend analysis,†J. Med. Internet Res., vol. 23, no. 2, 2021, doi: 10.2196/25454.

S. Susilawati, R. Falefi, and A. Purwoko, “Impact of COVID-19’s Pandemic on the Economy of Indonesia,†Budapest Int. Res. Critics Inst. Humanit. Soc. Sci., vol. 3, no. 2, pp. 1147–1156, 2020, doi: 10.33258/birci.v3i2.954.

S. Chen et al., “Climate and the spread of COVID-19,†Sci. Rep., vol. 11, no. 1, p. 9042, 2021, doi: 10.1038/s41598-021-87692-z.

Y. A. Saputra, D. Susanna, and V. Y. Saki, “Impact of climate variables on covid-19 pandemic in asia: A systematic review,†Kesmas, vol. 16, no. 1, pp. 82–89, 2021, doi: 10.21109/kesmas.v0i0.5211.

D. Paraskevis et al., “A review of the impact of weather and climate variables to COVID-19: In the absence of public health measures high temperatures cannot probably mitigate outbreaks,†Sci. Total Environ., vol. 768, 2021, doi: 10.1016/j.scitotenv.2020.144578.

P. Mecenas, R. T. da Rosa Moreira Bastos, A. C. Rosário Vallinoto, and D. Normando, “Effects of temperature and humidity on the spread of COVID-19: A systematic review,†PLoS One, vol. 15, no. 9 September, pp. 1–21, 2020, doi: 10.1371/journal.pone.0238339.

M. Jayaweera, H. Perera, B. Gunawardana, and J. Manatunge, “Transmission of COVID-19 virus by droplets and aerosols: A critical review on the unresolved dichotomy,†Environ. Res., vol. 188, no. June, p. 109819, 2020, doi: 10.1016/j.envres.2020.109819.

D. K. A. Rosario, Y. S. Mutz, P. C. Bernardes, and C. A. Conte-Junior, “Relationship between COVID-19 and weather: Case study in a tropical country,†Int. J. Hyg. Environ. Health, vol. 229, no. April, p. 113587, 2020, doi: 10.1016/j.ijheh.2020.113587.

M. C. Castro, S. Gurzenda, C. M. Turra, S. Kim, T. Andrasfay, and N. Goldman, “Reduction in life expectancy in Brazil after COVID-19,†Nat. Med., vol. 27, no. 9, pp. 1629–1635, 2021, doi: 10.1038/s41591-021-01437-z.

R. Tosepu et al., “Correlation between weather and Covid-19 pandemic in Jakarta, Indonesia,†Sci. Total Environ., vol. 725, 2020, doi: 10.1016/j.scitotenv.2020.138436.

B. Jan et al., “Deep learning in big data Analytics: A comparative study,†Comput. Electr. Eng., vol. 75, pp. 275–287, 2019, doi: 10.1016/j.compeleceng.2017.12.009.

R. Leszczyna, “Aiming at methods’ wider adoption: Applicability determinants and metrics,†Comput. Sci. Rev., vol. 40, p. 100387, 2021, doi: 10.1016/j.cosrev.2021.100387.

Z. Liu et al., “Swin Transformer,†2021 IEEE/CVF Int. Conf. Comput. Vis., pp. 9992–10002, 2021, [Online]. Available:

N. Wu, B. Green, X. Ben, and S. O’Banion, “Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case,†2020, [Online]. Available:

K. H. Ho, P. S. Huang, I. C. Wu, and F. J. Wang, “Prediction of Time Series Data Based on Transformer with Soft Dynamic Time Wrapping,†2020 IEEE Int. Conf. Consum. Electron. - Taiwan, ICCE-Taiwan 2020, pp. 2020–2021, 2020, doi: 10.1109/ICCE-Taiwan49838.2020.9258155.

Z. Yin, Y. Zhen, C. Huo, and J. Chen, “Deep learning based transformer fault diagnosis method,†2021 IEEE 2nd Int. Conf. Big Data, Artif. Intell. Internet Things Eng. ICBAIE 2021, no. Icbaie, pp. 216–219, 2021, doi: 10.1109/ICBAIE52039.2021.9389975.

S. Roy et al., “Deep Learning for Classification and Localization of COVID-19 Markers in Point-of-Care Lung Ultrasound,†IEEE Trans. Med. Imaging, vol. 39, no. 8, pp. 2676–2687, 2020, doi: 10.1109/TMI.2020.2994459.

A. Ahmet and T. Abdullah, “Real-Time Social Media Analytics with Deep Transformer Language Models: A Big Data Approach,†Proc. - 2020 IEEE 14th Int. Conf. Big Data Sci. Eng. BigDataSE 2020, pp. 41–48, 2020, doi: 10.1109/BigDataSE50710.2020.00014.

H. H. Nguyen, S. Saarakkala, M. B. Blaschko, and A. Tiulpin, “CLIMAT: Clinically-Inspired Multi-Agent Transformers for Knee Osteoarthritis Trajectory Forecasting,†Proc. - Int. Symp. Biomed. Imaging, vol. 2022-March, 2022, doi: 10.1109/ISBI52829.2022.9761545.

G. Zerveas, S. Jayaraman, D. Patel, A. Bhamidipaty, and C. Eickhoff, A Transformer-based Framework for Multivariate Time Series Representation Learning, vol. 1, no. 1. Association for Computing Machinery, 2021.

T. O. Hodson, “Root-mean-square error (RMSE) or mean absolute error (MAE): when to use them or not,†Geosci. Model Dev., vol. 15, no. 14, pp. 5481–5487, 2022, doi: 10.5194/gmd-15-5481-2022.

O. Iloanusi and A. Ross, “Leveraging weather data for forecasting cases-to-mortality rates due to COVID-19,†Chaos, Solitons and Fractals, vol. 152, p. 111340, 2021, doi: 10.1016/j.chaos.2021.111340.

K. R. Bhimala, G. K. Patra, R. Mopuri, and S. R. Mutheneni, “Prediction of COVID-19 cases using the weather integrated deep learning approach for India,†Transbound. Emerg. Dis., vol. 69, no. 3, pp. 1349–1363, 2022, doi: 10.1111/tbed.14102.

H. Batool and L. Tian, “Correlation Determination between COVID-19 and Weather Parameters Using Time Series Forecasting: A Case Study in Pakistan,†Math. Probl. Eng., vol. 2021, no. November 2020, 2021, doi: 10.1155/2021/9953283.

L. R. Kolozsvári et al., “Predicting the epidemic curve of the coronavirus (SARS-CoV-2) disease (COVID-19) using artificial intelligence: An application on the first and second waves,†Informatics Med. Unlocked, vol. 25, no. July, 2021, doi: 10.1016/j.imu.2021.100691.

F. Khennou and M. A. Akhloufi, “Forecasting COVID-19 Spreading in Canada using Deep Learning,†medRxiv, pp. 1–11, 2021.

“Kawal informasi seputar COVID-19 secara tepat dan akurat.† (accessed Nov. 01, 2021).

“Climate Data Store.†!/dataset/reanalysis-era5-land?tab=for (accessed Nov. 01, 2021).

A. Ali, “Remarks on the use of Pearson’s and Spearman’s correlation coefficients in assessing relationships in ophthalmic data,†African Vis. Eye Heal., vol. 80, no. 1, p. 10, 2021, [Online]. Available:

S. H. Haji and A. M. Abdulazeez, “Comparison Of Optimization Techniques Based On Gradient Descent Algorithm : A Review,†vol. 18, no. 4, pp. 2715–2743, 2021.

S. Sarkar, “Classification and pattern extraction of incidents : a deep learning- based approach,†Neural Comput. Appl., vol. 34, no. 17, pp. 14253–14274, 2022, doi: 10.1007/s00521-021-06780-3.

L. Wright and N. Demeure, “A Synergistic Deep Learning Optimizer,†2021.

M. F. F. Sobral, G. B. Duarte, A. I. G. da Penha Sobral, M. L. M. Marinho, and A. de Souza Melo, “Association between climate variables and global transmission oF SARS-CoV-2,†Sci. Total Environ., vol. 729, p. 138997, 2020, doi: 10.1016/j.scitotenv.2020.138997.

P. Shi et al., “Impact of temperature on the dynamics of the COVID-19 outbreak in China,†Sci. Total Environ., vol. 728, no. 77, p. 138890, 2020, doi: 10.1016/j.scitotenv.2020.138890.



  • There are currently no refbacks.

Published by INSIGHT - Indonesian Society for Knowledge and Human Development