Thursday, 22 April 2021

Gridded GDP maps for a spiky world

It's a bit of a cliché to say that the world is 'spiky', but since I've done a few spiky-type maps in recent years I thought I would take it a step further and look at the world in relation to GDP rather than population. Why? Well, take a look at this part of Hans Rosling's '200 Countries, 200 Years' piece and you'll see that there is much to be gained by separating out different regions from their national contexts if we want to learn more about the economic position of sub-national units. So, using the 'Gridded global datasets for Gross Domestic Product and Human Development Index over 1990–2015' data provided by Matti Kummu, Maija Taka and Joseph H. A. Guillaume in their scientific data paper, I decided to see what it would look like if I mapped GDP in 3D for small grid areas. See below for the world map, and read on for more details about the data.

This is one way of looking at global GDP

As a reminder, or something new for those who didn't see my earlier population density graphic in the same style, see below - and you can compare the two to see how different they are - most of Africa and also India are particularly different. Yet we can also see that, below the national level, it's easier to see where statements like 'Europe is rich' or 'Africa is poor' look like false or not-quite-true statements, at least for some grid cells. This kind of insight is not exactly earth-shattering but it's also one of the reasons you'd want to have this kind of data in the first place - to look beneath the surface of country-level stats to see what's going on at a more fine-grained level.

Global population density

I've also produced a series of zoomed-in maps of different parts of the world, which you can see below, starting with sub-Saharan Africa. I haven't labelled any of them, on purpose, because I like exploring them visually and trying to figure out what's what based on the obvious spikes - e.g. like Lagos or Cape Town. Call me a nerd, but I like the simplicity of the unlabelled maps and I enjoy trying to figure out which city a particular spike represents.

This one differs greatly from the population map above

Australia and New Zealand + a bit more

Southeast Asia

The Arabian Peninsula has some big spikes here

I tried to capture the whole US in this one

Most of South America in this one

A zoomed-in version showing the lower 48 US states

With this kind of map it can at times - actually quite a lot of the time - seem a bit gimmicky, but I think the use of 3D in this case adds a useful extra dimension of information that is not possible with standard choropleth maps. Yet with 3D maps like this some of the spikes can easily obscure others so here are a couple more views of the US - one of which is focused on Chicago and blurred everywhere else, just for effect.

With apologies to Hawaii this time

This angle provides a better view, I think

And one final view, zoomed in to Europe this time.

A (mostly) European zoomed-in version

Okay, go on then - two more, but that's it. The first is focused on India and the second is a more zoomed-in version showing East Asia. 

This looks quite different to the population map

Manila is in the middle foreground

That's all for now. 


FAQs

Where can I find the data? You can find it here.

Should I trust this data? That's up to you and of course different methods would produce different outputs, but if you read the Scientific Data paper and the methodology you'll see that it is defensible and robust (well, I think it is). My view is that even if the specific method can be argued with, a different approach would likely produce very similar results and therefore similar maps. There may be some anomalies in the data but that's one reason why a 3D approach like this can be useful - it helps us identify unusual spikes that may or may not make sense, although they usually do after further investigation - e.g. read this and the bit about San Quentin State Prison.

How did you make the maps? I used a Windows tool called Aerialod. Read my previous posts if you want to know how to use it. You can be up and running with it in a very short space of time, but if you want to create large images quickly you'll need a top-end graphics card.

This data looks all wrong, who should I tell? If you spot anything that doesn't look right, feel free to contact the authors of the paper and dataset - see link below, in the Acknowledgements section.

Is this available as a print? No, but I may add this to my existing print store.

Can I use this image? Yes, it's on the internet, which means you can steal it, crop off the author's name and pretend you made it. Just kidding, sort of. Everything on my blog can be used and shared in a non-commercial setting, but it's always nice if people link back and/or give attribution. I post stuff here that I think is interesting, so feel free to share it if you also find it interesting. If you want to use any of this commercially, get in touch with me via my company, Automatic Knowledge, where I do paid consultancy.

What's the resolution of the grid cells? You can see on the first image above that it says '5-arc minutes', which is about 10km at the equator, but less than that as you go further north or south. That's one of the sub-optimal things about this kind of data, unfortunately, but I can't do anything about that.

Hey, there are loads of blank spots with no GDP, what's going on? These maps can't show everything and sometimes the level of economic activity doesn't register as a spike in the maps above. Like all maps and visuals, these are simplifications and abstractions of another reality. Or, to put it another way, this kind of map is intended to provide the general pattern in the data rather than show every individual grain of sand. If you want a specific raw GDP value for anywhere in earth you can download the data and explore it as you wish.

Okay, I know it's an abstraction blah de blah de blah but what numerical value do the very highest spikes actually represent? The very highest spikes represent a value of 100x10⁶ USD and above. How much is that? If my maths is correct that is $100 million USD. And remember that this is total GDP (PPP) in constant 2011 international US dollars, as it says in the paper.

