Skip to content

Sentiment Analysis of 1.72 million tweets regarding Joe Biden and Donald Trump from 2020 US election to find political trends and predict election outcome.

Notifications You must be signed in to change notification settings

shamayla38/SentimentAnalysisofElectionTweets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Can Twitter Data Replace Traditional Polling?

Introduction

Conventional polling has long been the go-to method for gauging public opinion during elections. However, it is expensive, difficult, and time-consuming. In light of this, we embark on a project to explore whether social media sentiment could serve as a viable alternative to traditional polling methods. Specifically, we aim to answer the question: Can social media sentiment replace polling data?

Project Overview

We analyze 1.72 million election-related tweets pertaining to Joe Biden and Donald Trump. By leveraging natural language programming techniques, we seek to predict election outcomes and uncover political trends. You can see the notebook here: nbviewer

Results

After extensive analysis, we achieve a remarkable 70% accuracy in predicting election results based on sentiment analysis of the Twitter data. Moreover, we discover that Twitter data is surprisingly effective in reflecting political trends.

Beyond mere election predictions, we delve deeper into demographic insights. Our data-driven findings perfectly align with existing knowledge: Trump enjoys popularity within the White demographic, while Biden's support is stronger among Black and Hispanic demographics.

Screen Shot 2024-03-04 at 7 43 42 PM

Insights and Limitations

One notable insight from our research is the positive correlation between voter turnout rates and positive sentiments for Biden, as well as negative sentiments for Trump. This suggests that Twitter data indeed has the potential to replace traditional polling data.

However, it is crucial to acknowledge the limitations of this approach. One significant drawback is the disproportionate usage of Twitter across American states and among different age groups. Additionally, natural language programming struggles with detecting sarcasm, which can affect the accuracy of sentiment analysis.

Conclusion

In conclusion, our project sheds light on the potential of social media sentiment analysis as a tool for predicting election outcomes and understanding political trends. While there are challenges and limitations to address, the findings highlight the promise of leveraging alternative data sources in the realm of political analysis.

Thank you for your interest in this project! Feel free to explore the repository and reach out with any questions or feedback.

About

Sentiment Analysis of 1.72 million tweets regarding Joe Biden and Donald Trump from 2020 US election to find political trends and predict election outcome.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published