MapTube Clickable Maps

We’ve just updated the MapTube website with a new release of the software that makes all of the Census maps clickable. Anything tagged with the “CENSUS2001″ keyword is clickable, as well as most of the maps made from the data on the London DataStore.


The new clickable map icon. This is used to turn the clickable maps feature on or off.



The resulting popup window showing attribute data for the feature that has been clicked.

The maps page now contains an additional button below the zoom level slider which shows a representation of a mouse. If this is enabled, as shown below, then a single mouse click on the map will display a popup window containing more information about the feature just as in a traditional GIS.

The image on the right shows the default popup window which just lists the attributes from the CSV file used to make the map. If you want to examine the data, there is a link to download the CSV file from the ‘more information’ page.

The html in the popup window is obtained by applying a transformation to the attribute data that turns it into the html that you see displayed in the window. In the next release of MapTube we will include a user interface to allow people to build maps of fixed geometry data (i.e. census data, ward codes, districts, countries etc) directly from data in a CSV file. We are also planning to add a web based interface to allow people to write what appears in the popup window themselves so that it will be possible to include graphs and charts.

Election 2010: Where Were All the Votes?

Using the General Election 2010 results spreadsheet from the Guardian Data Blog, we’ve produced three MapTube maps showing the distribution of votes for the three main parties:

Conservate share of vote Labour share of vote Liberal Democrat share of vote

The maps can be viewed on MapTube at the following link:

Use the red slider buttons to fade the distributions for the three parties up and down.

All our election related maps can be found at the following link:

The UK Election results from the Guardian Data Blog can be found here:

UK General Election 2010: Results

With 649 of the 650 parliamentary seats from the 6th May 2010 General Election now declared, we can see how the policital map of the UK has changed. The one remaining seat is Thirsk and Malton where the death of one of the candidates means that the vote has been postponed until 25th May. 

Election 2010 ResultPolitical Party Colours

This map has been uploaded to our MapTube website so that the results can be compared with some of our other maps.

Here are some interesting comparisons:

Compare the 2005 election to the 2010 election results:

The 2010 result is shown on the top layer, so move the red slider left and right to see how the political outlook has changed between 2005 and 2010. Apologies for the change in the SNP colour between the two colour scales, but I will upload a new one with standardised colours later. Also, Northern Ireland is missing as we don’t have a boundary dataset for this country, but we are currently trying to obtain one.

Did the MPs’ expenses scandal cause existing MPs to lose their seats?

The top layer shows the parliamentary constituencies where MPs have been told to pay back expenses according to the Sir Thomas Legg report. Slide the top layer slider left and right to see where the parties have changed. This only shows the party colours and not how much MPs were asked to pay back. The result is actually rather inconclusive. Where there are changes, it’s possibly as much a result of boundary changes as expenses repayments. What is required is a comparison that takes both the boundary changes and repayment amounts into account.

Once the final election analysis is available we will add a 2010 turnout map and proportional representation maps of the main parties showing what percentage of the electorate voted for each party by constituency.

Parliamentary Constituencies

With the recent release of the OS Free Data and the up-coming election, I’ve been looking at Parliamentary Constituencies boundaries. It’s not clear from the accompanying documentation which boundary set the OS Free Data is based on, but the following image should clarify things. This is from the OS Free Data:

OS Free Parliamentary Constituencies

Now compare that to the PCON 2010 dataset that I obtained from the Boundary Commission:

PCON2010 Boundary Dataset

This is the set of boundaries being used for the upcoming election as you can see that “Hammersmith and Fulham” has split into “Hammersmith” with “Fulham” being joined with “Chelsea”. This can be verified on the UK Parliament website and matched to their list of constituencies being contested in the General Election.

This means that the OS Free data is either based on the 2001 or 2008 (see National Statistics Westminster Geographies) boundary sets. It also doesn’t help that the Boundary Commission changed on 1 April 2010 from being part of the Electoral Commission to a new department called the Local Government Boundary Commission for England. This also raises the issue of the Irish political boundaries as we don’t currently have any access to them, but could make a substitute set of boundaries from postcode data.

