Machine Learning-Driven Sentiment Analysis of Social Media Data in the 2024 U.S. Presidential Race

  • Samsir Samsir * Mail Universitas Al Washliyah, Indonesia
  • Wahyu Azhar Ritonga Universitas Al Washliyah, Indonesia
  • Rahmad Aditiya Universitas Al Washliyah, Indonesia
  • Ronal Watrianthos Universitas Al Washliyah Labuhanbatu, Indonesia
Keywords: Sentiment Analysis; Political Communication; Social Media Analytics; BERT; Topic Modeling

Abstract

This study investigates public sentiment patterns during the 2024 U.S. Presidential Race through machine learning analysis of social media data from X (formerly Twitter). Using a dataset of 500 annotated tweets collected from Kaggle, we employ BERT-based sentiment analysis, temporal engagement tracking, and Latent Dirichlet Allocation (LDA) topic modeling to examine discourse across five major candidates. The analysis reveals predominantly positive sentiment (54.2%) in political discussions, with established party candidates receiving higher positive engagement. Temporal analysis demonstrates strong correlations between major campaign events and public engagement, with presidential debates generating peak interaction levels. Topic modeling identifies five key themes driving voter discourse: economic policy, healthcare, climate change, social justice, and foreign policy. Positive content consistently achieved 20-30% higher engagement rates than negative content, though negative sentiments showed sharp spikes during controversies. Our findings contribute to understanding digital political discourse dynamics and offer practical insights for campaign strategy in the social media era. The study's limitations include platform-specific constraints and a two-month observation period, suggesting opportunities for cross-platform analysis in future research.

References

E. Tulungen et al., “DIGITAL TRANSFORMATION: ROLE OF DIGITAL LEADERSHIP,” 1116 Jurnal EMBA, vol. 10, no. 2, 2022.

M. Demchenko V, M. E. Gulieva, T. Larina V, and E. P. Simaeva, “Digital Transformation of Legal Education: Problems, Risks and Prospects,” EUROPEAN JOURNAL OF CONTEMPORARY EDUCATION, vol. 10, no. 2, pp. 297–307, Jun. 2021, doi: 10.13187/ejced.2021.2.297.

F. Kurniawan and Q. Al Qorni, “Exploring Sentimen Analysis Using Machine Learning: A Case Study on Partai Demokrasi Indonesia Perjuangan (PDIP) in the 2024 General Election,” Sinomics Journal | Volume, vol. 2, no. 4, 2023.

J. Alzubi, A. Nayyar, and A. Kumar, “Machine Learning from Theory to Algorithms: An Overview,” J Phys Conf Ser, vol. 1142, p. 012012, Nov. 2018, doi: 10.1088/1742-6596/1142/1/012012.

D. Khurana, A. Koli, K. Khatter, and S. Singh, “Natural language processing: state of the art, current trends and challenges,” Multimed Tools Appl, vol. 82, no. 3, 2023, doi: 10.1007/s11042-022-13428-4.

S. Samsir, R. S. Saragih, S. Subagio, R. Aditiya, and R. Watrianthos, “BERTopic Modeling of Natural Language Processing Abstracts: Thematic Structure and Trajectory,” Jurnal Media Informatika Budidarma, vol. 7, no. 3, Jul. 2023.

M. Singh, A. K. Jakhar, and S. Pandey, “Sentiment analysis on the impact of coronavirus in social life using the BERT model,” Soc Netw Anal Min, vol. 11, no. 1, p. 33, Dec. 2021, doi: 10.1007/s13278-021-00737-z.

P. M. F. Coelho, P. A. P. Correia, and I. G. Medina, “Social media: A new way of public and political communication in digital media,” International Journal of Interactive Mobile Technologies, vol. 11, no. 6, 2017, doi: 10.3991/ijim.v11i6.6876.

A. Galassi, M. Lippi, and P. Torroni, “Attention in Natural Language Processing,” IEEE Trans Neural Netw Learn Syst, vol. 32, no. 10, 2021, doi: 10.1109/TNNLS.2020.3019893.

