Abstract
There has been an exponential growth of social media in the recent past. Social media has provided the common public a medium to voice their opinions freely. Twitter is amongst the most used social networks, especially when it comes to raising opinions regarding politics. Politics has been a fascinating subject to discuss for the common people for ages, but modern-day Twitter has become the new platform for these political discussions. The data generated from these discussions can be used to analyse many real-life scenarios. In this paper, we used Twitter data to analyse and predict the 2020 US elections. We extracted tweets featuring the two primary candidates of the election: Joe Biden and Donald J. Trump. We have extracted two sets of tweets; 1) tweets by American users and 2) tweets by Indian users; based on geopolitical location. Using python packages, we classified the tweets into five different emotions. We used sentiment analysis (VADER) algorithms to assign polarity to the tweets, which would later help us predict the outcome of the elections. We have also compared the opinions of two countries on the election results. The observations have been displayed using various visualization techniques.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Tankovska, H.: Number of social network users worldwide from 2017 to 2025. https://www.statista.com/statistics/278414/number-of-worldwide-social-network-users/. Social media usage is one, almost 4.41 billion in 2025
Sayce, D.: The number of tweets per day in 2020. https://www.dsayce.com/social-media/tweets-day/. Every second%2C on average%2C around 6%2C000 tweets are tweeted on August 2014 with 661 million
Ramteke, J., Shah, S., Godhia, D., Shaikh, A.: Election result prediction using Twitter sentiment analysis. In: Proceedings of the International Conference on Inventive Computation Technologies, ICICT 2016, Coimbatore, India, pp. 1–5. IEEE (2016)
Sreelakshmi, K., Rafeeque, P.C.: An effective approach for detection of sarcasm in tweets. In: 2018 International CET Conference on Control, Communication, and Computing, IC4 2018, pp. 377–382 (2018). https://doi.org/10.1109/CETIC4.2018.8531044
Singh, P., Dwivedi, Y.K., Kahlon, K.S., Pathania, A., Sawhney, R.S.: Can Twitter analytics predict election outcome? An insight from 2017 Punjab assembly elections. Gov. Inf. Q. 37, 101444 (2020). https://doi.org/10.1016/j.giq.2019.101444
Lazaros, O., Tjortjis, C.: Presidential elections using data extracted from. In: 2018 South-East Europe Design Automation, Computer Engineering, Computer Networks and Social Media Conference, pp. 1–8 (2018)
Endsuy, R.D.: Sentiment analysis between VADER and EDA for the US presidential election 2020 on Twitter datasets. J. Appl. Data Sci. 2, 8–18 (2021)
Sharma, A., Ghose, U.: Sentimental analysis of Twitter data with respect to general elections in India. Procedia Comput. Sci. 173, 325–334 (2020). https://doi.org/10.1016/j.procs.2020.06.038
Celli, F., Stepanov, E.A., Poesio, M., Riccardi, G.: Predicting Brexit: classifying agreement is better than sentiment and pollsters. In: Proceedings of the PEOPLE Workshop, pp. 110–118 (2016)
Jose, R., Chooralil, V.S.: Prediction of election result by enhanced sentiment analysis on Twitter data using classifier ensemble Approach. In: Proceedings of the 2016 International Conference on Data Mining and Advanced Computing, SAPIENCE 2016, pp. 64–67 (2016). https://doi.org/10.1109/SAPIENCE.2016.7684133
Anand, T., Singh, V., Bali, B., Sahoo, B.M., Shivhare, B.D., Gupta, A.D.: Survey paper: sentiment analysis for major government decisions. In: Proceedings of the International Conference on Engineering Management, ICIEM 2020, pp. 104–109 (2020). https://doi.org/10.1109/ICIEM48762.2020.9160252
Chauhan, P., Sharma, N., Sikka, G.: The emergence of social media data and sentiment analysis in election prediction. J. Ambient Intell. Humaniz. Comput. (2020). https://doi.org/10.1007/s12652-020-02423-y
Sandoval-Almazan, R., Valle-Cruz, D.: Facebook impact and sentiment analysis on political campaigns. In: ACM International Conference Proceeding Series (2018). https://doi.org/10.1145/3209281.3209328
Qi, H., Jiang, H., Bu, W., Zhang, C., Shim, K.J.: Tracking political events in social media: a case study of Hong Kong protests. In: 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, pp. 6192–6194. IEEE (2019)
Yaqub, U., Chun, S.A., Atluri, V., Vaidya, J.: Analysis of political discourse on Twitter in the context of the 2016 US presidential elections. Gov. Inf. Q. 34, 613–626 (2017). https://doi.org/10.1016/j.giq.2017.11.001
Jaidka, K., Ahmed, S., Skoric, M., Hilbert, M.: Predicting elections from social media: a three-country, three-method comparative study. Asian J. Commun. 29, 252–273 (2019). https://doi.org/10.1080/01292986.2018.1453849
Wang, L., Gan, J.Q.: Prediction of the 2017 French election based on Twitter data analysis using term weighting. In: 2018 10th Computer Science and Electronic Engineering Conference, CEEC 2018 – Proceedings, pp. 231–235 (2019). https://doi.org/10.1109/CEEC.2018.8674188
Budiharto, W., Meiliana, M.: Prediction and analysis of Indonesia presidential election from Twitter using sentiment analysis. J. Big Data 5, 1–10 (2018). https://doi.org/10.1186/s40537-018-0164-1
Hasan, A., Moin, S., Karim, A., Shamshirband, S.: Machine learning-based sentiment analysis for Twitter accounts. Math. Comput. Appl. 23, 11 (2018). https://doi.org/10.3390/mca23010011
Sharma, P., Moh, T.S.: Prediction of Indian election using sentiment analysis on Hindi Twitter. In: Proceedings - 2016 IEEE International Conference on Big Data, Big Data 2016, pp. 1966–1971 (2016). https://doi.org/10.1109/BigData.2016.7840818
Acknowledgements
We would like to thank Mr. Prathamesh Churi and Mrs. Shweta Loonkar for their guidance and support during the completion of this research paper. We would also like to thank Miss Farah Kaskas for her help in obtaining the American tweets dataset.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Singh, S., Singhania, S., Pandya, V., Singal, A., Biwalkar, A. (2022). East Meets West: Sentiment Analysis for Election Prediction. In: Gunjan, V.K., Zurada, J.M. (eds) Modern Approaches in Machine Learning & Cognitive Science: A Walkthrough. Studies in Computational Intelligence, vol 1027. Springer, Cham. https://doi.org/10.1007/978-3-030-96634-8_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-96634-8_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-96633-1
Online ISBN: 978-3-030-96634-8
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)