Sentiment Analysis of Public Opinion on the 2024 Presidential Election in Indonesia Using Twitter Data with the K-NN Method

Authors

  • Karno Diantoro Mercusuar College of Management and Informatics (STMIK Mercusuar)
  • Ahmad Soderi Mercusuar College of Management and Informatics (STMIK Mercusuar)
  • Abdur Rohman Mercusuar College of Management and Informatics (STMIK Mercusuar)
  • Anwar T. Sitorus Mercusuar College of Management and Informatics (STMIK Mercusuar)

DOI:

https://doi.org/10.61978/digitus.v1i1.27

Keywords:

K-NN, Election, Sentiment Analyst, Twitter

Abstract

Twitter is often used by the public as a platform to speak and express their opinions, especially in the context of the 2024 Presidential Election. Tweets related to the '2024 Presidential Election' can be used as a source of data for social media analysis to determine whether the expressed opinions tend to be positive or negative. The research process involves data collection of tweets, preprocessing, tokenization, class attribute determination, directory filling, sentiment analysis, and classification steps, including testing the value of k and testing the confusion matrix. The research and testing results show that the K-NN method successfully achieves a sentiment classification accuracy rate of 86.48%.

References

Alsabban, M. (2021). Comparing two sentiment analysis approaches by understand the hesitancy to COVID-19 vaccine based on Twitter data in two cultures. ACM International Conference Proceeding Series. https://doi.org/10.1145/3462741.3466671

Aquino, P. A., López, V. F., Moreno, M. N., Muñoz, M. D., & Rodríguez, S. (2020). Opinion Mining System for Twitter Sentiment Analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12344 LNAI. https://doi.org/10.1007/978-3-030-61705-9_38

Azzouza, N., Akli-Astouati, K., & Ibrahim, R. (2020). Twitterbert: Framework for twitter sentiment analysis based on pre-trained language model representations. Advances in Intelligent Systems and Computing, 1073. https://doi.org/10.1007/978-3-030-33582-3_41

Bernal, C., Bernal, M., Noguera, A., Ponce, H., & Avalos-Gauna, E. (2021). Sentiment Analysis on Twitter About COVID-19 Vaccination in Mexico. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 13068 LNAI. https://doi.org/10.1007/978-3-030-89820-5_8

Brito, K., Filho, R. L. C. S., & Adeodato, P. (2022). Please stop trying to predict elections only with Twitter. ACM International Conference Proceeding Series. https://doi.org/10.1145/3543434.3543648

Choudhary, N., Singh, R., Bindlish, I., & Shrivastava, M. (2023). Sentiment Analysis of Code- Mixed Languages Leveraging Resource Rich Languages. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 13397 LNCS. https://doi.org/10.1007/978-3-031-23804-8_9

Dutta, R. (2021). To Find the Best-Suited Model for Sentiment Analysis of Real-Time Twitter Data. Advances in Intelligent Systems and Computing, 1165. https://doi.org/10.1007/978-981- 15-5113-0_34

Feitosa, M. F., Rocha, S., Gonçalves, G. D., Ferreira, C. H., & Almeida, J. M. (2022). Sentiment Analysis on Twitter Repercussion of Police Operations. ACM International Conference Proceeding Series. https://doi.org/10.1145/3539637.3558050

Gautam, J., Atrey, M., Malsa, N., Balyan, A., Shaw, R. N., & Ghosh, A. (2021). Twitter Data Sentiment Analysis Using Naive Bayes Classifier and Generation of Heat Map for Analyzing Intensity Geographically. In Advances in Intelligent Systems and Computing (Vol. 1319). https://doi.org/10.1007/978-981-33-6919-1_10

Gupta, I., & Joshi, N. (2022). A Review on Negation Role in Twitter Sentiment Analysis. In International Journal of Healthcare Information Systems and Informatics (Vol. 16, Issue 4). https://doi.org/10.4018/IJHISI.20211001.oa14

Ilyas, S. H. W., Soomro, Z. T., Anwar, A., Shahzad, H., & Yaqub, U. (2020). Analyzing brexit’s impact using sentiment analysis and topic modeling on twitter discussion. ACM International Conference Proceeding Series. https://doi.org/10.1145/3396956.3396973

Jiang, T., Wang, J., Liu, Z., & Ling, Y. (2020). Fusion-Extraction Network for Multimodal Sentiment Analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12085 LNAI. https://doi.org/10.1007/978-3- 030-47436-2_59

Joshi, D. J., Kankurti, T., Padalkar, A., Deshmukh, R., Kadam, S., & Vartak, T. (2021).

Performance Analysis of Different Models for Twitter Sentiment. Advances in Intelligent Systems and Computing, 1311 AISC. https://doi.org/10.1007/978-981-33-4859-2_11

Kalehbasti, P. R., Nikolenko, L., & Rezaei, H. (2021). Airbnb Price Prediction Using Machine Learning and Sentiment Analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12844 LNCS. https://doi.org/10.1007/978-3-030-84060-0_11

Kaur, C., & Sharma, A. (2021). COVID-19 Sentimental Analysis Using Machine Learning Techniques. Advances in Intelligent Systems and Computing, 1299 AISC. https://doi.org/10.1007/978-981-33-4299-6_13

Kumar, P., Reji, R. E., & Singh, V. (2022). Extracting Emotion Quotient of Viral Information Over Twitter. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 13145 LNCS. https://doi.org/10.1007/978-3- 030-94876-4_15

