Google Search Trends of Indian Politics

Status
Not open for further replies.

avi

Keymaster
51zmXqU.png

site: http://avinassh.github.io/polistats
source code: https://github.com/avinassh/polistats

What it is and How it works:

These two following graphs show the number of search results appeared on Google for certain keywords. If you search for 'Narendra Modi ' today you will see approximately 15 million search results. The graphs here show exactly that from May 4, 2014. I just wanted to compare the number search results for Narendra Modi, Arvind Kejriwal and Rahul Gandhi. These graphs also include search results for Sonia Gandhi, BJP, AAP and Congress India. One graph shows number of search results on main Google search site and other on Google News.

I wrote a bot which visits Google four times a day at 10am, 2pm, 6pm and 10pm. It searches for the keywords on both sites and stores the results in database. The bot is active since May 4, 2014. Bot is written in Python and MongoDB is used to store the data. An API end point is available to get all the data in JSON and it is powered by Tornado.

If you want to run on your own, installation instructions here:

1. Install required libraries from requirement.txt:

Code:
pip -r install requirements.txt

2. Run bot.py to start collecting data. If you want run the bot multiple times a day, use crontab:

Code:
$crontab -e
00 10,14,18,22 * * * /home/johnappleseed/polistats/bot.py

3. Run server.py to provide API end point
 
Trends says who are popular on google searches, not on entire web.

Trends: No. of people search for @ayanavish on Google search
My thing: No. of search results appear when you search for @ayanavish :p
 
Status
Not open for further replies.