Showing posts with label atlas. Show all posts
Showing posts with label atlas. Show all posts

Wednesday, 2 January 2019

QGIS Atlas by Field

This post explains how to use the Atlas function in QGIS to automate the production of maps from a single layer in order to produce a map output for each column in an attribute table. The Atlas tool is designed to allow users to iterate through the rows in an attribute table, but not through columns so if you want to produce a map for each variable in a single dataset (e.g. annual house prices for small areas) then you may find yourself at a dead end, as I did. Then I saw how Ed Hampson at Savills very elegantly solved the problem so I'm sharing it here. I know of some other workarounds but this solution is my clear favourite as it allows for the production of as many map outputs as you need in a very efficient manner. I've shared the project file in this online folder so you can download it and play around with it yourself. This was done in QGIS 3.4. This is written with the assumption that you already know QGIS and how to use the Atlas tool, so I won't cover that here.

This is the final project, which you can download

The basic principle of this approach is that for the Atlas coverage layer you use a lookup file, which in my case was a table with one row for each of the column headers I wanted to map in my dataset (as shown below). As you can see, the individual rows follow the pattern md_1995, md_1996 and so on. This is because the layer I want to create maps from has one column for each of these fields, from md_1995 to md_2016 - this is the median house price for each area from 1995 to 2016. If you're at all confused and want to see how it works, just download the project folder and take a look yourself by opening the QGIS project I have shared - all the screenshots here come from that.

This is the table I used

Now here's the bit I really like - when setting up the Atlas in Print Layout, the coverage layer here is the table shown above and the Atlas 'Page name' is the 'Field' column in the table above. The normal way would be to set the coverage layer to be some kind of geographic layer and then QGIS would iterate through it spatially, but this is a kind of non-spatial solution that allows us to map by column instead.

The 'Field' here is the Field column in the table shown above

The really important thing you need to do to make this all work is to map the data using eval (  @atlas_pagename )  as the Column to be mapped. Since we have set our Page name in the Atlas as 'Field', and since the data in the Field column in our Atlas coverage layer has the same names as the attributes we want to map (i.e. md_2004, md_2005, md_2006, etc.) when we iterate through the Atlas it will map a different variable each time. Just remember to use a data range in the symbology that allows you to show the highest and lowest value across your entire dataset, otherwise you might find you have some missing values on some maps. For example, if I had set the symbology data range here using the 1995 house price, then by 2016 loads of areas would be above the max value from 1995 and they wouldn't show up on the map.

This is the clever bit

What does 'eval' do, I hear you cry... Well, it's basically this, as described in the QGIS documentation:


  • 'eval' - Evaluates an expression which is passed in a string. Useful to expand dynamic parameters passed as context variables or fields.

Once you've got everything looking the way you want, you can then export the Atlas in the usual way and do all sorts of interesting things with the outputs, like creating a gif for example as I have shown below. I did a tutorial for creating these in an earlier blog post.

How much!!!! Not inflation-adjusted, obviously.

I've added some comments to the expressions in the QGIS project I've shared and these are also shown below to give you a better idea of what's going on here. I know it's a bit tricky to understand without actually seeing it.

This is just how I set the output file names 

This is just what I used to automate the year label

This is what I used to set the highest value each year

This is how I dynamically sized the bars in the chart

This just shows you all the different layers - only 4

You'll see above that this is a normal Atlas, set up in the normal way. The only difference is the way I've set up the coverage layer and how I have set the column to be mapped using the eval expression. Everything else works in the same way. I have also used the aggregate function to pull out the highest value for each year (in the top right of the layout) and I used it to set the height of the individual bars in the chart. I have shared all the individual map outputs from this in the folder, and they look like this.

Final map output for 2016

Okay, I think we're done here but if you get stuck feel free to get in touch. I'm easy to find online or on twitter.


