Twitter analysis done as a part of PreCog assignment.
https://tweettweet4pc.herokuapp.com/
To run locally, run commands:
- export FLASK_APP=tweet.py
- flask run
Approach:
- Used Tweepy to connect to the Twitter API.
- Through the twitter api searched for tweets relevant to Modi and Kejriwal by using keywords such as "modi,bjp pm,pm modi" and "aap, aam aadmi party, kejriwal" for Modi and Kejriwal respectively.
- Saved all the statuses received to mongodb using MongoAlchemy.
- Filtered out relevant data by querying the dataset.
- To find out who's more popular in Delhi,I counted posts having location as delhi or ncr and plotted a chart for the same.
- Used highcharts with jquery to show graphs and visualisations.