This is a guest post by Chico Charlesworth. He has created a geographic visualisation with the help of his BBC colleague, Tom Martin. The visualisation mashes up location-aware social data to visually capture people’s experiences and reactions to the royal wedding.
It was built in three days and is showcased as a video and a web application.
A little bit of Twitter goes a long way
The first step was to collect the local tweets during the day of the royal wedding by using Twitter’s Search API and geocodes. Geocodes include the latitude and longitude of a location. The geocode used for the royal wedding was “geocode=51.502652,-0.131493,0.7mi”, which returns tweets located within a 0.7 mile radius from where the royal wedding happened. Over the course of the day, 4000+ local tweets were captured. The visualisation timeline was narrowed down into a 12 hour period, resulting in almost 3000 tweets between the hours of 8am and 8pm.
Mapping local tweets
Once the local tweets were gathered, the next step was to display them on a map. The map is displayed on a web page by using Google’s Maps API, where each local tweet is displayed as a marker. What’s neat is that each marker is visually identifiable as a tweet, a photo or a Foursquare checkin. Best of all, it’s interactive and quite addictive to click on the tweets, photos and checkins as they popup when hovering over their corresponding marker.
Tweet stats
Along with plotting the data on a map, statistics are displayed to add another dimension. The stats are broken down into total local tweets, total checkins, total photos, girls vs boys, top tweeters and top retweets.
Try it yourself
In terms of the technology stack, a Java back-end collected the tweets and made them accessible to a jQuery powered front-end, which in turn updates the map and stats.
The following snippet of code is a simplified version of the real thing.
Future visualisation projects of this kind could be applied to a range of other social occasions including festivals, sporting events and events with strong social buzz.
Latest posts by Chico (see all)
- HOW TO: Create a Geovisualisation Web App with Local Tweets – June 20, 2011








[...] Geovisualisation of Locat Tweets [...]
Great, is it possible to show only my tweets?
I’ve created an example where a user’s local tweets are shown on the map – https://gist.github.com/1039016
Remember that for local tweets to show up, you have to turn your location on when tweeting.
Hey Chico, thnx for this great idea of combining googlemaps and twitter. I am currently trying to build up my new website and I was looking for this kind of feature. But I have a problem with the script. I tried to use your local tweet script you provided. The map works and the connection to twitter works also. I tested the url to the twitter api, until the callback (http://api.twitter.com/1/statuses/user_timeline.json?screen_name=‘ + twitterUser + ‘&count=200&include_rts=1). I´ve just change the location to visible in twitter, but nothing worked right now. Do you know, if twitter changed anything in their api? Is there a new json problem?
Greetings dg
Maybe you’re not successfully enabling your location when you’re creating new tweets? http://support.twitter.com/entries/122236 and http://support.twitter.com/groups/34-apps-sms-and-mobile/topics/171-twitter-s-mobile-website/articles/118492-how-to-tweet-with-your-location-on-mobile-devices explain how you can do this. If you’re still having problems, let me know what your twitter username is and I will try and see why it’s not working.