Before you think that I spent the last one month in Singapore, let me say upfront that this post is about a little big data thought experiment involving Singapore  and a whole lot of tweets.
Some time back Eric Fischer posted some amazing maps on Flickr and elsewhere on the web visualizing tweets from Twitter and Flickr. He basically plotted locations from where people tweeted and posted photos to Flickr from. The result – a beautiful map of the area which looks more like a night time view of the area from space!!
Seeing this I was inspired to try the same. Initially I thought of trying it for Indian cities, however it seems that geographic co-ordinates are hard to come by for tweets from India. So then I randomly chose Singapore for this little experiment.
I set up a small Ruby script that polled Twitter’s search API once every few minutes and pulled tweets from Singapore. These were then logged and stored onto simple text files. I ran this script for little over a month (August to September) and managed to collect about 225,000 tweets. Plotting them using R (without any projections) gave rise to this beautiful visualization.

Singapore Twitter Map

Singapore Twitter Map

Some interesting features immediately come to light here. For instance the two huge vacant holes on the plot correspond to the two large national parks in Singapore. Concentration of tweets in other places also brings to light roads and other transportation conduits.

I also did some analysis around tweets by hour and day of week and kind of reverse geo-coded popular locations to figure out where people were tweeting from on weekends. The result of that exercise gave this interesting tag cloud

Popular Places on the weekend

Popular Places on the weekend

I’ve put all this together in one gorgeous infographic which you can see here.
PS: Many Thanks to good pal Jayaram for helping me put the map together in R

Did you like this? Share it: