Opinion mining indonesian presidential election on twitter data based on decision tree method

Main Article Content

Nur Ghaniaviyanto Ramadhan
Merlinda Wibowo
Nur Fatin Liyana Mohd Rosely
Christoph Quix


Indonesia is a country led by a president. The term of the leadership of a president will be democratically elected every five years. The current president will end his term of office in 2024. So that in that year, the people will hold a direct general election to determine the president between 2024 and 2029. Before the general election was held in Indonesia itself, it was thick related to the campaign for each presidential candidate carried out by his supporters. The campaign is carried out directly to village locations and on social media Twitter/Facebook/YouTube. His campaign writing on Twitter is exciting to analyze. Even now, many tweets related to the 2024 presidential election contain various opinions from the public. This study will examine the sentiment of someone's tweet to see the public's statement regarding the 2024 presidential election. The resulting sentiment categories are positive, negative, and neutral, and the word tweet related to the sentiment category will be visualized. The results of the sentiment category will then be classified using a tree-based method, namely a decision tree. The accuracy generated by applying the decision tree method is 99.3%. The decision tree method is also superior to the regression-based way by 2.5%.


Download data is not yet available.

Article Details

How to Cite
N. G. Ramadhan, M. Wibowo, N. F. L. Mohd Rosely, and C. Quix, “Opinion mining indonesian presidential election on twitter data based on decision tree method”, INFOTEL, vol. 14, no. 4, Nov. 2022.


[1] S. Negara, “Undang - Undang Republik Indonesia Nomor 42 Tahun 2008 Tentang Pemilihan Umum Presiden dan Wakil Presiden,” 2008.
[2] M. R. F. Sya’bani, U. Enri, and T. N. Padilah, “Analisis Sentimen Terhadap Bakal Calon Presiden 2024 Dengan Algoritme Naive Bayes,” JURIKOM (Jurnal Ris. Komputer), vol. 9, no. 2, pp. 265–273, 2022.
[3] G. A. Buntoro, R. Arifin, G. N. Syaifuddiin, A. Selamat, O. Krejcar, and F. Hamido, “The Implementation of the machine learning algorithm for the sentiment analysis of Indonesia’s 2019 Presidential election,” IIUM Eng. J., vol. 22, no. 1, pp. 78–92, 2021.
[4] M. M. Ismail and K. M. Lhaksmana, “Sentimen Analisis Pada Media Online Mengenai Pemilihan Presiden 2019 Dengan Menggunakan Metode Naive Bayes,” eProceedings Eng., vol. 6, no. 2, 2019.
[5] S. F. Pratama, R. Andrean, and A. Nugroho, “Analisis Sentimen Twitter Debat Calon Presiden Indonesia Menggunakan Metode Fined-Grained Sentiment Analysis,” JOINTECS (Journal Inf. Technol. Comput. Sci., vol. 4, no. 2, pp. 39–44, 2019.
[6] D. A. Kristiyanti, A. H. Umam, and others, “Prediction of Indonesia presidential election results for the 2019-2024 period using twitter sentiment analysis,” in 2019 5th International Conference on New Media Studies (CONMEDIA), 2019, pp. 36–42.
[7] A. M. Zuhdi, E. Utami, and S. Raharjo, “Analisis sentiment twitter terhadap capres Indonesia 2019 dengan metode K-NN,” J. Inf. J. Penelit. dan Pengabdi. Masy., vol. 5, no. 2, pp. 1–7, 2019.
[8] C. Prianto, N. H. Harani, and I. Firmansyah, “Analisis Sentimen Terhadap Kandidat Presiden Republik Indonesia Pada Pemilu 2019 di Media Sosial Twitter,” J. MEDIA Inform. BUDIDARMA, vol. 3, no. 4, pp. 405–413, 2019.
[9] Santoso Eko Budi and A. Nugroho, “Analisis sentimen calon presiden indonesia 2019 berdasarkan komentar publik di facebook,” J. Eksplora Inform., vol. 9, no. 1, pp. 60–69, 2019.
[10] M. D. R. W. Wahyudi, “Analisis sentimen ujaran kebencian pemilihan presiden 2019 menggunakan algoritme Naïve Bayes,” JNANALOKA, vol. 1, no. 1, pp. 25–33, 2020.
[11] N. S. Fitriyyah Sitti Nurul Jannah and E. E. Pratama, “Analisis Sentimen Calon Presiden Indonesia 2019 dari Media Sosial Twitter Menggunakan Metode Naive Bayes,” JEPIN (Jurnal Edukasi dan Penelit. Inform., vol. 5, no. 3, pp. 279–285, 2019.
[12] M. A. F. Sabily, Alvandi Fadhil, Putra Pandu Adikara, “Analisis Sentimen Pemilihan Presiden 2019 pada Twitter menggunakan Metode Maximum Entropy,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 2548, p. 964X, 2019.
[13] Y. S. Septiani, Lanny, “Sentiment Analysis Terhadap Tweet Bernada Sarkasme Berbahasa Indonesia,” J. Linguist. Komputasional, vol. 2, no. 2, pp. 62–67, 2019.
[14] A. B. P. Santoso, Imam, Windu Gata, “Penggunaan Feature Selection di Algoritma Support Vector Machine untuk Sentimen Analisis Komisi Pemilihan Umum,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 3, no. 3, pp. 364–370, 2019.
[15] R. Ardiansyah, “Analisis sentimen calon presiden dan wakil presiden periode 2019-2024 pasca debat pilpres di Twitter,” Sci. Comput. Sci. Informatics J., vol. 2, no. 1, pp. 21–28, 2019.
[16] Najib, Ahmad Choirun, “Perbandingan Metode Lexicon-based dan SVM untuk Analisis Sentimen Berbasis Ontologi pada Kampanye Pilpres Indonesia Tahun 2019 di Twitter,” Fountain Informatics J, vol. 4, no. 2, pp. 41–48, 2019.
[17] S. S. I. Ismail, R. F. Mansour, A. El-Aziz, M. Rasha, and A. I. Taloba, “Efficient E-Mail Spam Detection Strategy Using Genetic Decision Tree Processing with NLP Features,” Comput. Intell. Neurosci., vol. 2022, 2022.
[18] H. A. Bouarara, “Sentiment Analysis Using Machine Learning Algorithms and Text Mining to Detect Symptoms of Mental Difficulties Over Social Media,” in Research Anthology on Implementing Sentiment Analysis Across Multiple Disciplines, IGI Global, 2022, pp. 581–595.
[19] K. Zerrouki, R. M. Hamou, and A. Rahmoun, “Sentiment Analysis of Tweets Using Na{\"\i}ve Bayes, KNN, and Decision Tree,” in Research Anthology on Implementing Sentiment Analysis Across Multiple Disciplines, IGI Global, 2022, pp. 538–554.
[20] Keumala, Teuku Muhammad Mirza, Melinda Melinda, and Syahrial Syahrial. "Decision Tree Method to Classify the Electroencephalography-based Emotion Data." JURNAL INFOTE, vol. 14, no. 1, pp. 37-49, 2022.
[21] A. J. Myles, R. N. Feudale, Y. Liu, N. A. Woody, and S. D. Brown, “An introduction to decision tree modeling,” J. Chemom. A J. Chemom. Soc., vol. 18, no. 6, pp. 275–285, 2004.
[22] N. G. Ramadhan and T. I. Ramadhan, “Analysis Sentiment based on IMDB aspects from movie reviews using SVM,” Sink. J. dan Penelit. Tek. Inform., vol. 7, no. 1, pp. 39–45, 2022.