Sentiment Analysis Netizens on Social Media Twitter Against Indonesian Presidential Candidates in 2024 Using Naive Bayes Classifier Algorithm
DOI:
https://doi.org/10.30865/mib.v7i3.6536Keywords:
Democracy, Presidential Candidates, Sentiment Analysis, Machine Learning, Naive Bayes ClassifierAbstract
The democratic system is highly respected in Indonesia. The Indonesian state government organizes its government in a democratic manner, namely, it is run by, for, and with the consent of the people. Democracy is held through general elections to occupy leadership and power seats, followed by political parties. The high enthusiasm of Twitter social media users with the electability of presidential candidates proposed by political parties in the 2024 general election and the existence of a survey of potential presidents from national institutions, as well as mass and social media coverage of presidential candidates suggested by the political parties, generates opinions, attitudes, and emotions among people from all walks of life through tweets. The availability of abundant data on Twitter and other social media can provide useful information. Tweet data is obtained by crawling data using the help of the Python library, namely snscrape. The sentiment analysis uses a mixed method, namely by using machine learning and Lexicon Based, through the process of fine-grained sentiment analysis using the technique, namely, knowing the level of opinion polarity by grouping netizen responses and opinions into three parts: positive, neutral, and negative, with the help of machine learning and natural language processing. The results of the study were carried out by experimenting with four scenarios by dividing test and training data by 60:40, 70:30, 80:20, and 90:10. Measurement of the accuracy value results in the classification of the Nave Bayes Classifier Algorithm as 68%, 67%, 70%, and 71%. From the tweet data, it is clear that positive sentiment is dominant on the research topic.Â
References
H. Padli, “PENGATURAN MASA JABATAN PRESIDEN SUATU UPAYA MENEGAKAN PRINSIP KONSTITUSIONALISME DI INDONESIA,†J. Kertha Semaya, vol. 9, no. 10, pp. 1796–1808, 2021, doi: 10.24843/KS.2021.v09.i10.p06.
B. Frederick and L. Elder, “Public Opinion and the Candidate Spouses in the 2020 Democratic Presidential Primary,†Forum (Germany), vol. 20, no. 2, pp. 275–292, Jul. 2022, doi: 10.1515/for-2022-2056.
J. W. Hukum, D. Sains, and M. A. Farhan, “Application of Presidential Threshold In Indonesia And Comparison With Several Countries,†2022. doi: https://doi.org/10.55173/yurisdiksi.v18i1.124.
I. Made and A. Agastya, “PENGARUH STEMMER BAHASA INDONESIA TERHADAP PEFORMA ANALISIS SENTIMEN TERJEMAHAN ULASAN FILM,†2018. [Online]. Available: https://github.com/arthaAgastya/dataset/tree/master/Mov
D. Antypas, A. Ushio, J. Camacho-Collados, L. Neves, V. Silva, and F. Barbieri, “Twitter Topic Classification,†Sep. 2022, [Online]. Available: http://arxiv.org/abs/2209.09824
S. Nurul, J. Fitriyyah, N. Safriadi, E. Esyudha, and P. #3, “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, doi: http://dx.doi.org/10.26418/jp.v5i3.34368.
A. M. Pravina, I. Cholissodin, and P. P. Adikara, “Analisis Sentimen Tentang Opini Maskapai Penerbangan pada Dokumen Twitter Menggunakan Algoritme Support Vector Machine (SVM),†2019. [Online]. Available: http://j-ptiik.ub.ac.id
D. Darwis, N. Siskawati, and Z. Abidin, “Penerapan Algoritma Naive Bayes untuk Analisis Sentimen Review Data Twitter BMKG Nasional,†Teknok Kompak, vol. 15, no. 1, pp. 131–145, 2019, doi: DOI: https://doi.org/10.33365/jtk.v15i1.744.
M. Muslimin and V. Lusiana, “Analisis Sentimen Terhadap Kenaikan Harga Bahan Pokok Menggunakan Metode Naive Bayes Classifier,†vol. 7, no. 3, pp. 1200–1209, 2023, doi: 10.30865/mib.v7i3.6418.
S. Juanita, “Analisis Sentimen Persepsi Masyarakat Terhadap Pemilu 2019 Pada Media Sosial Twitter Menggunakan Naive Bayes,†J. MEDIA Inform. BUDIDARMA, vol. 4, no. 3, p. 552, Jul. 2020, doi: 10.30865/mib.v4i3.2140.
P. Amira Sumitro et al., “Analisis Sentimen Terhadapat Vaksin Covid-19 di Indonesia pada Twitter Menggunakan Metode Lexicon Based,†J. Inform. Dan Teknol. Komput., vol. 2, no. 2, pp. 50–56, 2021, doi: 10.33059/j-icom.v2i2.4009.
S. A. Dainamang, N. Hayatin, and D. R. Chandranegara, “Analisis Sentimen Media Sosial Twiiter terhadap RUU Omnibus Law dengan Metode Naive Bayes dan Particle Swarm Optimization,†Komputika J. Sist. Komput., vol. 11, no. 2, pp. 211–218, Aug. 2022, doi: 10.34010/komputika.v11i2.6037.
T. M. Fahrudin et al., “Analisis Speech-to-Text pada Video Mengandung Kata Kasar dan Ujaran Kebencian dalam Ceramah Agama Islam Menggunakan Interpretasi Audiens dan Visualisasi Word Cloud,†SKANIKA Sist. Komput. dan Tek. Inform., vol. 5, no. 2, pp. 190–202, 2022.
A. Hadiy, D. Fatra, N. Hayatin, C. Sri, and K. Aditya, “Analisa Sentimen Tweet Berbahasa Indonesia Dengan Menggunakan Metode Lexicon Pada Topik Perpindahan Ibu Kota Indonesia,†J. Repos, vol. 2, no. 7, pp. 977–984, 2020, doi: 10.22219/repositor.v2i7.937.
M. Wongkar and A. Angdresey, “Sentiment Analysis Using Naive Bayes Algorithm Of The Data Crawler : Twitter,†IEEE, pp. 1–5, 2020, doi: https://doi.org/10.1109/ICIC47613.2019.8985884.
W. Yulita et al., “Analisis Sentimen Terhadap Opini Masyarakat Tentang Vaksin Covid-19 Menggunakan Algoritma Naïve Bayes Classifier,†JDMSI, vol. 2, no. 2, pp. 1–9, 2021, doi: https://doi.org/10.33365/jdmsi.v2i2.1344.
D. W. Seno and A. Wibowo, “Analisis Sentimen Data Twitter Tentang Pasangan Capres-Cawapres Pemilu 2019 Dengan Metode Lexicon Based Dan Support Vector Machine,†J. Ilm. FIFO, vol. 11, no. 2, p. 144, Nov. 2019, doi: 10.22441/fifo.2019.v11i2.004.
H. Harmayani and L. Sitorus, “Diagnosa Penyakit Ginjal Kronis Menggunakan Metode Klasifikasi Naïve,†J. MEDIA Inform. BUDIDARMA, vol. 4, no. 3, p. 850, Jul. 2020, doi: 10.30865/mib.v4i3.2292.
E. F. Saraswita, D. P. Rini, and A. Abdiansah, “Analisis Sentimen E-Wallet di Twitter Menggunakan Support Vector Machine dan Recursive Feature Elimination,†J. MEDIA Inform. BUDIDARMA, vol. 5, no. 4, p. 1195, Oct. 2021, doi: 10.30865/mib.v5i4.3118.
Suryasatria Trihandaru, Parhusip Hanna Arini, Susanto Bambang, and Putri Carolina Febe Ronicha, “Word Cloud of UKSW Lecturer Research Competence Based on Google Scholar Data,†J. Ilmu Komput. Dan Inform., vol. 7, no. 2, pp. 1–7, 2021, doi: https://doi.org/10.23917/khif.v7i2.13123.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).