Notes: if you try to load the zipped project folder QGIS may throw up a warning saying it can't find the 'field_transposed_for_atlas' layer but don't worry, it's there. You just need to Browse to the folder where it is located (i.e. the layers folder in the download). I should perhaps really thank Jochen Schwarze here because of his StackExchange tip to Ed on this. The map colours are ones I borrowed from a very nice looking FT map by Steve Bernard. Note that you can add comments inside QGIS expressions using /*comment goes here*/ and after an expression using --comment goes here. In the file names I think it says 'MSOA' but the areas used are actually LSOAs. The house price data is from HM Land Registry but very helpfully compiled as median values by LSOA by the excellent CDRC team. I added a few place names using OS open data. Easy to remember url for the folder is bit.ly/qgis-atlas-by-field


Friday, 20 July 2018

Map Layout Design in QGIS Atlas

This is a short follow-up post from the previous one, where I posted an update of my Green Belt Atlas. It's about my on-going quest to try to make clearer, better maps and in particular the choices that went into the final layout. I was quite happy with the style and layout but don't claim it's perfect by any means. Anyway, here goes. Scroll to the bottom of the page for some screenshots of what settings I used in QGIS to create this.

These captions explain things in more detail - click to enlarge

As you can see from the image above, basically everything I've done here has some kind of logic or reasoning behind it. 

The top white space is for the name of each local authority. This means there is a lot of white space when that place is York, as above, but I needed to ensure that when the Atlas shows somewhere with a longer name (e.g. Windsor & Maidenhead) it still fits in.

The font throughout is Raleway, still a favourite of mine, and also free. The only thing I'm not so keen on is the the numbers but I can live with it.

I also added some explanatory/contextual text at the bottom of each map, which pulls in data from the Atlas coverage layer in QGIS. I think this adds some valuable information to help readers interpret things more clearly. I tend not to use black at all these days, and instead go for #222222 (RGB 34, 34, 34) as it's less stark.

The inset map in the top right is also pretty small but works well I feel and for a locator I have just used an off-black dot, again to keep it simple. I do like the kind of faded, cloudy white background effect so that you see enough to give you an idea of what's there but your eyes are still drawn to the main feature.

The really important thing for me was to try to keep things simple but at the same time allowing the reader to get the maximum amount of information out of the underlying dataset. But since this was QGIS Atlas and automated mapping I also had to make sure that when QGIS iterates through each page of the Atlas (all 186 of them), it didn't cause any label or placement conflicts, and this is not always easy. 

If you're thinking about getting into using the QGIS Atlas tool, I've got a tutorial here (with all the data and project files you'll need to play around with it) but it also links to a simpler, previous example.

Anyway, that's all for now. Have a read of all the captions in the image to get more of a sense of my thinking on this little project.


This is the query you use to only show points in the Atlas feature


The is the NOT query used for the background mask layer


And this is the symbology used for the mask layer above

Wednesday, 13 June 2018

How many people live in the English green belt?

There was a blog post here about the total population living on land in England that is designated as green belt.

I decided to take it down because I wasn't as confident as I wanted to be about my original estimate and I don't want to spread misinformation. 

The problem is that it's impossible to know for sure with the data we have available, which is a shame. Perhaps in future we'll move to a position where we can easily answer these questions with better open data.

For now, I am just leaving this here as a note to anyone who might have seen the original post or tweet (also deleted).

Normal service shall resume soon.

15 June 2018

Update 26 October 2023: I think the figure is 1.2 million, as I explain in this post


Note
You can find some English green belt shapefiles on this page, though they seem to mostly be historic ones (e.g. 2007-08) unless you click 'Show more' in which case you'll get everything from 2007-08 to 2016-17.

Wednesday, 27 December 2017

How to make a geogif

Back in October I said I'd do a write up of the workflow for creating a geogif, so here it is (and now I've fixed some errors in the original post, see update at end). I've done quite a few of these over the past few years, including ones of the 2017 UK general election, house prices in England and Wales since 1996, commuting in Greater Manchester and US gun homicides. My favourite is one of the coastline of Skye, though that was just for fun. But sometimes a geogif can be quite useful at telling the story of data quickly, particularly online (I think the general election one does this quite well). Here's the end result of the workflow described below - a geogif of the population of US states in 2017. All of the content (maps, QGIS project files, gifs, shapefiles) can be downloaded here.

Click for full size - 1200ms per frame, 1 minute in total

I'm going to assume that if you are following this then you have at least some knowledge of QGIS, but if not then you can probably read my previous posts on the QGIS Atlas tool to help you. But this is definitely aimed at people with existing knowledge of QGIS.