Now that all the constituency boundaries are sorted out, we’re planning to had more electoral maps to our MapTube website, which will be at the following address:

From Tile Pyramids to Population Pyramids

It’s actually a stacked bar chart rather than a traditional population pyramid, but the image below shows male/female population by age for all the output areas in England. The red thematic overlay is total population for every OA, which can be clicked to get the age group breakdown shown in the popup window.

Clickable Age Map
Clickable Age Map

This map is a variation on the original clickable OAC map and was built using a new version of the GMapCreator which contains the clickable technology. Traditionally, maps like this have been built using a server and database to translate the click on the client into a geographic area using point in polygon and then sending the query data back to the client. This method doesn’t scale when you have limited server resources and are looking to handle high numbers of hits, for example with the Mood Maps that we’ve been doing recently. An alternative solution is to build feature coded tiles and let the client handle most of the work displaying the data. Using this system, there is a second set of tiles, one of which the client downloads when the user clicks on a point. This allows the client to work out which feature has been clicked and request the data for that area as an xml file.

The hard part is designing a system which can allow people to design the popup window without having to resort to programming. In the example above, the graph was created using Google Charts via the GMapCreator’s user interface. All that was needed was to choose the data fields from a list and to select the chart type. The URI string to create the chart comes from an xslt transform applied to the xml data. This transform is automatically created by the GMapCreator interface, which also allows the rest of the popup window to be designed using a simple html editor.

Downloadable Preview – GENeSIS Exhibition Space

The following exhibition space is a proof of concept, looking at the ability to share and display city datasets and simulations within an interactive game engine. Available for download on both the PC and Mac (intel) platforms the space is the result of a few days work with the Unity Engine, it is intended to be viewed in the spirit of development rather than a completed product.

The room includes our first ‘crowd and delegate’ models direct from 3D Max, created as basic wander and avoid simulations they provide the building blocks of emergent behaviour within the cityscape.

City wide data sets can to be honest be very ‘dry’, the whole point of digital urban is to look at new ways to outreach, visualise and ultimately communicate urban data. The ability to include 3D models via ESRI ArcScene is a notable step forward, pictured below is the retail and office space in London measured on a 500m grid. We note some polygon issues here but these are known and we think we have a way to fix them – its to do with the way ArcScene exports, the model forms the centre of the exhibition space:

The room features various architectural models, including the Swiss Re building and the GLA in London, it also features a number of our latest output movies, the London LiDAR and Second Life Agents are of particular note.

The model is, as we mentioned, proof of concept, the next step is the addition of themed rooms and a more organised structure. We think the concept of virtual exhibition spaces is a strong one, so as ever any comments are most welcome…

Download the model for Windows XP/Visa (221 Mb zip file)

Unzip the file, open the folders and run the .exe file.

Download the model for Mac (222 Mb zip file)

Extract and simply run the .dmg file.

Use the mouse to look around, W/S move forwards/backwards, Space to jump.

Tiled Maps without the Internet

This is one of those things that’s obvious once you know it, but I’ve often found myself developing code for tiled maps, but without a connection to the Internet. Often, I just want a quick check to see if the tiles are rendered correctly, so I don’t need the background map.

The obvious solution is to create an OpenLayers page with your custom tiles as the base layer. The javascript that makes OpenLayers work can be served locally, unlike the Google API, so by only having one layer of locally served tiles, you don’t need an Internet connection.

The html pattern follows the OpenLayers ‘howto’ guide and uses a custom TMS layer as follows:

var googlecustom=new OpenLayers.Layer.TMS(“Test”,,{ ‘type’: ‘png’, ‘isBaseLayer’: true, ‘getURL’: TMSCustomGetTileURL });

The ‘TMSCustomGetTileURL’ returns the tile url based on the x, y and z value in whatever format you are storing tiles in. For this project, it was the keyhole string format.

