Moenupa / tweet-dynamics-us-election-2020

Exploring Public Opinion Dynamics From 2020 U.S. Election Tweets, CSC440 Fall 2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exploring Public Opinion Dynamics From 2020 U.S. Election Tweets

Authors

Abstract

This study delves into the dynamics of public opinion during the 2020 U.S. Presidential Election through sentiment analysis, emotion analysis, and stance detection applied to around 1.72M tweets. We explore the predictive power of sentiment analysis in political science, detailing the transition from traditional to advanced NLP models, notably XLM-RoBERTa, for enhanced Twitter data analysis. Additionally, we examine stance detection's role in reflecting public attitude and potential voting behavior. The study investigates how sentiment and stance correlate with major election events, presenting a temporal and geographical analysis of the data. The goal is to ascertain the impact of social media on election outcomes and public opinion.

Inference

  1. Download the data from kaggle us 2020 election tweets
  2. Structure your data like this, or run inference.ipynb to generate the inferences:
    .
    ├── README.md
    └── data
        ├── inference.ipynb
        ├── emotion             # inference of tweet's emotion
        ├── language            # inference of tweet's language
        ├── sentiment           # inference of tweet's sentiment
        ├── stance_trump        # inference of tweet's stance for trump
        ├── stance_biden        # inference of tweet's stance for biden
        └── src                 # <- kaggle original data
            ├── hashtag_donaldtrump.csv
            └── hashtag_joebiden.csv

Results

See figure_generator.py. You can obtain a compiled version from github@Moenupa/tweet-dynamics-us-election-2020

About

Exploring Public Opinion Dynamics From 2020 U.S. Election Tweets, CSC440 Fall 2023


Languages

Language:Jupyter Notebook 99.0%Language:Python 1.0%