I've packaged up the QGIS project (.qgs file) and the individual shapefile layers I used to create the gif above. You can download them here and then just open the project to see what's going on 'under the hood'. If you open this project (us_state_pop_2017_red_fixed.qgs), you'll see that I've used three layers, as follows:
  • One layer is just a light grey states background;
  • One layer is for the darker grey states that appear sequentially in the gif; and
  • One layer (a duplicate of the darker grey layer) is for the red highlighted states, to give it a more dynamic animated look.
For the dark grey layer I've used a rule to style it, which means that it will show the currently active QGIS atlas feature, plus all previous ones: $id  <= $atlasfeatureid. It was suggested to me on StackExchange by Ian Turton as a simple way of achieving this effect.

The red layer is similar, but the rule on this layer is $id  = $atlasfeatureid, which means that it basically highlights only the current atlas feature as the Atlas iterates through each feature (note that in the new, updated QGIS project files I have used the new Atlas syntax, which is explained below).

Where you set the layer style rules I describe above

When you go to the Print Composer in the project I've shared above, you will not actually see anything much until you activate the Atlas by clicking the Atlas button, as shown below.

Notice the Item Properties in the white box to the right

In the final version of the layout, once the Atlas has been activated, you can see from the Item Properties box on the right what I have used to add values from the layers the project is based on. Basically, I've added in fields and some text, as you can see from the images below.

This one adds a number and state name, plus a dot and a space

This takes the population, divides it by the 2017 US population

This gives the population in 'million' format, to 1 decimal

An important side note here is that I have found it necessary some times to re-order attribute tables in order to get the desired effect in terms of the Atlas running through things in the right order. If you need to do this, install the MMQGIS plugin and use Modify > Sort on a shapefile to achieve this. It works perfectly. Another note is that in later versions of QGIS the syntax for Atlas functions looks a bit different so make sure you are aware of it if you run into problems (e.g.  @atlas_featureid  instead of $atlasfeatureid, though both work for me in 2.18).

Once you have an Atlas project set up you are ready to export the frames. One thing here that is helpful is if you give the frames sensible, descriptive names. You can easily customise output file names in QGIS Atlas (another great feature of the tool). You can see how I've done this below, using the newer QGIS Atlas syntax. The "NAME" in the image below just takes the name of the current Atlas feature from the shapefile's attribute table and adds it to the file name. You can see the result in the folder where I put all the outputs (see screenshot below). Making sure the files have sequential names can save a lot of time later on because for an animation you need to be able to order the files in the order you want them to appear in the final gif.

This creates a file with a number, underscore and state name

These are the outputs from the QGIS Atlas project

Okay, so this is basically part one over with. You can create all kinds of things with the QGIS Atlas and of course you don't even need to use this but for a gif of the kind shown at the top of the page this is my typical workflow. See Lesson 21 and Lesson 22 of Steve Bernard's QGIS YouTube series for a different kind of animation approach.

The next step is to patch the images together into a gif. You can do this lots of different ways, but I tend to use GIMP, which is great - free and open source and despite the slightly worrying name you can normally find it online without running into too much trouble. In fact, you may be relieved to hear that it's the first result on Google. I currently have version 2.8 installed.

I'll assume you've installed GIMP and now want to create a gif like the one at the top of the page. Here are the steps.

File, then Open as Layers...

This first step just gets all the different layers loaded into GIMP. I've done this with a few hundred layers before and it worked fine but if you're getting into the high hundreds then another approach might be best as you could run out of memory.

If you've used QGIS to give the individual layers sequential names then the frames should all load into gimp in order and you'll see the last one first, and the individual layers listed on the right, as shown below.

This is what it will look like in GIMP

If you need to reverse the order of the layers in GIMP, you can do this easily by going to Layer > Stack > Reverse Layer Order. But I want my animation to start at number 1 so I'll keep it like it is.

You could just go ahead and export this as an animated gif, but if you don't optimise it then the file size is likely to be pretty big. Both versions I shared in the online folder are under 1MB (979KB and 530KB) so this step is really useful. Here's how you optimise it: Filters > Animation > Optimize (for GIF).

