Tuesday, 21 February 2017

The UK's Best Place to Live

Where is the best place to live in the UK? The answer is simple. It's in my street. But that's just my view. Ask someone else and you'll get a different answer. Of course, this kind of thing doesn't really work when you do it from the perspective of individuals, and definitely not when you're trying to do it for the whole country, as I recently did for Outline Productions in their Channel 4 documentary, presented by Sarah Beeny. This blog post gives a little bit of the back story to it, discusses how mortified I am to be on the telly and a bit about the numbers. But how do we decide which is the best place to live in the UK? The real answer is that it depends upon who you ask and how you measure it.

I did the number crunching for this show

The background to this project is that I was contacted by Rachel Eadie of Outline Productions to see whether I could help them develop a 'best places' index based on a number of different criteria, such as income, house prices, wellbeing and so on. This was late in 2016 and I was a bit pushed for time, but it sounded interesting and I know the data pretty well so I said yes. After a few days of work and tweaking things I arrived at a final result. I received an initial 'wish list' of things to include from Outline Productions and I stuck to that where I could. The only criteria that I added was that I wanted this to cover the whole UK at local authority level - 391 in all - so that it could make some kind of sense across the entire UK. Too often these things only cover one or two parts of the UK. I included data on income, housing affordability, life satisfaction, happiness, jobs, unemployment, health, child poverty, and people aged between 20 and 29. 

The last bit highlights an important fact. We wanted this to be about the 'best place' to live for people in that age category. In this sense, think of it as a 'best place you might actually be able to move to and afford to rent or buy in' index. I say this because many existing 'best place to live' indices end up being topped by areas with an average house price of £500,000, and that's no use for most people. Also, given the propensity of people in our target age group to locate in larger cities, I also computed a 'proximity index' in relation to how close each local authority is to 13 major cities in the UK. Some places, such as Orkney, do really well on quality of life or 'best place' indices but their relatively low number of jobs and distance from major population centres means moving there is not a viable proposition many will consider - even if they are great places to live.

The Ring of Brodgar in Orkney (a great place to live) - source

What it was like to film this
I never thought doing television would be easy but by doing this little bit of work for a television production has made me realise a) how much goes into a single hour of television - so much work! and b) how bad I am at speaking, walking, thinking and communicating on camera. Seriously, I am not the most articulate person but I'm not completely terrible either. At least I didn't think I was. What I found is that having a camera on me made me robotic, incoherent and a lot more nervous than I expected. Things I know off by heart about data and places suddenly became impossible to recall when the camera was rolling. I also kind of forgot how to walk properly when being filmed, but I trust that the expert skill of the producer (Laura Mansfield of Outline Productions) means that I didn't end up totally ruining their programme. More seriously, it was an interesting experience and one that I think is useful. We filmed my bits in one day in Sheffield in December 2016, in ICOSS and across the way, outside The Diamond. I saw the final edit of the programme in January and despite not liking the look or sound of myself I thought the programme was well done. They sneakily got some good stuff in there about jobs-housing balance and the fact that indices are inherently subjective.

The numbers
I'm posting this just after the initial broadcast has finished in the UK (8pm, Tuesday 21 February 2017) so I can say a bit more about the final results now. It had been under embargo until that time. Remember that the areas I ranked relate to local authorities (e.g. London Boroughs, urban local authorities such as Leeds, Bristol and Newcastle, Glasgow, Cardiff, Belfast and so on). Individual places within local authorities, or places that go beyond the boundaries of individual local authorities are not part of the story here. It's based on the current 391 local authorities of the UK. South Ribble came top as our 'best place to live'. You may not have heard of it! But it's just to the south of Preston and includes within its borders places like Penwortham, Leyland and Bamber Bridge. 

Location of South Ribble - the UK's 'best place to live'

