Sentiment Analysis of Twitter towards the 2024 Indonesian Presidential Candidates Using the Naïve Bayes Algorithms

  • Yogi Gunawan Faculty of Science and Technology, Universitas Labuhanbatu, Sumatera Utara Indonesia
  • Iwan Purnama Faculty of Science and Technology, Universitas Labuhanbatu, Sumatera Utara Indonesia
  • Rohani Rohani Faculty of Science and Technology, Universitas Labuhanbatu, Sumatera Utara Indonesia
Keywords: Elections, Presidential Candidates, Naïve Bayes, Sentiment Analysis and Twitter.

Abstract

The increasing use of social media (Twitter) has made it a platform for the public to express their views on the Indonesian presidential candidate in the 2024 elections. The sentiment expressed through comments on Twitter provides important insights into the public perception of the candidates. However, given the volume and speed at which information is disseminated on social media, manual analysis of this sentiment becomes impractical. Therefore, the use of the Naïve Bayes algorithm for automatic sentiment analysis is considered essential to understanding voter support and preferences. The study aims to analyze Twitter users' sentiments towards three Indonesian presidential candidates in 2024, Anies, Ganjar, and Prabowo, using the Naïve Bayes algorithm. We categorize the results of this analysis into three sentiment categories: positive, negative, and neutral. The methods used in the study involved collecting Twitter comment data related to the three candidates, pre-processing data, labeling data, applying the Naïve Bayes algorithm for the classification of sentiment, and evaluation of the performance of the algorithm performed by calculating the level of accuracy. The results of the research showed that the Naïve Bayes algorithm was able to classify sentiments with fairly high precision, namely 75.54% for Anies, 82.74% for Ganjar, and 75.24% for Prabowo. The conclusion of this study is that sentimental analysis using the Naïve Bayes algorithm can provide significant insights into voter preferences and support. The sentimental data generated can serve as a strong foundation for decision-makers to design campaign strategies that are more effective and responsive to public perception. This research also opens up opportunities for further development in the use of sentimental analysis techniques in politics and campaigns.

Downloads

Download data is not yet available.

References

