# Google Search Trends of Indian Politics



## @vi (Jun 25, 2014)

*i.imgur.com/51zmXqU.png​
*site*: Google Search Trends of Indian Politics
*source code*: *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:


```
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:


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

3. Run server.py to provide API end point


----------



## Anorion (Jun 25, 2014)

cant see graph on main site
is there an index for those lines? like what each line stands for, donno how to read graph 
would be great if it can co-relate with news from that time


----------



## @vi (Jun 25, 2014)

^Graph is working fine here...can you try again by refreshing the page? 



Anorion said:


> would be great if it can co-relate with news from that time


yeah! good idea... I will see how to do that...


----------



## Anorion (Jun 25, 2014)

wow. its working fine. took some seconds to load. 
its really good, just wish it had been for more months from the past too


----------



## @vi (Jun 25, 2014)

^thank you!

yes it takes time to load as whole bunch of data is being thrown at once. I will looking at the ways to avoid it... I got this idea before election results, but yeah would have been better if I had more data.


----------