To add a bit of socio-economic data to this picture, you can look at the one of the maps from my Indices of Deprivation atlas (all other local authorities in England are here). In the map below, blue areas are among the least deprived in England, and the red and orange areas amongst the most deprived. You can see that for South Ribble most areas are in the least deprived deciles.

Deprivation map of South Ribble, from blue (least deprived) to red (most deprived)

Bear in mind that this all depends upon how you measure things - which of course also applies to just about anything in socio-economic studies. But, having said that, my follow up discussions with people who actually live there gave some more weight to the findings and there does seem to be a real dynamism in the area, possibly also because it is included in the new City Deal in Lancashire. I always try to 'sense check' the results of any data analysis against personal experiences of people who know areas, just to get an idea of whether the data seem to be telling the truth, as it were. For more on what's happening in South Ribble, see this piece in the Lancashire Evening Post. Remember also that part of the reason South Ribble came out top is because of what's nearby - and this is important to people when it comes to transport and jobs.

Next on the list was Warrington, located in between the urban local authorities of Liverpool and Manchester in the North West of England. This is a very good example of how transport connections, proximity to major urban labour markets and relatively affordable house prices combine to make it the kind of place that people could realistically move to and live in at the life stage which was the focus of the programme. Again, from personal experience I know that many people choose to live there for the reasons outlined above, so I wasn't very surprised by it. 

Motorways, railways, cities nearby - it's Warrington 

The North West of England dominated the top ten, but Blaby snuck in to the top 3. Blaby is another one of those places that is not on people's mental maps because it's the name of a local authority area rather than a well known town or city. However, it's a suburban local authority to the South West of Leicester in the East Midlands, as you can see below. You can see that, like South Ribble and Warrington, it is also very well connected in relation to transport (e.g. the M1) but this area also abuts a major English city - Leicester. This was a feature of several local authorities that came towards the top of the rankings. Other places like it include Rugby (at number 7) as you can see below.

Blaby - you might not have heard of it, but it's at number 2

Here's a basic map of the rest of the top 10 - just to give you an idea of the distribution of places. As you can see, 7 out of the 10 are in the North West of England - this is driven partly by relative affordability but also by things like happiness and wellbeing, and connectivity. Below this, you'll see a list of the top 25 places on the index.

The UK's 'best places' - top ten

An interesting mix of places in the top 25

Anyway, that's a little bit more information than is in the TV show itself so hopefully some people will find this informative. The precise position of places on the list does, as I explained before, depend upon how you choose to weight and measure individual indicators but this is how things came out. If we repeat it - e.g. in Best Places 2020 - we might find that different places come out top. The fact is that anywhere in the UK could be someone's own 'best place to live' with the exception, I suppose, of prison! Our programme gives the 'best place' notion a slightly different take on things. 

Notes: in the bits when I discuss the data, there are a few times when I've described it in ways that may seem unconventional - or even wrong. One such example is in relation to disposable income when in fact what I'm really discussing is discretionary income. I wanted to try to be informative without being too technical but at times I may have gone a little too far and simplified things more than was necessary. Having said that, I realise that the kind of people I hang around with might know these terms but the average TV viewer probably doesn't know or care. I mention it here in case anyone spotted this or any of the other things that seem a bit odd. After all, this is part statistical exercise and part entertainment. And why am I getting involved in this stuff anyway? Well, I like to do interesting work beyond the confines of the academic world and this seemed like an interesting opportunity to offer a different take on 'best places'.

Sunday, 12 February 2017

English Green Belt Atlas, Version 3