It won't reduce the quality but it will reduce the file size

Once you've done this, a new GIMP window will open up. The only difference here will be that you'll see the same thing as before but a dashed yellow and black box will appear on top of the images - nothing to worry about, that just tells you which part of the image actually changes from frame to frame. Now would be a good time to save your GIMP project via File > Save As... 

The next step is to Export the image to an animated gif. You do that via File > Export As... and then it's a case of selecting gif as the image format. If you're not used to this it can be a little mind-boggling but basically you just tick the As Animation box and choose your settings. Here you need to be aware of the delay settings in particular because that tells you how long each frame will appear for. As you can see below, I've chosen 1200 milliseconds for this gif because that makes it last one minute overall (50 frames for 1200ms). 

These are the settings used for the image at the top of the page.

In this gif, I used a delay of 1500 so each frame lasts 1.5 seconds

The other thing to think about is how big you actually want your gif to be. I did a version at 1500x1500 pixels but in general I'd recommend going much smaller than this. The two on this page are 1000x1000 and you can choose whatever dimensions you want when exporting from QGIS Atlas.

The tricky thing with this is trying not to cause some kind of cognitive melt-down on the part of the viewer, which is easily done and in a way is a bit of a risk with the US states population gif here. But of course it's not intended just to be watched once and this is just an example use-case to show you the workflow. But there is a serious point here in that a gif is definitely not the way to go a lot of the time, but I do think it's underused and definitely has a place.


Why would you want to do this in the first place?
That's a good question. Take a look at some of the examples I've linked to at the top of the page if you want to see a variety of different use cases. Some are better than others but all of them tell a story. Some stories are better told in other ways of course. Topi Tjukanov has loads of great examples - with more appropriate data - on this Medium post. If you ask me, a geogif can be useful in the following cases:

  • When you want to show movements of things, such as commuters, freight or marine traffic in the Baltic Sea.
  • When you want to show things in sequence, alongside some basic data.
  • When you want to highlight that there are 'a lot' of something, rather than focus on the individual data elements.
  • When you want to quickly compare shapes, as I did previously when looking at gerrymandering in the US. 
  • When you want to show the geographic spread of something over time, such as house price changes.
  • When you want to avoid the work you should be doing and instead feel the irresistible need to create something map-like that moves.
In many cases a geogif will only be an entry point to the data and will not allow users to delve more deeply but in many cases it can be a good way to highlight the big picture, which is still useful thing to do. You can judge for yourself what works, what doesn't and what is and isn't useful. Ultimately, geogiffery can be useful, but it can also just dazzle and confuse, so be careful.


Notes, etc.
Little-known Windows gif fact... If you left-click and hold the mouse button on the [X] at the top right of the Window when an animated gif is in progress, it will pause the gif. Move the pointer off the [X] and unclick to continue. I know of no other way to do this. Sometimes you can pause gifs on twitter, at least on mobile devices.

The shapefiles I use here are from the US Census Bureau Geography pages. The 2017 state population data used in the geogif here is also from the US Census Bureau.

Washington, D.C. is not a state so I didn't include it above but it had an estimated population of 693,972 on 1 July 2017.

I added the QGIS logo to the gif just to highlight the fact that this was done in QGIS.

Alaska and Hawaii are of course not to scale.

"Hey, I don't like red. Can you do a blue version?"

Yes, you can have a blue version

Update: this post was update on 29 December 2017 because the original gifs I posted here contained some errors (order of frames - e.g. Florida and New York were in the wrong order, though the data was correct). I have also updated the Google Drive files and they now contain five different versions of the blue and red gif each, at different speeds (from 1 second per frame up to 2 seconds per frame).

I have also uploaded two QGIS projects in zipped folders - one each for the red gif and blue gif. All the frames are there too, at 1000x1000 pixels.

In the text above I have explained how I re-sorted the state populations shapefile to make sure the Atlas iterates in the right order. You don't have to do this (e.g. I think @atlas_@atlas_featurenumber can be used) but I found it easier just to re-order the shapefile, particularly as I was working with copies of the same layer.


Saturday, 11 November 2017

Land Cover Atlas - Notes, FAQs and Data