OpenLayers map showing the BBC Look North Recession data using dynamic tile creation
OpenLayers map showing data from the BBC Look North Recession mood map using dynamic tile creation

The image above was taken from a prototype system using C# and SQL Server 2008 to generate tiles dynamically from data stored in a CSV file at a URL.

OpenLayers and OpenStreetMap on MapTube

OpenLayers Birthday Cake
OpenLayers Birthday Cake

MapTube was 1 year old last week and to celebrate we have released an addition which allows you to change the background map to OpenLayers and OpenStreetMap.

Google and OpenLayers Toggle
Google and OpenLayers Toggle

The blue ‘G’ and the greyed out OpenLayers icon toggle the API between Google and OpenLayers. On the OpenLayers view, the basemaps can be the Mapnik, Osmarender or the Cycle Map layers which are all based on OpenStreetMap data. In addition to this, the OpenLayers API can also use the standard Google tiles as the basemap.

When creating a link to a map, the API currently in use is encoded into the URL when the ‘link to this map’ option is used. This shows up in the URL’s parameter list as “m=ol” for OpenLayers or “m=gm” for Google. For organisations where publishing links to Google Maps is a problem, this provides an open source alternative.

For more information on OpenLayers see:

For More information on the OpenStreetMap project see:

Crowdsourcing Spatial Surveys and Mapping

Below is a paper we will be presenting in March at GISRUK 2009. The full reference is:

Crooks, A. T., Hudson-Smith, A., M., Milton, R., and Batty, M. (2009), Crowdsourcing Spatial Surveys and Mapping, in Fairbairn, D. (ed.), Proceedings of the 17th Geographical Information Systems Research UK Conference, Durham University, England.

We thought we would put it on-line, to gauge peoples thoughts about it as it is the product of the crowd. Any comments and suggestions are most welcome.

Why blog about this work? It demonstrates the potential of crowdsourcing peoples opinions to specific questions over space and time both statistically and geographically, such work potentially allows one to crowdsource peoples perceptions on: fear of household burglary, quality of local schools, who would you vote for? etc. Additionally it is the ability to access real time information and use it for a purpose. For example, with the growth in mobile phones with built in GPS (such as the iPhone) if one had enough participants one could use the data for calibrating pedestrian or traffic simulations and therefore help potentially understand human behavoir. Such as peoples daily movement patterns (see urbanTick for such work).

Crowdsourcing Spatial Surveys and Mapping

1. Introduction

This paper presents the potential of linking the GMap Creator software and the MapTube web service to create near-real time spatial surveys. Three different surveys will be presented which map people’s perceptions about certain questions, including the current financial crisis, anti-social behaviour and peoples thoughts on road pricing. Basic results will be highlighted for each and the geodemographic profiles of respondents will be explored. However, before discussing this, the underlying technologies that we use for the creation of the surveys: GMap Creator and MapTube, will be introduced.

1.1. GMap Creator

GMap Creator is a free piece of software that takes a shapefile and enables the creation of thematic layers which can be quickly and easily integrated into Google Maps in a simple ‘point and click’ manner (see Hudson-Smith et al. (under review) for more details). Using GMap Creator, it is possible to overlay pre-rendered thematic tiles on top of street and satellite views of Google Maps, making it possible to show complex areal coverage’s. The purpose of such a tool is to build feature rich cartographic websites that may easily be used and interpreted by individuals who have limited experience of spatial data handling (e.g. Gibin et al., 2008) rather than for more formal exploratory spatial data analysis.

1.2. MapTube