In 2015, after being posed the question by geodata guru Bob Barr, I decided to attempt to calculate the percentage of land in each local authority in England that was designated as green belt, using the official data from DCLG. This resulted in version 1 and 2 of my green belt atlas - a spare time project that I hoped people might find useful and informative. According to my calculations, 186 of the 326 local authorities in England contain at least some green belt land (that's 57%) but the amount within each area varies a lot, as you can see in my spreadsheet. For example, Sevenoaks, Epping Forest and Tandridge (below) all have more than 90% of their area as green belt, in contrast to (e.g.) 47% in Wirral and just over 5% in Bristol. I'd also be interested in the correlation between this data and house prices, or house price growth, if anyone is up for it (looking at you, Tom Forth).

This is my estimated figure, but I think it's pretty accurate

I've used the latest green belt data (2014-15) for this version

Surrounded by green belt but not much within the boundaries

I was prompted to go back to this after the release of the Housing White Paper last week and my last post on buildings in the green belt. Should we build all over the green belt? Definitely not. Should we consider building on little bits of it? Maybe. But before any of that I think it's useful to understand where and what it is, which is what prompted me to look at all this in the first place. I've uploaded all the individual map files to a separate Google Drive folder but if you're too busy to click, here are a few more.

The 'overboundedness' of Leeds' urban fabric is evident here

I find the North Warwickshire green belt split interesting

Manchester's green belt area is also interesting - airport in it?

My calculations suggest St Albans is more than 80% green belt

Hounslow - about a fifth of this is green belt

This surrounds Cambridge pretty neatly

Click to see all 186 maps

If you look at the folder with all the maps in it you should see that the figures all seem pretty accurate based on a visual comparison but there are a couple where I'm not 100% sure the figures seem right, but it might just be me. Either way, feel free to get back to me if you spot something that doesn't seem right.

This figure looks a little high, but it might just be my eyes

A London Borough with more than 50% of land designated as green belt

Sheffield is 25% green belt (not to mention part of the Peak District National Park)

York's green belt: note the little non-green belt part to the SE

That's all for now. Like I said, this was motivated by a personal interest in the topic and my desire to share useful information on an important issue. If  you want to use any of the maps, feel free. Or, if you want to get in touch if you've spotted an error then please do. If you're looking for an interactive web map of the green belt, then you have a choice: the Telegraph version, my CARTO version, or my Google search and zoom version.

The easy-to-remember link for the full set of images is http://bit.ly/greenbeltatlas3

Methods: this was another QGIS Atlas project, and more details of the method can be found in the footnotes of the original post. The only difference this time is a slightly different style, I've added in the local authority names and boundaries, plus some place names. But you'll notice if you look through the images that the number of labels differs by area - I could fix that but it would take too long for a spare time project like this. However, I think it does help with orientation. This version was done in QGIS 2.14. The files are all 300dpi PNGs and you are free to use them as you wish. 

Wednesday, 8 February 2017

Buildings in the Green Belt

The publication of the Housing White Paper yesterday prompted me to complete something that had been on the back burner for a while - mapping the buildings on England's green belt (or green belts, if you prefer). Before going any further, this isn't a post advocating building on the green belt but rather I wanted to explore the extent of buildings that are already there, in the hope that it might help enlighten me and others. I've previously written about green belt data and tried to figure out how much of each local authority is green belt, so this continues my interest in this area. First of all, here's a little map of buildings on the green belt around Bristol. If you want to download the 'buildings in the green belt' shapefile, scroll to the bottom of this post.

The Bristol and Bath green belt - perhaps not as empty as you might think

If we zoom in a little more you can see a little bit more of the detail of the pattern of development in the green belt. I'm not sure how much people know about the level of building in the green belt, but I did note that the Housing White Paper quite rightly pointed out that 'parts of it are not the green fields we often picture' (p. 28). The zoomed in area below is near Bath.

Part of the green belt around Bath

The point here is not to say that there is a particularly high level of development on the existing green belt, or lots of buildings in absolute terms, but rather to show that there are places within the green belt which are perhaps already more built up than some accounts in the media might suggest.  Many news stories on 'green belt' also often have pictures of lovely green countryside that is not actually green belt. Housing experts and planners are already aware of this, of course, and much of the development can be traced back to before the green belts existed, so this is in part an educational and visual exercise in mapping it all. The next few images cover some other urban areas across the country, starting with Oxford.

Buildings in the Oxford green belt

Buildings in the Cambridge green belt

Buildings in the Metropolitan green belt

Guildford (bottom) and Woking (top) area green belt

Buildings in the North East green belt

Buildings in the York green belt

In the final buildings in the green belt' map below I have just shown buildings without the green coloured green belt backdrop. This also gives you an idea of the level of building in the green belt, although it isn't very high.

Bear in mind that there still aren't that many green belt buildings

Finally, in order to put things in a bit more perspective, I've done a zoomed in map of the Gloucester green belt area showing those buildings which sit on green belt and those that don't. I have chosen this because I think it helps emphasise how successful the green belt has been in some places in relation to achieving the aim of controlling urban growth.

Gloucester green belt and non-green belt buildings

Data notes: I downloaded the most recent green belt shapefile from the DCLG and then got the building polygon data from the Ordnance Survey open data web pages - the OS OpenMap Local product. There is green belt in 14 different two letter OS tiles so I just extracted building data where it intersected the green belt. I then merged this into a single file. If you're looking for building data for your area, you might find some on my buildings page, where I have joined data for major urban areas and also added the local authority each building sits within. If you just need to know which tile to download, check out my tile finder below. Want to play around with and map this data yourself? I've made a 'buildings in the green belt' shapefile available for anyone to use. There are undoubtedly some small errors in the dataset, but I've used the DCLG file in good faith here. Note that in some places you'll see a large built up cluster in areas of green belt - as in the case of the West Midlands map and Kenilworth above.

Use my interactive map to find out which data tile you need

Saturday, 28 January 2017

Why Numbers Matter - new videos

To kick off my blogging for 2017 I thought I'd share some content that has been produced by the Sheffield Methods Institute, where I work half of the time these days. First of all, we have about 15 videos from our 'Making Sense of Data in the Media' MOOC, then we have a series of bite-sized software screencasts (RStudio, Excel, QGIS), and we now have also begun a series of short animations as part of our 'Why Numbers Matter' project. That's what I want to show you here. First of all, here's the first in the series, and it's about a very famous newspaper misprint involving 30,000 pigs.

The idea behind this series is to show that getting our numbers right is very important. However, for the first one, we decided to use a less serious example, in part because we thoguht it would make a good animation - and I wanted to see 30,000 pigs floating down a river. The videos are beautifully produced in my opinion - that's what happens when you hire a pro - though I have to say the voiceover guy needs some more coaching (me). Here's the original newspaper story and then the correction.

The bigger picture here is that I'm the Director of the Sheffield Q-Step Centre, which is part of a UK-wide initiative to help improve the quantitative skills of social science students, and I wanted to produce some content that would provide a more friendly intro to stats and quants. We have four more videos ready to go and will be releasing these on a weekly basis at first. We have one on averages, another on multi-level modelling, another on how maps can lie and one more on why chocolate doesn't make you fat...

However, we also recognise that numbers aren't always important. Sometimes, even though we know the numbers and the facts, we do seemingly irrational things anyway. So look out for a couple of 'Why Numbers Don't Matter' videos as well in the future.

We'd love it if people share this content widely and use it in their teaching - that's exactly what it's for. 

Wednesday, 28 December 2016

Interactive Terrain Mapping in QGIS

During last year's winter break I did a little animation of Arctic sea ice, which eventually ended up being shown in slightly modified format in Svalbard Museum - and they even sent me a nice hat for my efforts. This year's spare time project was to look a bit more at terrain mapping in QGIS, with a purpose. Since I'm a Highlander in exile I dream of the hills quite a lot, and the mountains in particular. If you follow mountain weather reports for the Highlands, you'll hear of fairly regular avalanches. They may not have the ferocity of avalanches elsewhere in the world, but they can be deadly. The Scottish Avalanche Information Service do a great job of recording, documenting, mapping and educating here so I thought I'd add this data to some 3D interactives using Minoru Akagi's Qgis2threejs QGIS plugin and Ordnance Survey Open Data. If that sounds like gobbledygook to you, never mind - just look at the little animation below to see one of the outputs. The red dots are the locations of recorded avalanches since 1991. You can also play around with it in your web browser - it's quite good fun.

Avalanche data is from the Scottish Avalanche Information Service

I extracted the avalanche data from the SAIS webmap and just plotted the locations in QGIS. I decided to focus on an area I know relatively well - the Cairngorm mountain area. It's not high by world standards, at 1,245m/4,085 feet (6th highest in the UK), but at 57 degrees north and nothing much protecting it from the fierce winter weather, conditions up there can be extreme. In fact, I remember growing up sitting many times on the old chairlift as it swung in the wind! Not for the faint hearted. Anyway, as is the way with these things, the area I wanted to look at was split between map tiles, as you can see below in this QGIS screenshot.

I think there must be a name for the law of split map tiles

Methods-wise, I just patched together a few map tiles, clipped out the area I wanted to focus on, overlaid the avalanche location data, generated a hillshade with an azimuth of 180 and elevation of 27 (to simulate shadows at noon on 26 December), and then added some Ordnance Survey map tile data on top of it. I also did a version with Google satellite imagery, just to see what kind of result I could get. I've posted a little gif of the satellite version below, followed by more of the images. You can also play around with a smaller version of this in your web browser. It should also work on phones, but you might have to use three fingers to pan around.

This uses Google satellite imagery - interactive here

What you'll see below in the next five images are just screenshots from the final interactive from my web browser. You should see them in larger size if you click on them. I've modified some of the settings slightly but basically it's quite an easy thing to do in QGIS with the Qgis2threejs plugin. The updated document on this (18 Oct 2016) is also available in a single, handy pdf. If you want to use this tool, you'll find lots of useful tips in here.

Full view of the final interactive - looking north

Focused on Loch Avon (pronounced Loch A'an

This shows the main areas of avalanche activity in one view 

This is a view with the Lairig Ghru pass in the foreground

Another more vertical view of the southern part of the area

I like the effect here with the hillshade layer providing some sense of depth and shadow. There is no vertical exaggeration here and in the interactive version you can zoom in quite far before it becomes pixellated. I also wanted to see what kind of quality I could get by adding in a Google satellite layer and then exporting that. For this, I used the OpenLayers plugin in QGIS (though QuickMapServices is also really good for this). The final version was pretty big as I exported at a high resolution, but here are some snapshots.

The full view of the satellite version - click to enlarge

Loch Etchachan - watch this video!

A different view, showing a cluster of recorded avalanches

The resolution here is actually quite good

This is a view from 'over the back' of the ski area

One final overview image, just for completeness

As I said above, I also did a little extract of this focusing on a smaller area around Loch Avon. The satellite imagery changes part way along the loch but it's still quite pleasing. The interactive version works pretty well in the browser and the image quality here is also pretty good (I exported this at 200% in the Qgis2threejs settings).

Loch Avon - a nice little video from March 2016

It's not always winter here - take a look

Along the way, I almost forgot why I started to map this - the purpose was to plot some interesting and important data on top of the terrain in order to try to understand more about which areas are particularly prone to avalanches. Along the way, I learned more about Mike Spencer's snow hydrology research and PhD (more on that here) and found out some stuff that will help me update my teaching material on this topic. I did begin to look at the Ben Nevis area as well (below), but I decided to focus on the Cairngorms instead this time.

25 years of avalanche locations (red dots) for the Nevis Range

That's all for now. Thanks to the kind of data collected by the SAIS, Ordnance Survey Open Data, and great tools like QGIS and Qgis2threejs, it's becoming much easier to explore, analyse, visualise and understand important datasets. That is kind of what I was attempting here, as a little holiday experiment.

Thanks for reading.

Map data: Contains OS data © Crown copyright and database right 2016