For complete code walk-through and analysis - Notebook link : https://drive.google.com/file/d/1V8Sl8WW_X7GuOuM-lJZ7oSwy0zfDF1jP/view?usp=sharing
To understand and estimate user sentiments over twitter to real news, we first need a lot of tweets. Our first task is to get as many as 10K tweets.
Instead of going for 10K tweets, I first got 500 tweets for sample. These tweets were searched specifically for "#modi", "#commonwealth", "#facebook", "#music."
Using the library tweepy, I have acquired the specified number of tweet. These tweets were subsequently pushed to the mongoDB using script.
These data sets are present in the folder Datasets.
Once the data sets are cleaned using script the cleaned data sets are generated.
The data sets are then used to analyze sentiments. The top entities in tweets are found to be ['KXIPvCSK', 'TreCru', 'Syria', 'PremiosMTVMiaw', 'Hearties']. News realted to these topics is collected using news api. The resulting news articles are saved in json format.
These sentiment values are plotted in python using libraries matplotlib, mplleaflet. And the resulting graphs can be seen in html notebook results.
To present the work in web format, I have generated json files. The website is hosted at.