https://github.com/epigos/ghana_elections
Twitter analysis of Presidential election in Ghana
https://github.com/epigos/ghana_elections
Last synced: 3 months ago
JSON representation
Twitter analysis of Presidential election in Ghana
- Host: GitHub
- URL: https://github.com/epigos/ghana_elections
- Owner: epigos
- License: mit
- Created: 2016-12-20T12:27:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T05:56:58.000Z (over 8 years ago)
- Last Synced: 2025-01-27T05:41:41.864Z (5 months ago)
- Language: Jupyter Notebook
- Size: 10.2 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter analysis of Presidential election in Ghana
This contains source code and dataset used in my analysis of the President elections in Ghana.
The analysis involves sentiment analysis of twitter by detecting polarity and also emotions displayed by the writer of the tweet using machine learning algorithms.Here is the blog post; [Ghana Presidential Election 2016 — Twitter Analysis Part 1](https://medium.com/@epigos/ghana-presidential-election-2016-twitter-analysis-part-1-57ffa6f7e1c6#.pyt37na1k)
The ipython notebook contanins the source code.
### Install dependencies
```
pip install -r reqirements.text
```### Start notebook
```
jupyter notebook
```### Description
Datasets used can be found the `data` directory.
Description of Dataset (`2016_election_tweets_part_1`)
1. favorites - number of favorites of tweet.
2. hashtag - hashtag from which tweets was collected.
3. permalink - link to the tweet on twitter.
4. retweets - number of retweets of tweet.
5. score - the sum of favorites and retweets of the tweet.
6. text - the tweet itself.
7. timestamp - datetime of tweet.
8. username - user who made the tweet.The `model` directory contains saved models used in the analysis;
1. emotion_model - used in detecting emotions of tweets.
The `plots` directory contains all saved plots as images.