Prediction of Indonesian presidential candidates in 2024 using sentiment analysis and text search on Twitter

(1) * Tawakkal Baharuddin Mail (Political Islam-Political Science, Universitas Muhammadiyah Yogyakarta, Indonesia)
(2) Zuly Qodir Mail (Political Islam-Political Science, Universitas Muhammadiyah Yogyakarta, Indonesia)
(3) Hasse Jubba Mail (Political Islam-Political Science, Universitas Muhammadiyah Yogyakarta, Indonesia)
(4) Achmad Nurmandi Mail (Political Islam-Political Science, Universitas Muhammadiyah Yogyakarta, Indonesia)
*corresponding author


This study aims to show whether Twitter analysis can predict and forecast candidates in the Indonesian presidential election in 2024. This study was conducted long before the election began. To reduce the gap and utopian attitude in analyzing, two forms of analysis were used at once, namely sentiment analysis and text searches on Twitter data. This study uses a quantitative approach with descriptive content analysis. The data was obtained from Twitter social media, with Twitter Search focusing on official accounts and topics surrounding the 2024 presidential election. The search and data collection first adjusted to the trend of poll results spread in online news. The trend resulting from the poll is used to adjust the names of candidates to be searched for on Twitter search. The analysis tool used also utilizes the Nvivo 12 Plus analysis software. This study succeeded in mapping out three potential candidates in the 2024 election, namely Anies Baswedan, Ganjar Pranowo, and Prabowo Subianto. The mapping of potential candidates also has correspondence with the results of opinion polls in newspapers. From these findings, the information and data on Twitter help make predictions and an alternative to using the poll method. The drawback of this study lies in the limited use of time, so it is recommended that further research be carried out to collect and analyze similar data regularly until the election period. This may indicate that Twitter can predict earlier or better than polls.


Presidential Election; Election Prediction; Social Media; Election Poll; Indonesia



Article metrics

10.31763/ijcs.v4i2.512 Abstract views : 3311 | PDF views : 943




Full Text



[1] R. N. Chaterine and D. Meiliana, “Presidential Candidate Electability Survey 2024, Ganjar is in First Place, Followed by Prabowo and Anies Baswedan,”, 10-Oct-2021.

[2] J. Visser, B. Konat, R. Duthie, M. Koszowy, K. Budzynska, and C. Reed, “Argumentation in the 2016 US presidential elections: annotated corpora of television debates and social media reaction,” Lang. Resour. Eval., vol. 54, no. 1, pp. 123–154, 2020.

[3] C. B. Williams, “Introduction: Social media, political marketing and the 2016 U.S. election,” J. Polit. Mark., vol. 16, no. 3–4, pp. 207–211, 2017.

[4] D. H. Kim, S. M. Jones-Jang, and K. Kenski, “Why Do People Share Political Information on Social Media?,” Digit. Journal., vol. 9, no. 8, pp. 1123–1140, 2021.

[5] D. J. S. Oliveira, P. H. de S. Bermejo, and P. A. dos Santos, “Can social media reveal the preferences of voters? A comparison between sentiment analysis and traditional opinion polls,” J. Inf. Technol. Polit., vol. 14, no. 1, pp. 34–45, 2017.

[6] M. Huberty, “Can we vote with our tweet? On the perennial difficulty of election forecasting with social media,” Int. J. Forecast., vol. 31, no. 3, pp. 992–1007, 2015.

[7] H. Schoen, D. Gayo-Avello, P. Takis Metaxas, E. Mustafaraj, M. Strohmaier, and P. Gloor, “The power of prediction with social media,” Internet Res., vol. 23, no. 5, pp. 528–543, 2013.

[8] B. Bansal and S. Srivastava, “On predicting elections with hybrid topic based sentiment analysis of tweets,” Procedia Comput. Sci., vol. 135, pp. 346–353, 2018.

[9] J. Sohlberg and A. Branham, “Just a Difficult Election to Poll ? How Context Affects Polling Accuracy,” Surv. Methods Insights from F., pp. 1–17, 2020.

[10] P. Singh, Y. K. Dwivedi, K. S. Kahlon, A. Pathania, and R. S. Sawhney, “Can twitter analytics predict election outcome? An insight from 2017 Punjab assembly elections,” Gov. Inf. Q., vol. 37, no. 2, p. 101444, 2020.

[11] P. Chauhan, N. Sharma, and G. Sikka, “The emergence of social media data and sentiment analysis in election prediction,” J. Ambient Intell. Humaniz. Comput., vol. 12, no. 2, pp. 2601–2627, 2021.

[12] K. Searles, G. Smith, and M. Sui, “Partisan media, electoral predictions, and wishful thinking,” Public Opin. Q., vol. 82, pp. 888–910, 2018.

[13] M. Galesic, W. Bruine De Bruin, M. Dumas, A. Kapteyn, J. E. Darling, and E. Meijer, “Asking about social circles improves election predictions,” Nat. Hum. Behav., vol. 2, no. 3, pp. 187–193, 2018.

[14] R. Kennedy, S. Wojcik, and D. Lazer, “Prediction Internationally,” 2017.

[15] K. Jaidka, S. Ahmed, M. Skoric, and M. Hilbert, “Predicting elections from social media: a three-country, three-method comparative study,” Asian J. Commun., vol. 29, no. 3, pp. 252–273, 2019.