The last post had some background information on my Land Cover Atlas of the UK. In this post I'll say a bit more about it, answer some of the questions I received, and share some of the data from the project. As I said in my previous post, this was really about me trying to understand the data better and seeing if I could produce a localised atlas of land cover for the whole UK in a way that was accessible and comparable between areas.

Corine Land Cover data for Liverpool and Manchester area

As above, but for Northern Ireland and a bit of Scotland

Notes
If you really want to know more about what I did, and the results of my analysis, I strongly recommend you see my more detailed Land Cover Atlas of the UK, including the Appendices. The piece on the BBC was a simplified version of this work, because it had to be. You just can't have giant, detailed maps on the BBC website in the same way you can on Figshare, where the full set of maps are hosted. That's why, after some discussion, we created a simplified four-class Corine map set, with one set of maps optimised for desktop (640 pixels wide) and another set optimised for mobiles (350 pixels wide). My heart did sink when I found out I'd have to do this but then again it was a good way to learn a few more tricks and the BBC graphics and data team are brilliant to work with.

On the underlying classification itself, I decided to use Corine because I had always wanted to understand it better, but it's also open data and comparable across Europe, and over time - it goes back to 1990. This means that, in theory, you could repeat this kind of analysis for the whole of Europe over 20+ years. But don't hold your breath; I'm done with Corine for now. As I note in the Atlas, the categories themselves do require a little bit more investigation if you really want to make sense of things, as you can see in the extract below.

An extract from my Atlas

On the four-fold simplified classification used on the BBC website, there was quite a bit of debate about this. We moved from using 'Artificial' (as Corine uses) to 'Built on' after some testing at the BBC suggested there was confusion about what 'artificial' actually meant. For 'natural', I think Mark Easton's blog piece did a good job of explaining that this must be interpreted with care. 

'Natural' must be interpreted with care

Ultimately, I thought that producing a localised land cover Atlas would be a good way of showing that when it comes to national averages, they don't always make sense locally. That is, the UK might be mostly farmland and semi-natural, but doesn't mean much if you are surrounded by a concrete jungle and are always stuck in traffic jams. Having said that, I did discover that Midlothian was the local authority which most closely matched the overall UK land cover figures, almost exactly. Thus, 'the Midlothian question' is born.

The UK in miniature?

Just beside Edinburgh, in case your geography is rusty

FAQs
Doing something like this, if it will only be seen by a few interested boffins, is normally fine. But when it is on the BBC website millions of people might see it (and this was the case). That means you get a wide range of responses, from the 'oh cool, maps!' to the 'this is EU propaganda gone mad, the UK is basically a car park and I don't care what the numbers say'. But that's okay because most people are in the middle ground, though much closer to the first and, anyway, people are perfectly entitled to their opinions. What I thought I'd add here are some answers to common questions that were either asked directly or posted elsewhere online.


Why did you do this?
I wanted to know more about land cover across the UK. This was motivated by my desire to understand the country better in terms of land cover but also to see how much of it was actually artificial or 'concreted over' as some put it. The answer was about what I expected it to be but there is great variation locally and that's partly what I hoped to find - and to put some more precise figures on it. 

You really want to concrete over the whole of our beautiful countryside, don't you?
No.

But you're a secret housebuilding cheerleader, right?
I do think we need to built more houses, and we do have space to build them if we want to, but the housing question was not part of this project. If it was, I would have tried somehow to look at 'developable' land or something like that. A key question in this is that for housebuilding there needs to be enough infrastructure and it needs to be in the right place. This kind of analysis could potentially help with that, but it wasn't my goal here.

