August 10, 2014

A look at Rakshabandhan through Instagram


Due to none of my sisters in town, Rakshabandhan day is like any other day for me. No family get-together, no special lunch, nothing at all.

I wanted to use Instagram API since a long time and thought there would be no better day than this. It would be very interesting to know what people posted on Instagram related to this ocassion.

So after searching a lot, reading through the Instagram documentation and a bit of hacking I managed to make a Python script that will fetch images from Instagram in real time.
I ran the script for the keyword happyrakhsabandhan so I could fetch all the images hash-tagged with happyrakshabandhan as and when they are uploaded.

The script ran for about 15-20 minutes after which the rate limit got exceeded. My directory was filled with 335 images in just 15 minutes.

Here is my code snippet,

Just enter your credentials, set a search term and enter your path, you're good to go.

I prepared a quick collage of some random images.


General observations after glancing through the images,

  1. Majorly, there are close-ups of the rakhis either displayed in the plate or tied to the brother's wrist.
  2. Most of the pics show the brother-sister pair captured by a selfie.
  3. Some of the pics show all the cousins getting together for this occasion usually at someone's home.
  4. Also, girls have teasingly sent happy Rakshabandhan messages to their guy friends via trolls/selfies.
This is a very small project but this is just a start. It gave me many ideas for the future like, getting images which are selfies and using image processing to classify whether it is a boy or a girl, predicting hashtags based on the image and also predicting hashtags based on a given hashtag etc.
You can look forward to many more things in the future.
Feedback and suggestions are welcome.

And yes, *blog description and about us coming soon*

Happy Hacking :D