[16] D. Rousidis, P. Koukaras, and C. Tjortjis, “Social media prediction: a literature review,” Multimed. Tools Appl., vol. 79, no. 9–10, pp. 6279–6311, 2020.

[17] F. Hemmatian and M. K. Sohrabi, “A survey on classification techniques for opinion mining and sentiment analysis,” Artif. Intell. Rev., vol. 52, no. 3, pp. 1495–1545, 2019.

[18] Z. Li, Y. Fan, B. Jiang, T. Lei, and W. Liu, “A survey on sentiment analysis and opinion mining for social multimedia,” Multimed. Tools Appl., vol. 78, no. 6, pp. 6939–6967, 2019.

[19] B. Saberi and S. Saad, “Sentiment analysis or opinion mining: A review,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. 7, no. 5, pp. 1660–1666, 2017.

[20] C. Dhaoui, C. M. Webster, and L. P. Tan, “Social media sentiment analysis: lexicon versus machine learning,” J. Consum. Mark., vol. 34, no. 6, pp. 480–488, 2017.

[21] L. Yue, W. Chen, X. Li, W. Zuo, and M. Yin, “A survey of sentiment analysis in social media,” Knowl. Inf. Syst., vol. 60, no. 2, pp. 617–663, 2019.

[22] W. Budiharto and M. Meiliana, “Prediction and analysis of Indonesia Presidential election from Twitter using sentiment analysis,” J. Big Data, vol. 5, no. 1, pp. 1–10, 2018.

[23] A. Ceron, L. Curini, and S. M. Iacus, “Using Sentiment Analysis to Monitor Electoral Campaigns: Method Matters—Evidence From the United States and Italy,” Soc. Sci. Comput. Rev., vol. 33, no. 1, pp. 3–20, 2015.

[24] J. Blaney, K. Filer, and J. Lyon, “Assessing high impact practices using NVivo: An automated approach to analyzing student reflections for program improvement,” Res. Pract. Assess., vol. 9, pp. 97–100, 2014.

[25] K. N. Hampton, I. Shin, and W. Lu, “Social media and political discussion: when online presence silences offline conversation,” Inf. Commun. Soc., vol. 20, no. 7, pp. 1090–1107, 2017.

[26] M. J. Kushin and M. Yamamoto, “Did social media really matter? college students’ use of online media and political decision making in the 2008 election,” Mass Commun. Soc., vol. 13, no. 5, pp. 608–630, 2010.

[27] A. Getachew and T. Beshah, “The Role of Social Media in Citizen’s Political Participation,” in IFIP Advances in Information and Communication Technology, 2019, vol. 558, pp. 487–496.

[28] D. Kreiss, R. G. Lawrence, and S. C. McGregor, “In Their Own Words: Political Practitioner Accounts of Candidates, Audiences, Affordances, Genres, and Timing in Strategic Social Media Use,” Polit. Commun., vol. 35, no. 1, pp. 8–31, 2018.

[29] F. Marozzo and A. Bessi, “Analyzing polarization of social media users and news sites during political campaigns,” Soc. Netw. Anal. Min., vol. 8, no. 1, 2018.

[30] F. Suwana, “What motivates digital activism? The case of the Save KPK movement in Indonesia,” Inf. Commun. Soc., vol. 23, no. 9, pp. 1295–1310, 2020.

[31] P. Sobkowicz, M. Kaschesky, and G. Bouchard, “Opinion mining in social media: Modeling, simulating, and forecasting political opinions in the web,” Gov. Inf. Q., vol. 29, no. 4, pp. 470–479, 2012.

[32] P. Salunkhe and S. Deshmukh, “Twitter Based Election Prediction and Analysis IRJET Journal Twitter Based Election Prediction and Analysis,” Int. Res. J. Eng. Technol., vol. 4, no. 10, pp. 539–544, 2017.

[33] R. Martins, P. Henriques, and P. Novais, “Predicting an election ’ s outcome using sentiment analysis Dataset creation,” in In World Conference on Information Systems and Technologies, 2020, pp. 134–143.

[34] M. M. Skoric, J. Liu, and K. Jaidka, “Electoral and public opinion forecasts with social media data: A meta-analysis,” Information, vol. 11, no. 4, pp. 1–16, 2020.

[35] É. Bélanger and S. Soroka, “Campaigns and the prediction of election outcomes: Can historical and campaign-period prediction models be combined?,” Elect. Stud., vol. 31, no. 4, pp. 702–714, 2012.

[36] R. S. Erikson and C. Wlezien, “Markets vs. polls as election predictors: An historical assessment,” Elect. Stud., vol. 31, no. 3, pp. 532–539, 2012.

[37] A. Valdivia, M. V. Luzón, E. Cambria, and F. Herrera, “Consensus vote models for detecting and filtering neutrality in sentiment analysis,” Inf. Fusion, vol. 44, pp. 126–135, 2018.


  • There are currently no refbacks.

Copyright (c) 2022 Tawakkal Baharuddin, Zuly Qodir, Hasse Jubba, Achmad Nurmandi

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

International Journal of Communication and Society  
ISSN 2684-9267
Published by Association for Scientific Computing Electronics and Engineering (ASCEE)
W :
E :

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

View My Stats