Isn't GDP a load of nonsense though? Yes. No. Spend 5 minutes searching for 'gdp flawed' or 'gdp nonsense' and you'll see lots of great critiques, many of which I agree with. Yet it is still a yardstick and it is still used. 

What does FAQ stand for? Frequently asked questions. 

What spatial unit does the grid spacing on the ground represent? These are spaced at 100 map units. That means that it's 5-arc minutes x 100, which is equivalent to about 1,000km at the equator. I just put these in to provide a bit of scale, but also because I think they are quite effective for context and drawing our eyes to the main canvas, which I put on a little elevated plinth.


Acknowledgements: I had looked at this before without getting very far, but I decided to look at it again after Michael Gustavson got in touch with me recently to ask about it. I couldn't have mapped GDP like this without the data - obviously - so of course I must acknowledge Kummu et al. (2018) for generating this fascinating dataset - see citation below. Thanks also to ephtracy for making Aerialod free and easy to use.

Kummu, M., Taka, M., & Guillaume, J. H. (2018). Gridded global datasets for gross domestic product and Human Development Index over 1990–2015. Scientific data, 5(1), 1-15.


Monday, 5 April 2021

House prices in 2021 (in England and Wales)

A few maps and notes today as I try to catch up with the latest release of the HPSSA house price data from ONS. HPSSA? It stands for 'house price statistics for small areas', and it covers England and Wales. There are loads of different datasets and sometimes finding what you're looking for can be a bit fiddly so I put together a very basic, single page with links to them all. The good news? You can get small area house prices going back a full quarter century now, to the final quarter of 1995. Yes, way back in the mists of time. This is what the house price map of England and Wales looked like then - this is for the four quarters from the final quarter of 1995. Get yourself a time machine and snap up a bargain in central London - treat yourself!

Snap up a bargain while you can!

Fast forward 25 years and, you will be shocked to learn, the pattern is much the same and unless you have access to giant wads of cash, you are not going to be buying a big house in London any time soon. You really did need a map to tell you that, right?

Amazingly surprising patterns

But of course these maps don't change very much over time, save for a few little pockets here and there, or a bit of spread outwards from London or a few other high price areas - which I've tried to label. 

What I find most interesting - apart from this consistency over time, and the eye-wateringly expensive areas in inner London - is the extremes and the spatial patterns. So here are a few maps on that, below. 

By the way, I've chosen a £250k cut-off for the middle category as it's close to the average house price at the end of 2020. Or at least one version of the average. The London average is a bit over £500k now but my last category starts just a little bit below that. If you look at the maps below it's easier to pick out the 'southern bits in the north' (e.g. Wilmslow) or the 'northern bits in the south' (e.g. Portsmouth?) - at least as far as prices and perceptions of them sometimes go. I don't want to start one of those north-south wars that seem very popular on Twitter these days, particularly since all these places are incredibly far south anyway 😉.

The high and low categories together

Just the most expensive areas

Just the least expensive areas

Want the data? Here's my web page list with all the data - take your pick. The data I've used here is from dataset 46 and was last updated at the end of March 2021. How will the Covid-19 situation pan out in relation to house prices over the short, medium and long-term. No idea, but I'll keep following Neal Hudson's latest updates to keep on top of all that.

It's a bit ugly, but it still works

1996, eh? Now that seems like a loooooong time ago. Mind you, so does 2019. Is there any kind of north-south divide in house prices though? Hmm, hard to say.

Again, not exactly surprising

And one of those 'how it started, how it's going' things to end, since the data series goes back so far.

Quite interesting if you look really closely


Sunday, 21 March 2021

Munro maps and stats

