{"id":21,"date":"2014-06-16T13:54:09","date_gmt":"2014-06-16T12:54:09","guid":{"rendered":"http:\/\/blog.datashine.org.uk\/?p=21"},"modified":"2014-06-17T14:18:57","modified_gmt":"2014-06-17T13:18:57","slug":"datashine-maps","status":"publish","type":"post","link":"https:\/\/blog.datashine.org.uk\/2014\/06\/datashine-maps\/","title":{"rendered":"DataShine Maps"},"content":{"rendered":"

DataShine is a toolkit for creating web maps for showing geographical data that has been collated and analysed by the BODMAS project, based at UCL’s Centre for Advanced Spatial Analysis, such as the 2011 Census data included in DataShine: Census that we have released today.<\/p>\n

The DataShine System<\/h2>\n

There are two main components to DataShine – the map tiling system and the map-based website that you see in a browser.<\/p>\n

1. Map Tiling System<\/div>\n

The map tiling system is a number of Python scripts, which generate maps of geospatial data stored in a PostgreSQL<\/a>\/PostGIS<\/a> database, using Mapnik<\/a>. The maps are generated either as square PNG images of simple but colourful choropleths, often known as “tiles”, for display on the website, or as A4 downloadable PDFs with keys and other adornments (example below), suitable for printing. These are done ‘on-the-fly’ by invoking the Python scripts via the web server. <\/p>\n

The map tiling system was also used to create the “context” maps. The data used here is mainly Ordnance Survey Open Data<\/a> – using Vector Map District<\/a> for the most detailed zoom levels and Meridian<\/a> for smaller scales. Mapnik’s new compositing effects are used to show the buildings as transparent, “knocked out” areas of the map. When the choropleth layer is placed behind the context maps, the colours “shine through” the buildings – hence the name DataShine. <\/p>\n

This is a style of mapping that has advantages and drawbacks. The key advantage is that, by only showing the data in areas where there are buildings, we don’t allow areas of low population (parks and the countryside) to dominate the map, but instead areas of high population draw the eye. The chief drawback is that the dataset used includes all buildings, such as industrial units, farm sheds, stadiums and shops, where people don’t live – but that we are typically showing residential information. The other major issue is that the inclusion of individual building blocks can imply a false level of detail – in other words, it can look like the colour\/value shown on a house is relating to that particular house, rather than being an average for the local area.<\/p>\n

We are also creating vector data, to show the underlying numbers and metadata (e.g. area name) for the map. This is also carried out in Mapnik, using a format called UTF Grid<\/a> which creates “tiles” of value fields that are then picked up by the browser and show as you move the cursor around the map.<\/p>\n

2. DataShine Website<\/div>\n

\"Screen<\/a><\/p>\n

The website is Javascript based, its focal feature a “slippy map” that covers the whole site, with user interface elements placed on top. <\/p>\n

The core libraries used are OpenLayers<\/a>, a powerful and flexible mapping library, and JQuery<\/a>, a rich framework for enhancing Javascript. JQuery UI<\/a> provides the styling and functionality for some of the visual “widgets”.<\/p>\n

Building with DataShine<\/div>\n

We are aiming to have the following features in our DataShine-based maps, where-ever possible and appropriate:<\/p>\n