Skip to content

A sentiment analysis work on the tweets of Ghanaians ahead of 2024 General elections

Notifications You must be signed in to change notification settings

Wiafe-Kevin/Twitter-Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

This project explores the sentiment of Ghanaians on Twitter in the context of the upcoming 2024 general elections. Utilizing advanced sentiment analysis techniques, including natural language processing (NLP) and machine learning models such as Logistic Regression, Random Forest, Naïve Bayes and Support Vector Machines, this work analyzed tweets related to key political issues and candidates to gauge public opinion and its potential impact on voter behavior and election outcomes. The study employed the Tweepy library to collect real-time data from Twitter, facilitating an in-depth understanding of prevailing sentiments among voters. Model evaluation metrics, including accuracy, precision, and recall, revealed that Support Vector Machine model achieved an overall highest accuracy rate of 80%, followed by Random Forest with an accuracy rate of 79.8%, Logistic Regression achieved 78% and lastly, Naïve Bayes model achieved 74%, indicating a robust performance in sentiment classification. Findings indicated a significant correlation between social media discourse and electoral outcomes, highlighting the importance of digital platforms in shaping public perception. This work contributes to the growing body of literature on social media's role in political communication and offers valuable insights for stakeholders in the Ghanaian electoral landscape.

About

A sentiment analysis work on the tweets of Ghanaians ahead of 2024 General elections

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published