Giter Site home page Giter Site logo

shamayla38 / sentiment-analysis-of-election-tweets Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 27.25 MB

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.

Jupyter Notebook 100.00%
sentimentanalysis

sentiment-analysis-of-election-tweets's Introduction

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.

sentiment-analysis-of-election-tweets's People

Contributors

shamayla38 avatar tonamatos avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tonamatos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.