[1] A. D. Riyanto, “Hootsuite (We are Social): Indonesian Digital Report 2023,” andi.link, Indonesia, Apr. 2023. [Online]. Available: https://andi.link/hootsuite-we-are-social-indonesian-digital-report-2023/
[2] I. Anggorosuryo, A. R. Berto, and berta sri eko, “Menganalisis Jaringan Sosial Penggemar Blackpink Saat Konser di Jakarta,” J. Komun. Prof., vol. 8, no. 1 SE-Articles, pp. 128–150, May 2024, doi: 10.25139/jkp.v8i1.7634.
[3] Z. M. Aggriany and W. Kustiawan, “Analisis Penggunaan Media Sosial Twitter Sebagai Media Curhat oleh Kalangan Muslim Generasi Z,” Reslaj Relig. Educ. Soc. Laa Roiba J., vol. 5, no. 6, pp. 3118–3133, 2023, doi: 10.47467/reslaj.v5i6.3737.
[4] Y. Pratama, D. T. Murdiansyah, and K. M. Lhaksmana, “Analisis Sentimen Kendaraan Listrik Pada Media Sosial Twitter Menggunakan Algoritma Logistic Regression dan Principal Component Analysis,” J. Media Inform. Budidarma, vol. 7, no. 1, pp. 529–535, 2023, doi: 10.30865/mib.v7i1.5575.
[5] H. R. Kuncoro, D. Lupitasari, K. Hasanah, and E. Kurniawati, MENGURAI ANCAMAN: Sekuritisasi melalui Lensa Framing dan Diskursus di Media Sosial, 1st ed. Yogyakarta: LPPM UPNVY Press, 2023. [Online]. Available: http://eprints.upnyk.ac.id/37540/
[6] R. Anbarini, S. K. A. Wibowo, N. A. Sjafirah, and A. Abdullah, “Mobilisasi Gerakan Opini Digital #OraSudiSumbangIKN pada Media Sosial Twitter,” J. Komun., vol. 15, no. 1, pp. 18–36, 2023, doi: 10.24912/jk.v15i1.19187.
[7] K. Arifin and S. I. Al-Idrus, “Klasifikasi Emosi Pengguna Twitter Terhadap Bakal Calon Presiden Pada Pemilu 2024 Menggunakan Algoritma Naïve Bayes,” J. SAINTIKOM (Jurnal Sains Manaj. Inform. dan Komputer), vol. 23, no. 1, p. 37, 2024, doi: 10.53513/jis.v23i1.9558.
[8] A. D. Akmal, I. Permana, H. Fajri, and Yuliarti, “Opini Masyarakat Twitter terhadap Kandidat Bakal Calon Presiden Republik Indonesia Tahun 2024,” JMIAP J. Manaj. dan Ilmu Adm. Publik, vol. 4, no. 4, pp. 287–295, 2022, doi: doi.org/10.24036/jmiap.v4i4.160.
[9] A. L. Efendi, A. Fadilla, A. C. Khoirunnisa, G. N. Bakry, and N. Aristi, “Analisis Jaringan Komunikasi #Pilpres2024 Pada Platform Twitter,” WACANA J. Ilm. Ilmu Komun., vol. 22, no. 2, pp. 219–232, 2023, doi: 10.32509/wacana.v22i2.2976.
[10] M. A. Hayat, S. Jayadiningrat, G. Wibisono, and M. I. Iyansyah, “Peran Media Sosial Dalam Komunikasi Politik,” J. Indones. Sos. Teknol., vol. 2, no. 1, pp. 104–114, 2021, doi: 10.36418/jist.v2i1.61.
[11] R. Amelia, D. Darmansah, N. S. Prastiwi, and M. E. Purbaya, “Impementasi Algoritma Naive Bayes Terhadap Analisis Sentimen Opini Masyarakat Indonesia Mengenai Drama Korea Pada Twitter,” JURIKOM (Jurnal Ris. Komputer), vol. 9, no. 2, p. 338, 2022, doi: 10.30865/jurikom.v9i2.3895.
[12] A. A. Arifiyanti, E. D. Wahyuni, and A. Kurniawan, “Emotion Mining of Indonesia Presidential Political Campaign 2019 using Twitter Data,” J. Phys. Conf. Ser., vol. 1569, no. 2, p. 22035, 2020, doi: 10.1088/1742-6596/1569/2/022035.
[13] F. D. N. Putra, Pranowo, and B. Setyohadi, “Sentiment analysis of Indonesian presisential election 2019 on the twitter with lexicon-based and support vector machine (SVM),” AIP Conf. Proc., vol. 2217, no. 1, p. 30136, Apr. 2020, doi: 10.1063/5.0000631.
[14] R. Vindua and A. U. Zailani, “Analisis Sentimen Pemilu Indonesia Tahun 2024 Dari Media Sosial Twitter Menggunakan Python,” JURIKOM (Jurnal Ris. Komputer), vol. 10, no. 2, p. 479, 2023, doi: 10.30865/jurikom.v10i2.5945.
[15] A. Kaharudin, A. A. Supriyadi, Muhlis, H. Baitika, and M. Derryanur, “Analisis Sentimen pada Media Sosial dengan Teknik Kecerdasan Buatan Naïve Bayes: Kajian Literatur Review,” OKTAL J. Ilmu Komput. dan Sci., vol. 2, no. 6, pp. 1642–1649, 2023, [Online]. Available: https://journal.mediapublikasi.id/index.php/oktal/article/view/2944%0Ahttps://journal.mediapublikasi.id/index.php/oktal/article/download/2944/1371
[16] A. Faisal, Y. Alkhalifi, A. Rifai, and W. Gata, “Analisis Sentimen Dewan Perwakilan Rakyat dengan Algoritma Klasifikasi berbasis Particle Swarm Optimization,” JOINTECS (Journal Inf. Technol. Comput. Sci., vol. 5, no. 2, p. 61, 2020, doi: 10.31328/jointecs.v5i2.1362.
[17] L. Damayanti and K. M. Lhaksmana, “Sentiment Analysis of the 2024 Indonesia Presidential Election on Twitter,” Sinkron, vol. 8, no. 2, pp. 938–946, 2024, doi: 10.33395/sinkron.v8i2.13379.
[18] T. Baharuddin, Z. Qodir, H. Jubba, and A. Nurmandi, “Prediction of Indonesian presidential candidates in 2024 using sentiment analysis and text search on Twitter,” Int. J. Commun. Soc., vol. 4, no. 2, pp. 204–213, 2022, doi: 10.31763/ijcs.v4i2.512.
[19] K. Diantoro, A. Soderi, A. Rohman, and A. T. Sitorus, “Sentiment Analysis of Public Opinion on the 2024 Presidential Election in Indonesia Using Twitter Data with the K-NN Method,” Digit. J. Comput. Sci. Appl., vol. 1, no. 1, pp. 1–10, 2023, doi: 10.61978/digitus.v1i1.27.
[20] N. U. Rahmanulloh and I. Santoso, “Delineation of The Early 2024 Election Map: Sentiment Analysis Approach to Twitter Data,” JOIN (Jurnal Online Inform., vol. 7, no. 2, pp. 226–235, 2022, doi: 10.15575/join.v7i2.925.
[21] R. Hakiki, A. Pambudi, and Asriyanik, “Classification of Public Sentiment Toward 2024 Presidential Candidates on Social Media Platform X Using Naïve Bayes Algorithm,” J. Artif. Intell. Eng. Appl., vol. 3, no. 2, pp. 551–556, 2024, doi: 10.59934/jaiea.v3i2.422.
[22] N. A. Salsabila, “Analisis Sentimen pada Media Sosial Twitter terhadap Tokoh Gus Dur menggunakan Metode Naive Bayes dan Support Vector Machine (SVM),” UIN Syarif Hidayatullah, 2022.
[23] N. Haqqizar and T. N. Larasyanti, “Analisis Sentimen Terhadap Layanan Provider Telekomunikasi Telkomsel Di Twitter Dengan Metode Naïve Bayes,” in Prosiding TAU SNAR-TEK 2019 Seminar Nasional Rekayasa dan Teknologi, 2019, pp. 1–15.
[24] D. Duei Putri, G. F. Nama, and W. E. Sulistiono, “Analisis Sentimen Kinerja Dewan Perwakilan Rakyat (DPR) Pada Twitter Menggunakan Metode Naive Bayes Classifier,” J. Inform. dan Tek. Elektro Terap., vol. 10, no. 1, pp. 34–40, 2022, doi: 10.23960/jitet.v10i1.2262.
[25] H. M. Saragih, “Analisis Sentimen Pengguna Twitter Terhadap Layanan Pajak Kendaraan Bermotor Menggunakan Algoritme Naive Bayes Classifier,” Universitas Lampung, 2021.
Published
2024-07-30
How to Cite
Gunawan, Y., Purnama, I., & Rohani, R. (2024). Sentiment Analysis of Twitter towards the 2024 Indonesian Presidential Candidates Using the Naïve Bayes Algorithms. International Journal of Science, Technology & Management, 5(4), 953-961. https://doi.org/10.46729/ijstm.v5i4.1154
Section
Articles