I've been working on this on and off for ages, so I think it's time to publish what I've got and then move on. See below for a collection of maps and stats relating to Scottish Munros. You what? Just in case anyone reading this isn't aware, a 'Munro' is a mountain in Scotland with a height of 3,000ft or more, or 914.4 metres in modern parlance. The reason we're not using metric measurements here is that Sir Hugh Munro published his first list of peaks in 1891. Anyway, let's start with a simple map of all 282 Munros and then I'll look at how many are within 100 miles of Scotland's cities, and within a 90 minute drive + 5km. I also generated a distance matrix so you can see how far each Munro is from all the others - based on this measure, Beinn Teallach is the most central Munro (it's only just barely a Munro as well, by about 25cm).

All 282 Munros
Nine of them are above 4,000ft

In the maps above, I have used Ordnance Survey Terrain 50 data to create the terrain effect, and I made the maps in QGIS. I did a bit of post-QGIS processing to add a bit of 'noise' and also to recolour the maps, but the mapping was done in QGIS, like I said. I used the Scotland digital terrain model I created and have shared on my new business website, over at Automatic Knowledge. For the location of Munros, I used The Database of British and Irish Hills v17.1, which is really great.

The next thing I did was decide to look at how many Munros were within 100 miles of major cities - for this I chose Aberdeen, Dundee, Edinburgh, Fort William, Glasgow, Inverness, Perth and Stirling. I added in Fort William to the mix because even though it's not as big as the others, it is right in the heart of all the Munros so it would have been daft to leave it out. By my calculations, here's how many Munros there are within 100 miles of each of these places - and see below that for the maps of each one. The point in each places that I measured from was where the Ordnance Survey data I used put the place point - generally right in the city centre.

  • Aberdeen - 95 Munros within 100 miles
  • Dundee - 201
  • Edinburgh - 171
  • Fort William - 280
  • Glasgow - 203
  • Inverness - 282 (all of them)
  • Perth - 232
  • Stirling - 226








What about within 50 miles? 100 miles as-the-crow-flies gets you quite a long way, but given the terrain it can be a lot longer than that when you are actually trying to get there. So, I looked at it using a 50 mile buffer as well - see below for the data on that, plus the 50 mile maps for Fort William and Inverness.

  • Aberdeen - 10 Munros within 50 miles
  • Dundee - 55
  • Edinburgh - 3
  • Fort William - 193 (68% of them)
  • Glasgow - 38
  • Inverness - 141
  • Perth - 92
  • Stirling - 56


Okay, if you want to move to the Highlands and become a professional Munro-bagger, it's pretty obvious that Inverness or Fort William is where you need to be, but we already knew that. What I didn't know was exactly how many peaks were near each place. But of course this straight line kind of analysis is only really useful if you're a) a bird or b) have your own helicopter that can somehow fly directly to the top of mountains in - not easy when they are very often covered in clouds! Talking of clouds, I've used a cloud-style buffer mask on purpose here.

I have only been to the top of a very small number of Munros (not sure how many but definitely at least two, just can't remember), am generally quite scared of exposed drops, and am not into competitive mountainy things, but I do quite like making maps of this stuff because it reminds me of where I'm from. 

But let's say you want to do some kind of analysis that will help you understand - in a more practical way - how many Munros are near each city. That's what I decided to do. Based on an early morning departure time (06:00) at a weekend, driving 90 minutes at reasonable speeds, and then taking a 5km buffer around the 90 minute travel isochrone (calculated using the TravelTime plugin in QGIS), I came up with a number that I think looks about right for each of my eight places. See below for the results and the maps. Obviously, if you drive like a maniac and there's no traffic, you'll get different results, but these numbers seem about right, based on some additional manual checking. I've made the edge of the travel time zones a bit fuzzy, just to avoid the impression that there is a 100% precise cut-off. Plus I wanted it to look cloudy too, as I said above.

  • Aberdeen - 0 Munros within 90 minute drive + 5km
  • Dundee - 13
  • Edinburgh - 1
  • Fort William - 127 (45% of them)
  • Glasgow - 37
  • Inverness - 81
  • Perth - 54
  • Stirling - 51








Okay, so we're finally getting somewhere. Actually, we aren't. We're all stuck at home, apart from some people fortunate enough to be near these lovely places. By the way, those links I just put in are to the twitter accounts of Iain Cameron and Kelly Lander - two of my absolute favourite accounts - you may already know them if you're reading this but if not I highly recommend following them. Talking of incredible things - I'm still astounded by Donnie Campbell's Munro-round record of 31 days - he climbed all 282 in only 31 days last year - read about it here. Yes, that is an average of 9 Munros per DAY. Mind you, Hazel Strachan's Munro accomplishments over many years are also just exhausting to think about!

So, you want to know how far each Munro peak is from the top of Ben Nevis? Of course you do. First, here's a map of what that might look like. Read the text on the image for more info.


I generated a distance matrix - and a GeoPackage of it, for GIS users - so you can see how far each Munro is from all the others, in metres, kilometres and miles. 

I published this in list format and matrix format in the folder for this little side project. You'll also find higher resolution images of each of the maps above - the ones here are only half the size of the originals, although they are still pretty big.

There's loads more I could do on this, but I need to move on now. 

Hopefully some people will find this interesting. I'll leave you with a selection of photos I took last September on a trip up Ben Lawers and Beinn Ghlas, on a surprisingly lovely day. The second one was my attempt to zoom in to Ben Nevis, which we could see that day - it's 34.5 miles away from Ben Lawers.











Notes: yes, 3,000ft or 914 metres doesn't sound like much if you're from a much bumpier country. But if you are more than 3,000ft up a mountain at 57 degrees north, with a biting, gale force wind trying to knock you off your feet, 3,000ft can seem like 30,000! I could have calculated the distance between Munro peaks using a digital elevation model surface rather than straight line distance but that would a) be more complicated and time consuming and b) not be that useful if I only used the 50 metre open dataset I have available. I've compared this kind of thing before using straight line vs topographical distance and the results didn't change that much, but if anyone has done it please let me know.