The motivation for this project was to predict the US presidential elections 2016. Sentiment analysis was done on daily tweets of both candidates posted from twitter and predicted who is more favourite. Dataset was created on daily basis from twitter using Tweepy API. Analyzed the result by running optimal regression models using SAS Enterprise Miner after a thorough cleaning of the dataset.
Download twitter_test.py
from above and install the APIs and get the credentials metioned below:
Tweepy - pip install tweepy
consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""
Create a twitter account and get these credentials from https://apps.twitter.com/ by following the instructions mentioned. Paste the
credentials in the code and run to generate the .csv file.