Li, Q., Zhang, J., Guo, J., Li, J., & Kang, C. (2021). Evaluating Performance of NBA Players with Sentiment Analysis on Twitter Messages. ACM International Conference Proceeding Series. https://doi.org/10.1145/3501774.3501796

Ligthart, A., Catal, C., & Tekinerdogan, B. (2021). Systematic reviews in sentiment analysis: a tertiary study. Artificial Intelligence Review, 54(7). https://doi.org/10.1007/s10462-021-09973- 3

Limboi, S., & Dioşan, L. (2020). Hybrid Features for Twitter Sentiment Analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12416 LNAI. https://doi.org/10.1007/978-3-030-61534-5_19

Liu, H., & Tan, E. (2022). Tweet Sentiment Extraction Using Byte Level Pretrained Language Modelĝ. ACM International Conference Proceeding Series. https://doi.org/10.1145/3529836.3529941

Lohar, P., Xie, G., Bendechache, M., Brennan, R., Celeste, E., Trestian, R., & Tal, I. (2021). Irish Attitudes Toward COVID Tracker App & Privacy: Sentiment Analysis on Twitter and Survey Data. ACM International Conference Proceeding Series. https://doi.org/10.1145/3465481.3469193

Murakami, H., Ejima, N., & Kumagai, N. (2020). Self-understanding support tool using twitter sentiment analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12144 LNAI. https://doi.org/10.1007/978-3- 030-55789-8_29

Nandy, H., & Sridhar, R. (2021). Filtering-Based Text Sentiment Analysis for Twitter Dataset.

Advances in Intelligent Systems and Computing, 1133. https://doi.org/10.1007/978-981-15-3514- 7_77

Nouira, A. Y., Bouchakwa, M., & Jamoussi, Y. (2023). Bitcoin Price Prediction Considering Sentiment Analysis on Twitter and Google News. ACM International Conference Proceeding Series. https://doi.org/10.1145/3589462.3589494

Nugroho, K. S., Sukmadewa, A. Y., Dw, H. W., Bachtiar, F. A., & Yudistira, N. (2021). BERT Fine-Tuning for Sentiment Analysis on Indonesian Mobile Apps Reviews. ACM International Conference Proceeding Series. https://doi.org/10.1145/3479645.3479679

Obaidi, M., & Klünder, J. (2021). Development and application of sentiment analysis tools in software engineering: A systematic literature review. ACM International Conference Proceeding Series. https://doi.org/10.1145/3463274.3463328

Ricci, R. D., Faria, E. R., Miani, R. S., & Gabriel, P. H. R. (2021). Social Security Reform in Brazil: A Twitter Sentiment Analysis. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12926 LNCS. https://doi.org/10.1007/978-3-030-86611-2_11

Rocha, R. S., Saraiva, L. A., Castro, A. F. De, & Silva, P. D. A. (2020). Sentiment analysis of Twitter data about blockchain technology. ACM International Conference Proceeding Series, Part F166737. https://doi.org/10.1145/3401895.3401913

Selmene, S., & Kodia, Z. (2020). Recommender System Based on User’s Tweets Sentiment Analysis. ACM International Conference Proceeding Series. https://doi.org/10.1145/3409929.3414744

Silva, J., Cera, J. M., Vargas, J., & Lezama, O. B. P. (2021). Sentiment analysis in twitter: Impact of morphological characteristics. Advances in Intelligent Systems and Computing, 1237 AISC. https://doi.org/10.1007/978-3-030-53036-5_29

Vaseeharan, T., & Aponso, A. (2020). Review on Sentiment Analysis of Twitter Posts about News Headlines Using Machine Learning Approaches and Naïve Bayes Classifier. ACM International Conference Proceeding Series. https://doi.org/10.1145/3384613.3384650

Wang, Y., Guo, J., Yuan, C., & Li, B. (2022). Sentiment Analysis of Twitter Data. In Applied Sciences (Switzerland) (Vol. 12, Issue 22). https://doi.org/10.3390/app122211775

Wankhade, M., Rao, A. C. S., & Kulkarni, C. (2022). A survey on sentiment analysis methods, applications, and challenges. Artificial Intelligence Review, 55(7). https://doi.org/10.1007/s10462-022-10144-1

Xie, Y., Wang, T., Zhang, H., & Yan, T. (2022). Analyzing the Rate of Increase in Vaccines Administrated Versus Twitter Sentiment Analysis. ACM International Conference Proceeding Series. https://doi.org/10.1145/3543106.3543119

Yadlapalli, S. S., Reddy, R. R., & Sasikala, T. (2020). Advanced Twitter Sentiment Analysis Using Supervised Techniques and Minimalistic Features. Advances in Intelligent Systems and Computing, 1097. https://doi.org/10.1007/978-981-15-1518-7_8

Yang, L., Yu, J., Zhang, C., & Na, J. C. (2021). Fine-Grained Sentiment Analysis of Political Tweets with Entity-Aware Multimodal Network. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 12645 LNCS. https://doi.org/10.1007/978-3-030-71292-1_31

Zhu, W., & Hu, T. (2021). Twitter Sentiment analysis of covid vaccines. ACM International Conference Proceeding Series. https://doi.org/10.1145/3480433.3480442

Downloads

Published

2023-10-13

How to Cite

Diantoro, K., Soderi, A., Rohman, A., & Sitorus, A. T. (2023). Sentiment Analysis of Public Opinion on the 2024 Presidential Election in Indonesia Using Twitter Data with the K-NN Method. Digitus : Journal of Computer Science Applications, 1(1), 1–10. https://doi.org/10.61978/digitus.v1i1.27

Most read articles by the same author(s)