MapTube ( combines the generic idea of YouTube where users can share information with the ability of GMap Creator to create thematic maps. MapTube provides a ‘place to put maps’ as we demonstrate in Figure 1, which highlights the most viewed maps currently on the MapTube site. MapTube acts as a portal for geographic data, data is not stored on the site. Every map hosted on MapTube is held on an outside server, and pulled in using the XML file which is automatically created when using GMap Creator. This allows data creators to maintain ownership of the data. MapTube allows one to view and compare different datasets as a series of layers (i.e. mashup) through the Google Map interface. However, we are currently working on an implementation for OpenLayers (see Milton, 2008).

Figure 1. MapTube home page showing the most popular maps.

2: Near Real-Time Spatial Surveys

Not only does MapTube allow people to share and view other people’s maps but it can also be used in more innovative ways. For example, as web surveys are often aspatial (e.g., the ability to combine GMap Creator and MapTube offers a simple solution to build spatial surveys for large areas. Figure 2 shows the process of creating the near real-time maps. Users are asked a series of questions and to enter their postcode so that the results can be geo-coded. This is then sent to a web server, time stamped and stored in a database. Every 30 minutes (however, this can be varied) a script is run to create a new shapefile, compiling all the results from a survey, aggregating them into a spatial units (in this case postcode districts). The shapefile is then passed to GMap Creator along with an XML file containing information including: settings for colour thresholds, maximum level of zoom and the field name of the shapefile for which the map is to be created on. GMap Creator runs creates a series of image tiles which updates the map on MapTube which can then be served back over the internet.
Figure 2. The process of gathering, storing and creation of maps.
What follows are three surveys which map people’s perceptions about certain issues done in association various BBC organisations. For each survey no personal information was collected and participants were reassured that actual locations could not be identified. This was ensured through the use of postcode districts rather than the postcode unit or building address therefore preserving data confidentiality. Used in conjunction with MapTube, it allowed participants and other users to take other information and lay the maps on top of one other.

2.1. Mapping the Credit Crunch

A pilot study was carried out as an experiment to create a mood map of the credit crunch within the United Kingdom in conjunction with BBC Radio 4 iPM show . Based on what is the “singly most significant factor hurting the person the most about the credit crunch”, participants were asked to enter the first part of their postcode (postcode district) so their responses could be geo-tagged along with one of six options to choose from: mortgage or rent, fuel, food prices, holidays, other, or the credit crunch is not affecting me.
Between 26th April and 29th June 2008 there were 23475 responses to the survey with 48.8% of response saying that fuel was most significant factor hurting the person the most about the credit crunch (Figure 3). However there was spatial variation around the country with more respondents within Greater London saying it was either mortgage or rent, or food as shown in Figure 4.
Figure 3. Overall percentages for the Credit Crunch Survey.
Figure 4. Results of the Credit Crunch Survey Focused Around London (Note: the Colour represents the Most Frequent Response in the Postcode District).

2.2. Anti-Social Behaviour in East Anglia

The Credit Crunch Map has since led to BBC Look East, using the system to map peoples perceptions of anti-social behaviour.

Anti-Social Behaviour in East Anglia.

Each respondent was asked “what problems do you face where you live?” Respondents had five options: drunken youths, noisy neighbours, boy racers, no problems, great community and no problems. The survey ran between 4th July 2008 and 12th September 2008. During this time 6902 responses were received. Figure 5 shows the overall percentages, with 33.7% saying drunken youths with the other categories broken down relatively evenly between 14 to 18%. Figure 6 maps the responses with drunken youths clustering around urban areas such as Norwich and Newmarket.

Figure 5. Overall Percentages for the Anti-Social Behaviour Survey.
Figure 6. Results of the Anti-Social Behaviour Survey Focused Around East Anglia (Note: the Colour represents the Most Frequent Response in the Postcode District, click here to see the map).

2.3. The Manchester Congestion Charge

There was a proposal for Manchester in introduce a congestion charge zone motorists pay to drive in and out of the city at peak times. The BBC North West Tonight program wanted people’s reaction to the proposed Greater Manchester congestion charge, from within the city but also people who drive in from outside the region. As these people don’t get a vote but may end up paying the charge (subsequently the people of Manchester said no).

The Manchester Congestion Charge.

People were asked the following question “If a congestion charge is introduced in Greater Manchester, along with significant investment in public transport, will you:” and then asked to select one of the following options: drive and pay the charge, drive at different times, use public transport/motorbike/bicycle, work or shop elsewhere, or I am not affected by these changes. The survey began on 14th October 2008. By the 10th December 2008, there were 14933 responses with 46.8% saying they would work or shop elsewhere (Figure 7). This online collaboration provided a unique picture of how well the proposal was going down across the north west of England as the map is updated every day (Click here to see the final map).

Figure 7. Overall percentages for the Manchester Congestion Survey.

3. Geodemographic Profiles of Respondents

While we only asked for respondents or their first part of their postcode, many entered their full postcode as can be seen in Table 1. We note that this in not a representative sample but it does provide an opportunity to further investigate who is responding to such surveys. To gain this understanding we use two geodemographic classification schemes. First, the Acorn classification from CACI which categorises neighbourhoods based on multidimensional socio-demographic attributes. The second being the e-Society geodemographic classification (Longley et al., 2008) which categorizes neighbourhoods based on their engagement with new information communication technologies.
For the analysis, index scores was calculated. An index score compares the over or under representation of a specific target variable against a base population (e.g. the national average). Where a score of 100 is the national average, 200 is double the national average and a score of 50 is 50% below the national average. From such analysis it is the middle and upper classes who are over-represented within the surveys as shown in Table 2, this potentially relates to demographics of the readers, listeners, and viewers Radio 4 and the BBC news. The over representation of E-business users in the E-society classification (Table 3) suggest many respondents are answering the questionnaire while at work. Furthermore the geodemographic profiles of responses to individual questions can also be explored as seen in Table 4. Across all demographic groups the biggest concern was fuel.
Table 1. Total Number of Respondents to Surveys and Number Who Entered Their Full Postcode.

Table 2. Index Scores of Respondents by Acorn Category Classification.

Table 3. Index Scores of Respondents by E-Society Group Classification.

Table 4. Percentage of Responses to the Credit Crunch Survey Broken Down by Acorn Category.

4. Discussion

This paper has demonstrated the potential of using GMap Creator and MapTube for near-real time spatial survey thus providing a resource to map the nations opinions to specific questions over space and time both statistically and geographically. The potential of this approach for gathering spatial information is enormous. For example, it could easily be used to gather other information such as fear of household burglary, the quality of primary school education and so on. We consider this in many senses this to be Web 2.0 and Neogeography in action.

However, the geodemographics of the respondents shows there is an inherit bias in who is answering the questions and there is the question to whether or not respondents are influenced by the maps before answering the questions. Further work is to explore how the maps evolve over time, as each response is time stamped and how this relates to news headlines. Additionally, we are currently exploring the geodemographic profiles of each survey in more detail. We have currently re-run the credit crunch with the BBC with slightly different options to the answer.

The question remains the same – “what single factor is hurting you most about the credit crunch?” But we decided to change the categories slightly:Mortgage or rent, Petrol, Food prices, Job security, Utility bills, or Not affected. This survey ran between 5th October 2008 and 3 February 2009 and has now closed. The final map can be viewed here. During this time we received 20,072 responses, which can be broken down as follows (Figure 8): Mortgage or Rent 11.05%, Petrol 4.7%, Food Prices 11.89%, Job Security 27.25%, Utility Bills 21.92%, and Not Affected 23.20%

The Return of the Credit Crunch on the BBC Site
Figure 8: Overall percentages for the Credit Crunch Survey

5. References

Gibin M, Singleton AD, Mateos P, and Longley PA. (2008) Exploratory cartographic visualisation of London using the Google Maps API Applied Spatial Analysis and Policy 1(2) pp85-97.

Hudson-Smith A, Crooks AT, Gibin M, Milton R, and Batty M (under review) Neogeography and Web 2.0: Concepts, Tools and Applications, Journal of Location Based Services.

Longley PA, Webber R, Li C, (2008) The UK geography of the e-society: a national classification Environment and Planning A 40(2) pp362-382.

Milton R (2008) GMap Creator, OpenLayers and OpenStreetMap CASA Blog. Available at .