Was this funded by the EU?
The data I used are created through an EU programme but neither the BBC nor I received any funding for this. I started this in my spare time (evenings and weekends) and although I used the Corine data provided by the EU (it's free and open data) this project definitely wasn't funded by the EU.

How much did the BBC pay you?
Nothing. We decided to use what I'd already done and then create a bespoke map and data set for their news website but I'd done the vast majority of the work already - Mark Easton and colleagues just thought it would be interesting and I see this as a useful kind of public engagement activity that adds to knowledge. If it gets more people interested in land and maps, then great.

What do I think it tells us?
Lots of things, but three come to mind - 1. there is more space in the UK than some of us might imagine. 2. We can find space for more housing if we want to. 3. We should probably get out and about more and enjoy the space that's out there. On 1, this is a question of where we live (i.e. 83% in urban areas) vs lots of land that can't really be lived on (e.g. the 9.5% or so that is peat bog) but I wasn't thinking it being about space for any one particular use. On 2, I didn't begin with a housing question but inevitably it comes up and when you look at it objectively you can easily find space, if you are willing. On 3, that's mainly just a message to myself but it also serves as a useful reminder that the UK is full of amazing landscapes. Maybe, just maybe, it also tells us that the way the population is distributed is something that needs to be looked at.

But England has the highest population density in Europe so this data is meaningless, isn't it?
Overall, in global terms, the UK is quite densely populated and within Europe the UK is now said to be the most densely populated. This data does not challenge that. It is about land cover, not people cover. The goal here is to show land cover, and it does show that some areas are very built up in percentage terms. Some areas may feel very crowded, but this is not just down to population numbers - it's also got to do with infrastructure, services and housing. And density is best thought of locally in my view, not at the national level. A simple national arithmetic average where you divide population by land area isn't very helpful. But I'm working on a more nuanced, meaningful metric for this that is based on a local density measure based on 1km squares. London is the most densely populated area in the UK - with an average of about 5,500 per sq km - and a high of about 25,000 - but it is much less dense than Manhattan or central Paris, for example.

If I complain that the country is full, am I wrong?
No. Yes. Maybe. Take your pick. The answer to this question depends upon people's perceptions, experience, and sometimes biases. I prefer to think about this question in relation to infrastructure, services, housing and international comparisons. But if you were born in 1930, when the population of the UK was around 20 million lower than it is now, I can understand the point of view that the country is 'full', though I don't agree with it. However, my aim was to look at land cover, not population. It's inevitable that the population question comes up but I think some data on land cover is helpful in helping people understand the UK better.

What does it all mean?
It means that someone looked at the EU's Corine data, turned it into localised maps for the UK's 391 local authorities and collaborated with the BBC to produce a simplified set of maps for the same areas. It is an attempt to take raw data and turn it into more meaningful information. The 'knowledge' bit will largely come from what people think to begin with or, in some cases, perhaps change people's perspectives. But for me it's about understanding how local areas compare to the national picture.

Can I have the data?
Yes, see below.


Data
Last of all, if you're looking for the underlying data, I've made it available in an open Google Drive folder. Here's what it looks like if you open it up in QGIS - and there are a few more screenshots in the folder. I have also put a 'Shapefiles etc' folder in there, which contains a QGIS project file you can open and see it styled as below (there's a qml style sheet in there too). If you're an ArcGIS user, you can use the layer file included in the same folder. There is also a UK local authorities file that I made, which should come in handy in providing a bit of context.

Take a look yourself if you're a GIS user

The other thing I've added to the folder is a spreadsheet with a summary of how much of each local authority is 'built on', etc. This just provides an opportunity to see the all map data in a single place. If you want to know how the land cover categories in this table translate to the original Corine classes, well it's relatively simple. Although Corine has a 44 class nomenclature, at the most basic level it covers 5 classes - 'Artificial surfaces', 'Agricultural areas', 'Forest and semi-natural areas', 'Wetlands' and 'Water bodies'. In the simplified classification, 'Artificial' became (1) 'Built on', but without 1.4.1 and 1.4.2 ('green urban areas' and 'sport and leisure facilities'), which became their own class of (2) 'Green urban'. 'Agricultural' became (3) 'Farmland', and the rest were put into (4) 'Natural', though of course some of it is certainly not 'natural'. 

A single file with all the data from the BBC maps


Final words
I hope some of this is useful and that it makes people think. But really, of course, I'd rather you look at my more detailed Atlas because that's where all this started. I'll end with a small sample of comments from Mark Easton's blog because I think they are a reasonable representation of the kinds of reactions there have been, and they also highlight the fact that land, population and statistics can sometimes be an intoxicating combination. 

Beware positive internet comments

Nick Faldo, is that you?

There were lots of these

The lowest rated comments - a mixed bag overall

A good few people worried about how this data will be used

Right, enough on land cover for now.

Wednesday, 8 November 2017

