Sentiment Analysis of Traffic Accidents in Twitter Tweets Using the Naïve Bayes Method

Authors

  • Aldy Sahputra Saragih Universitas Mandiri Bina Prestasi Author
  • Evantrana Yordan Bangun Universitas Mandiri Bina Prestasi Author
  • Fastabikha Akbar Fahlevi Universitas Mandiri Bina Prestasi Author
  • Ariel Kurniawan Universitas Mandiri Bina Prestasi Author
  • Kristian Sigalingging Universitas Mandiri Bina Prestasi Author
  • Fasta Krel Four Wati Br Haloho Universitas Mandiri Bina Prestasi Author
  • Salman Putra Jaya Hulu Universitas Mandiri Bina Prestasi Author

DOI:

https://doi.org/10.65310/fn3jte47

Keywords:

Sentiment Analysis, Naïve Bayes, Traffic Accident, Infrastructure Evaluation, Twitter Mining.

Abstract

This study develops a robust computational framework using a structured Naïve Bayes architecture to mine, classify, and analyze public discourse regarding traffic accidents on Twitter (now X). Utilizing a massive corpus of 157,629 digital documents, the probabilistic model successfully extracts macro-level sentiment distributions with a high global accuracy of 82.60%. The empirical findings reveal an overwhelming dominance of external factor attributions, accumulating 128,613 tweets, which underscores a critical public sensitivity toward infrastructure malfunctions and suboptimal road conditions in urban environments. By transforming unorganized microblogging texts into structured analytical matrices, this research establishes an economical, real-time social sensor that effectively bypasses the logistical delays of conventional manual reporting systems. Ultimately, this study contributes a novel theoretical repositioning from reactive safety evaluations to data-driven preventive strategies, providing government authorities with a rigorous, scalable decision-making tool to optimize sustainable transportation infrastructure and mitigate urban traffic fatalities.  

 

Downloads

Download data is not yet available.

References

Adiyatma, F. A., Alam, S., & Komara, M. A. (2024). Analisis Sentimen Masyarakat Di Platform X Terhadap Penggunaan Bansos Untuk Memenangkan Salah Satu Capres Tertentu Di Pilpres 2024 Menggunakan Metode Naïve Bayes Classifier. JATI (Jurnal Mahasiswa Teknik Informatika), 8(5), 9941-9947. https://doi.org/10.36040/jati.v8i5.10836

Agustiranti, T., Kurdiana, A. K. I., Al Ghiffari, B., Juniar, E. D., & Purnama, D. G. (2024). Penerapan Naive Bayes Terhadap Sentimen Analisis Media Sosial Twitter Pengguna Kereta Cepat Jakarta-Bandung (Whoosh). Jurnal Ilmu Komputer dan Sistem Informasi (JIKOMSI), 7(1), 297-305. https://doi.org/10.55338/jikomsi.v7i1.2946

Aini, Q., Fauzi, R. R., & Khudzaeva, E. (2023). Economic Impact due Covid-19 Pandemic: Sentiment Analysis on Twitter Using Naï ve Bayes Classifier and Support Vector Machine. JOIV: International Journal on Informatics Visualization, 7(3), 733-741. https://dx.doi.org/10.30630/joiv.7.3.1474

Amin, M. S., Ayon, E. H., Ghosh, B. P., Bhuiyan, M. S., Jewel, R. M., & Linkon, A. A. (2024). Harmonizing macro-financial factors and Twitter sentiment analysis in forecasting stock market trends. Journal of Computer Science and Technology Studies, 6(1), 58-67. https://doi.org/10.32996/jcsts.2024.6.1.7

Ariyani, P. W., Sunarya, I. M. G., & Gunadi, I. G. A. (2025). Analisis Sentimen Masyarakat Terhadap Virus Corona Berdasarkan Opini dari Twitter Menggunakan Metode Naive Bayes dan K-Nearest Neighbor. Jurnal Pendidikan Teknologi dan Kejuruan, 22(2), 128-138. https://doi.org/10.23887/jptk-undiksha.v22i2.103233

Armand, S., & Muttaqin, M. R. (2023). Analisis Sentimen Sistem E-Tilang pada Platform Twitter Menggunakan Metode Naive Bayes. JATI (Jurnal Mahasiswa Teknik Informatika), 7(3), 1989-1994. https://doi.org/10.36040/jati.v7i3.7023

Dey, P., & Dey, S. (2023). Sentiment analysis of text and emoji data for twitter network. Al-Bahir, 3(1), 1. https://doi.org/10.55810/2313-0083.1034

Dharmawan, K. D., & Hasibuan, N. A. M. (2025). Sentiment Analysis of Public Opinion on Road Damage in North Sumatra Using the Naive Bayes Method Based on Weak Supervision (Lexicon-Based). Jurnal Metrokom: Media Teknik Elektro dan Komputer, 2(2), 136-152. https://doi.org/10.65371/metrokom.v2i2.131

