Next Article in Journal
A Method for Fast Selection of Machine-Learning Classifiers for Spam Filtering
Next Article in Special Issue
A Consolidated Review of Path Planning and Optimization Techniques: Technical Perspectives and Future Directions
Previous Article in Journal
HAL-ASOS Accelerator Model: Evolutive Elasticity by Design
Previous Article in Special Issue
Automatic Categorization of LGBT User Profiles on Twitter with Machine Learning
 
 
Article

Sentiment Analysis of before and after Elections: Twitter Data of U.S. Election 2020

1
Dipartimento di Elettronica, Informazione e Bioingegneria (DEIB), Politecnico di Milano, 20133 Milano, Italy
2
Department of Computer and Information Sciences, CCIS, Prince Sultan University, Riyadh 66833, Saudi Arabia
3
Department of Telecommunication Engineering, University of Engineering and Technology Taxila, Taxila 47080, Pakistan
4
Department of Computer Engineering, University of Engineering and Technology Taxila, Taxila 47080, Pakistan
5
Department of Computer Science, University of Gujrat, Gujrat 50781, Pakistan
6
Department of Computer Sciences, Quaid-i-Azam University, Islamabad 45320, Pakistan
*
Authors to whom correspondence should be addressed.
Academic Editors: Amir H. Gandomi, Fang Chen and Laith Abualigah
Electronics 2021, 10(17), 2082; https://doi.org/10.3390/electronics10172082
Received: 29 July 2021 / Revised: 20 August 2021 / Accepted: 24 August 2021 / Published: 27 August 2021
(This article belongs to the Special Issue Machine Learning Technologies for Big Data Analytics)
U.S. President Joe Biden took his oath after being victorious in the controversial U.S. elections of 2020. The polls were conducted over postal ballot due to the coronavirus pandemic following delays of the announcement of the election’s results. Donald J. Trump claimed that there was potential rigging against him and refused to accept the results of the polls. The sentiment analysis captures the opinions of the masses over social media for global events. In this work, we analyzed Twitter sentiment to determine public views before, during, and after elections and compared them with actual election results. We also compared opinions from the 2016 election in which Donald J. Trump was victorious with the 2020 election. We created a dataset using tweets’ API, pre-processed the data, extracted the right features using TF-IDF, and applied the Naive Bayes Classifier to obtain public opinions. As a result, we identified outliers, analyzed controversial and swing states, and cross-validated election results against sentiments expressed over social media. The results reveal that the election outcomes coincide with the sentiment expressed on social media in most cases. The pre and post-election sentiment analysis results demonstrate the sentimental drift in outliers. Our sentiment classifier shows an accuracy of 94.58% and a precision of 93.19%. View Full-Text
Keywords: sentiment analysis; Twitter; presidential election; prediction; natural language processing sentiment analysis; Twitter; presidential election; prediction; natural language processing
Show Figures

Figure 1

MDPI and ACS Style

Chaudhry, H.N.; Javed, Y.; Kulsoom, F.; Mehmood, Z.; Khan, Z.I.; Shoaib, U.; Janjua, S.H. Sentiment Analysis of before and after Elections: Twitter Data of U.S. Election 2020. Electronics 2021, 10, 2082. https://doi.org/10.3390/electronics10172082

AMA Style

Chaudhry HN, Javed Y, Kulsoom F, Mehmood Z, Khan ZI, Shoaib U, Janjua SH. Sentiment Analysis of before and after Elections: Twitter Data of U.S. Election 2020. Electronics. 2021; 10(17):2082. https://doi.org/10.3390/electronics10172082

Chicago/Turabian Style

Chaudhry, Hassan Nazeer, Yasir Javed, Farzana Kulsoom, Zahid Mehmood, Zafar Iqbal Khan, Umar Shoaib, and Sadaf Hussain Janjua. 2021. "Sentiment Analysis of before and after Elections: Twitter Data of U.S. Election 2020" Electronics 10, no. 17: 2082. https://doi.org/10.3390/electronics10172082

Find Other Styles
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Back to TopTop