A Land Cover Atlas of the UK

This blog post provides a bit more detail and background information about my new publication A Land Cover Atlas of the United Kingdom. It's basically a 23 page pdf accompanied by a set of 392 maps of land cover - one for each local authority in the UK, plus an overview map of the whole UK. The publication date kept getting pushed back because I was also working with the BBC on the topic and we wanted to ensure things went online at the same time. I have once again chosen Figshare to host this as it's an excellent platform for dissemination of this type of data. The Atlas uses Corine Land Cover 2012 data and was the result of a spare time summer project that I recently finished. See below for an example of one of the local authority maps, from Tonbridge and Malling in Kent, in the South East of England.

Tonbridge and Malling - a fairly fruity landscape

There are plenty of other land cover maps, and this is not new data, but I wanted to show what it looks like at the local level in a set of static maps and I hadn't seen it presented like that before; so it's kind of a new take on existing data. I did this partly because I wanted to be able to understand how areas differ but also because I wanted a better idea of the diversity of land cover at the local level across the UK in a way that was easy to digest. That's what I've attempted here. I'll leave it to the reader to decide if it works, but I quite like the results as it give me a better understanding of land cover nationwide.

The rest of this post just provides a little bit more background detail to the Atlas project itself and some of the decisions I made in producing it, including a few pictures.

First of all, I wanted this to cover the whole UK. I thought it would be interesting to be able compare all 391 local authorities in terms of their land cover. It's always a bit annoying when you see some great data but your part of the country isn't included! The Corine classification has a total of 44 land use classes but since it covers the whole of Europe there are some categories that don't appear in the UK - such as Glaciers. This leaves a total of 39, though some of these 'land cover' categories are actually water. 

Anyway, each map legend lists all possible land cover categories so that you can easily compare places and the proportion of different land types in them. I thought it was also important to be able to identify what land cover types areas don't have, that's why you'll see a legend entry for a category even if it doesn't appear on the map.

I also wanted the project to be based on open data and open source software, so I used Corine (open), Ordnance Survey data (open), Source Sans Pro font (open) and QGIS (free, open source). See the images below for a bit more on this kind of thing.

Not that it really matters, but I do like an open font

This map extract is from the Angus council area in Scotland

This was a spare time project that got out of hand

The full resolution maps are quite big - see permanent link 

I also wanted to show what land cover areas do not contain



Values <1% are shown in light font

Scale is always shown, but areas differ hugely in size

Some slight boundary line mismatches - later maps will have a fix


This all started with me wanting to investigate what percent of the UK is 'urban' and how much is 'golf course' using the new OS greenspace data. I got to the bottom of the latter but in relation to the former it really does depend upon how you measure it. I don't believe there is a definitive answer but if I was pressed, I'd always say less than 10%. Corine data suggests it is about 6%. 

Take a look at the Atlas document itself if you're interested - and then check out the map for your area. You can also see more about this in a related BBC story, for which I produced a set of simplified Corine maps that are much easier to digest because they only show four categories.

In the BBC piece, I also decided to show building footprints, as a way to add a little more detail and legibility to the maps. This meant I had to create a set of files with all UK buildings in it. For Great Britain this was pretty time consuming, but straightforward. For Northern Ireland I had to create it using open data. But the end result was quite satisfying and after a bit of to-and-fro with Tom Armitage from Digimap to confirm my figures I was ready to go. As it happens, the total area of the UK covered by buildings amounts to about 1.3%. In Great Britain overall it's about 1.4%, which is much higher than, say, the land covered by golf courses: 0.54%. I have also calculated these figures at local authority level, but that's one for another day.

Mind you, if you are stuck for something to say during a lull in conversation, you might want to interject with "I say, did you know that Islington is 30% building, and that Birmingham and Manchester are both 15% building?".

Notes: I have done my best to map this as accurately and clearly as possible. If you do spot any mistakes, please feel free to get in touch. Like I said above, there are other methods for mapping land cover and there are other data sources so don't take this as the definitive account. Having said this, I think it provides a good overview of land cover in the UK at a local level. There are some further notes on these kinds of things in my Atlas document, on page 3. The Appendices also contain data tables on land cover for each part of the UK.