Fahmi, M., Yuningsih, Y., & Puspita, A. (2023). Sentiment analysis of online gojek transportation services on twitter using the naïve bayes method. JITK (Jurnal Ilmu Pengetahuan dan Teknologi Komputer), 8(2), 90-96. https://doi.org/10.33480/jitk.v8i2.4004

Fitri, S. D. (2025). Perbandingan Metode Naïve Bayes dan Support Vector Machine Pada Kasus Pembunuhan Vina Cirebon Berdasarkan Data X. JUSTINDO (Jurnal Sistem dan Teknologi Informasi Indonesia), 10(1), 39-49. https://doi.org/10.32528/justindo.v10i1.2550

Henderi, H., & Sofiana, S. (2025). A Machine Learning Approach to Indonesian Climate Change Sentiment Analysis Using Naive Bayes. International Journal of Informatics and Information Systems, 8(1), 33-43. https://doi.org/10.47738/ijiis.v8i1.246

Khosa, J., Mashao, D., & Olanipekun, A. (2025). Sentimental Analysis of Legal Aid Services: A Machine Learning Approach. Journal of Applied Data Sciences, 6(2), 828-844. https://doi.org/10.47738/jads.v6i2.521

Lestari, A., Aswad, M. H., & Masri, S. (2026). Sentiment Analysis of the 2022 Fuel Price Hike Using the Naïve Bayes Classifier. CAUCHY: Jurnal Matematika Murni dan Aplikasi, 11(1), 489-504. https://doi.org/10.18860/cauchy.v11i1.36473

Mohammed Alsekait, D., Fathi, H., Abdallah Ibrahim, S., Shdefat, A. Y., Saleh Alattas, A., & Salama AbdElminaam, D. (2025). Sentiment analysis: A machine learning utilisation for analyzing the sentiments of facebook and twitter posts. Intelligent Data Analysis, 29(4), 889-912. https://doi.org/10.1177/1088467X241301389

Novita, N. R., Herlambang, T., Yudianto, F., & Magfira, D. B. (2025, November). Implementation of Naïve Bayes method for sentiment analysis case study of MBKM. In AIP Conference Proceedings (Vol. 3372, No. 1, p. 040004). AIP Publishing LLC. https://doi.org/10.1063/5.0299482

Patil, S., & Lokesha, V. (2022, May). Live twitter sentiment analysis using streamlit framework. In Proceedings of the International Conference on Innovative Computing & Communication (ICICC). https://dx.doi.org/10.2139/ssrn.4119949

Patil, S., Subil, D., Nasar, N., Kokatnoor, S. A., Krishnan, B., & Kumar, S. (2024). Text Mining-A Comparative Review of Twitter Sentiments Analysis. Recent Advances in Computer Science and Communications (Formerly: Recent Patents on Computer Science), 17(1), 21-37. https://doi.org/10.2174/2666255816666230726140726

Ramanda, M. D., Restiyan, R. D., & Irsyad, H. (2024). Analisis Sentimen Masyarakat terhadap Perilaku Lawan Arah yang Diunggah pada Media Sosial Youtube Menggunakan Naïve Bayes. BANDWIDTH: Journal of Informatics and Computer Engineering, 2(2), 75-83. https://doi.org/10.53769/bandwidth.v2i2.706

Sathivika Roy, T., Vasukidevi, G., Malleswari, T. N., Ushasukhanya, S., & Namratha, N. (2024, October). Automatic classification of railway complaints using machine learning. In E3S Web of Conferences (Vol. 477, p. 00085). EDP Sciences. https://doi.org/10.1051/e3sconf/202447700085

Saw, A., Gupta, S. K., Gupta, S., & Tewari, P. (2024, August). Sentiment Analysis using Machine Learning Technique: A Literature Survey. In Proceedings of the International Conference on Innovative Computing & Communication (ICICC 2024). https://dx.doi.org/10.2139/ssrn.4938131

Sayed, M. A., Hossain, M. A., Rahman, M. M., Ali, G. G., Islam, M. A., Paul, K. C., & Qin, X. Machine Learning Based Public Sentiment Analytics on Roadway Work-Zone Tweets. Machine Learning Based Public Sentiment Analytics on Roadway Work-Zone Tweets. https://dx.doi.org/10.2139/ssrn.4334677

Vanjare, N., Sarodi, N., Tantry, R., Koshe, A., & RB, R. (2022, April). Real-Time Citizen Problem Detection From Twitter Data Using Naive Bayes Classifier. In Proceedings of the International Conference on Innovative Computing & Communication (ICICC). https://dx.doi.org/10.2139/ssrn.4097217

Downloads

Published

2026-06-24

How to Cite

Sentiment Analysis of Traffic Accidents in Twitter Tweets Using the Naïve Bayes Method. (2026). Journal of Engineering and Applied Technology, 2(1), 342-352. https://doi.org/10.65310/fn3jte47