Anyone using the new version of Mapstraction?

When teaching my students at UCT’s Centre for Film and Media Studies how to visualise geographical data, I’ve previously used Mapstraction, along with a good textbook by Adam DuVander and his excellent Twitter geosearch example.

The Mapstraction lesson only required a couple of small updates to form the basis of an assignment where the students created their own custom version of a visualisation of geocoded tweets. It worked well, providing an excellent example of how to mashup social media data with a map. I also like the tutorial because it provides a relatively simple research tool for my postgrad students (who are usually not web developers). For example, I used it recently to research the applications used by journalists and delegates at the ANC’s December 2012 conference in Mangaung. It was also helpful as a way of showing students what a tiny proportion of twitter data is geocoded (usually lower than 1%), which smartphones are in use in various countries, and (perhaps most important) the dangers of assuming that the comments and activities of Twitter users in South Africa reflect the preoccupations of the population as a whole. As one of the delegates to the Mangaung conference tweeted ‘ANC’s masses are not your Twitter people. So Social Media Hype will mislead you’.

Geocoded tweets at ANC’s Mangaung conference in December 2012.
Applications used to post geolocated tweets from ANC Conference, Mangaung, 2012
Applications used to post geolocated tweets from ANC Conference, Mangaung, 2012

Mapstraction always appealed to me because of the ability to use it for open data providers, and the ease it promises if you want to switch from one map provider to another.

Unfortunately, it’s the nature of the game in this field that you have to keep running just to stand still. Preparing the new version of my course, I realised that I needed to update the tutorial as my exercise and the textbook builds on v2 of the Google Maps Javascript API. This is now deprecated and apparently won’t be available for much longer (until May 19 2013 to be precise). Given that I’d used Mapstraction, I didn’t think that it would be too difficult to make the switch, but sadly this was NOT the case.

Geocoded tweets about the beach posted near Durban, Janauary 2012, now using Google Maps API v3

The new version of the mashup (you can try it out here) allows you to search Twitter for geocoded tweets, and after searching you can summarise and view the twitter data.

I’m now using Gabriel Svennerberg’s textbook, and his Google Maps API v 3 JSON tutorial.

I still use the Twitter API and most of DuVander’s code for mining the JSON data, but I (reluctantly) abandoned Mapstraction, as I struggled a bit to get it to work, and I’m a bit short of time. I now display the data directly via Google Maps Javascript API v 3 instead of using the Mapstraction layer.

I’ve added a couple of features which I believe may be useful to researchers, and which I hope will spur my students to engage with the Twitter data in a more focused way. (I’ve found students like to decorate the maps but are overly cautious when it comes to making use of the additional data available from the tweets). The new version is just a start, but it provides a list of geocoded tweets, allows the user to see all the query results in JSON format or download the data as a JSON text file (although this requires browser popup windows to be enabled).

I tried updating the example to use the new version of Mapstraction and the Google Maps Javascript API v3 but ran out of time. I wondered whether anyone else has seen working examples which use Mapstraction together with Google API v3 and Twitter data? Please do let me know! Comments on the mashup example are welcome, though it is very much work in progress.