More Analysis of Neighborhood Photos

I’ve been using the real-time Instagram API to look at photos taken in the Mission District of San Francisco.

Based upon some good ideas from my fellow fellows at Stamen, I’ve also started doing some color, sentiment, and keyword analysis on these photos.


I’ve only been collecting the analysis for a week, but here are the most popular photos, keywords, and colors posted in the Mission.

The most popular words are:

“Resolved”, “Like”, “Love”, & “Want”

The most popular colors are:


When I see a new photo in the stream from Instagram, I now do some basic analysis of the post and image file.

I’m using the Node.js quantize library by Olivier Lesnicki to perform color quantization. The exact method is very similar to the implementation of the color thief library by Lokesh Dharkar.

The result is a palette of distinct colors in the photograph, including the most dominant color in the image.

Color and keyword analysis of Instagram photos.

Words & Sentiment

Both Twitter and Instagram already include hashtags, but I’m using gramophone to count the keywords in each post. I then perform AFINN sentiment analysis for the keywords. I’m using the sentiment Node.js library by Andrew Sliwinski. At a later stage, I’ll include the corpus of all Mission posts into the analysis. I may use a similar technique to count the most popular emoticons used by Twitter and Instagram users in San Francisco.

Here’s a visual example of the colors and words that I’m extracting.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s