S. B. Bhonde and J.R. Prasad, “Sentiment Analysis-Methods, Applications and Challenges,” nternational Journal of Electronics Communication and Computer Engineering, vol. 6, no. 6, pp. 634–640, 2015.

A. Subakti, H. Murfi, and N. Hariadi, “The performance of BERT as data representation of text clustering,” J Big Data, vol. 9, no. 1, p. 15, Dec. 2022, doi: 10.1186/s40537-022-00564-9.

S. Saadah, K. M. Auditama, A. A. Fattahila, F. I. Amorokhman, A. Aditsania, and A. A. Rohmawati, “Implementation of BERT, IndoBERT, and CNN-LSTM in Classifying Public Opinion about COVID-19 Vaccine in Indonesia,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 4, pp. 648–655, 2022, doi: 10.29207/resti.v6i4.4215.

Alvi Rahmy Royyan and Erwin Budi Setiawan, “Feature Expansion Word2Vec for Sentiment Analysis of Public Policy in Twitter,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 1, pp. 78–84, Feb. 2022, doi: 10.29207/resti.v6i1.3525.

V. G. Ramadhan and Y. Sibaroni, “Sentiment Analysis of Public Opinion Related to Rapid Test Using LDA Method,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 5, no. 4, pp. 672–679, 2021, doi: 10.29207/resti.v5i4.3139.

J. Katalinić, I. Dunđer, and S. Seljan, “Polarizing Topics on Twitter in the 2022 United States Elections,” Information (Switzerland), vol. 14, no. 11, 2023, doi: 10.3390/info14110609.

M. Z. Ansari, M. B. Aziz, M. O. Siddiqui, H. Mehra, and K. P. Singh, “Analysis of Political Sentiment Orientations on Twitter,” in Procedia Computer Science, 2020. doi: 10.1016/j.procs.2020.03.201.

Y. M. Tun and M. Khaing, “A large-scale sentiment analysis using political tweets,” International Journal of Electrical and Computer Engineering, vol. 13, no. 6, 2023, doi: 10.11591/ijece.v13i6.pp6913-6925.

A. Bello, S. C. Ng, and M. F. Leung, “A BERT Framework to Sentiment Analysis of Tweets,” Sensors, vol. 23, no. 1, 2023, doi: 10.3390/s23010506.

A. S. Talaat, “Sentiment analysis classification system using hybrid BERT models,” J Big Data, vol. 10, no. 1, 2023, doi: 10.1186/s40537-023-00781-w.

C. Liu and R. L. Hu, “Hot Topic Discovery across Social Networks Based on Improved LDA Model,” KSII Transactions on Internet and Information Systems, vol. 15, no. 11, 2021, doi: 10.3837/TIIS.2021.11.004.

J. Han, G. Liu, and Y. Yang, “Latent Dirichlet Allocation-Based Topic Mining Analysis of Educational Scientific Research Projects Based on 2360 NSF Education Projects,” TEM Journal, vol. 12, no. 2, 2023, doi: 10.18421/TEM122-32.

W. Wiranto and M. R. Uswatunnisa, “Topic Modeling for Support Ticket using Latent Dirichlet Allocation,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 6, no. 6, pp. 998–1005, 2022, doi: 10.29207/resti.v6i6.4542.

Kaggle, “Kaggle: Your Home for Data Science,” Website.

H. Jelodar et al., “Latent Dirichlet allocation (LDA) and topic modeling: models, applications, a survey,” Multimed Tools Appl, vol. 78, no. 11, 2019, doi: 10.1007/s11042-018-6894-4.

L. Zeng, R. Y. M. Li, T. Yigitcanlar, and H. Zeng, “Public Opinion Mining on Construction Health and Safety: Latent Dirichlet Allocation Approach,” Buildings, vol. 13, no. 4, 2023, doi: 10.3390/buildings13040927.

Dimensions Badge
Published
2024-12-24
How to Cite
Samsir, S., Ritonga, W. A., Aditiya, R., & Watrianthos, R. (2024). Machine Learning-Driven Sentiment Analysis of Social Media Data in the 2024 U.S. Presidential Race. Bulletin of Information Technology (BIT), 5(4), 326 - 332. https://doi.org/10.47065/bit.v5i4.1762
Section
Articles