Sunday, 14 July 2019

All English Premier League Grounds in 60 Seconds

I've been thinking a lot about information design, urban density and mapping things in context lately as part of my day job so I thought I'd experiment with all these things using an interesting example. To cut a long story short, I took Ordnance Survey data, extracted all 20 Premier League grounds, edited them slightly to match what's on the ground and then did some mapping. The results are shown below for all 20 teams (as of the 2019-20 season), starting with a gif and followed by some further explanation. All you need to know for now is that the main image in each graphic shows the stadia at the same scale as the rest and the little stadium silhouettes at the bottom are all shown at the same scale as well so you can make comparisons between the size of different grounds. I've made all files (including geo files of the stadia) available on this page.

Three seconds per frame, 60 seconds in total - mp4 here

I've always been interested in cities, urban history, football, deprivation street patterns and that kind of thing - and how they all interact - so this seemed like an interesting way to look at it. I did map this before in relation to deprivation but this post is just about showing each ground in its local context - all at the same scale and with just a little bit of additional information for each one.






















What I've attempted here is to produce a set of individual images and a gif (I also did an mp4 version) that loops through each ground, gives some basic information about each, shows where it is in England and also shows you how it compares in size and local context to all the others. I've added in some street names but not all, because that makes it far to busy and harder to read. 

I've been to a few of these grounds to watch a match - most recently to Goodison - and I used to drive past Old Trafford almost every day on my way back from work but for lots of others I'm not familiar with them so I wanted to produce a set of simple visuals that clearly shows each ground in context. I really find some of the older ones interesting, the way they are packed tightly into their surroundings - like Anfield. But this was really an experiment in layout and map design more than anything else; I just used this dataset as it was interesting.

As for the colours along the bottom, I used the colours for each team on their official website, though for some there are more than one and for at least one (e.g. Man City) I used a darker one so it would show up better on the stadium silhouette. 

And, oh yes, I was probably thinking about this topic because for the first time in a decade Sheffield will have a team in the Premier League (just not the one in my neighbourhood!).

You can find all the original files - 20 high resolution images plus a gif and an mp4 - here.

Data sources: for the club information it was a mix of Wikipedia and the Premier League website. For the outlines of the grounds I extracted these - then edited them - from Ordnance Survey's OpenMap Local product. The background imagery is Google satellite view. The street names are also from Ordnance Survey but I extracted these from the OS Open Zoomstack local roads layer and then symbolised them just to show a few of the road labels. I thought this was important given the significance of some local roads and how several grounds are named after them - or parts of grounds are. 

Software: I did the mapping in QGIS 3.4, I created the gif with GIMP, and the mp4 I made with ffmpeg. For resizing and cropping and otherwise editing the image outputs I used IrfanView. The font is Montserrat, one of the free Google Fonts and a current favourite of mine.


Saturday, 1 June 2019

New Book: GIS for Planning and the Built Environment

A bit of a different blog post today, because a new GIS book by Ed Ferrari and me has been published. It’s called GIS for Planning and the Built Environment: An Introduction to Spatial Analysis and it’s an intro text aimed at anyone with an interest in GIS and the built environment, from geography and planning students to aspiring architects and landscape majors, plus people working in professional practice. We’ve included examples from across the world, from the bustling streets of Manhattan to the zig-zagging ski slopes of Austria. We hope you’ll see that we love GIS and what it can do, but we recognise that not everyone shares our passion, so when we were writing the book we also had one eye on the reluctant GISer - that’s why you can use our book to dip in and out of topics as and when you need to. 

Front cover

Want to know how to make better maps? Okay, no problem, head straight to Chapter 6. Desperate to know more about Waldo Tobler (pictured below with the authors in Santa Barbara on a previous GIS  world tour), his famous ‘First Law of Geography’ and why everyone goes on about it? Then head directly to Chapter 7. You'll also learn about the much less well known 'Second Law'. Want a good overview of contemporary GIS for planning and the built environment more generally? Excellent! Read the whole book. Looking for more information on a specific technical topic? Then our comprehensive index is the place to begin.

The authors, with the late Professor Waldo Tobler

There are many GIS texts out there, from the comprehensive to the highly technical. Ours sits somewhere in the middle as what we think is an accessible, easy-to-read reference for anyone with an interest in the topic as it relates to the built environment and planning more generally. We begin by establishing the book’s aims, and set out our hopes that anyone who reads the book will:

  • Obtain the knowledge, skill and experience to understand how the spatial analysis of data about the ‘real world’ can be used to understand planning problems;
  • Be able to apply a broad range of spatial analytic and visualisation techniques using industry standard GIS software packages; and
  • Understand how maps and data can be used effectively as evidence for planning- related issues.

In the introduction, we also include a little guide to what you’ll find inside so that, for example, if you want to know more about data (including open, big and ‘bad’ data) we tell you to head straight to Chapter 4. In here you’ll also find a bit more on the parts of GIS that really can be baffling if you’re just starting out (like what file formats to use, things like dots per inch, and more about ‘the mighty shapefile’!). 

An example of new Ordnance Survey data we use in the book - this is Manchester

Although we recognise that much of what might be considered core elements of GIS and spatial analysis change little over time, we also recognise that things have changed a lot in the past decade, with new technologies and platforms like QGIS and CARTO helping shape and re-shape an already vibrant discipline. New open data sources have added fuel to the GIS fire and social media has fanned the flames to such an extent that maps are now everywhere, or so it seems. We cover some of this in Chapter 5, where we note that such developments have often led to the creation of what one might charitably describe as ‘bad maps’, and which the book's authors have been guilty of many times! 

But because we’re optimistic people, we do of course focus mainly on the positives, with reference to GIS and cartographic pioneers like Kenneth Field, Anita Graser, Gretchen Peterson, Joshua Stevens and the inspirational Atlas of Design series, where you’ll find some truly breathtaking examples of what can be done with spatial data. We also offer a good bit of advice on how to avoid common pitfalls in your work, so if you’re a student doing GIS and you want to get better grades/marks then we can probably help with that too!

But this an introductory text, and we don’t try to cover everything (far from it) because we thought that would be overwhelming. But we aim to cover the most important things for those working within built environment disciplines more broadly. That’s why the book is peppered with examples of GIS in the real world that people might be able to understand without having to look up a reference book!  Often, we use separate boxes for these, like when we were trying to explain the topic of generalisation in GIS, as you can see below.


Our new book is in part an attempt to bring GIS back to the forefront of planning and built environment disciplines, but also partly an attempt to show how it can help us understand the world just a little bit better, so long as we don’t get carried away with ourselves. We’ll end here with what we say in our concluding remarks in Chapter 9: 

“GIS lets us see. It opens up a world of visualisation that spreadsheet models can never hope to rival. It helps us make links between phenomena on the basis of the attribute that is common to so much of what goes on in our world – the attribute of where.”

We hope you’ll agree and that you’ll find our book useful if you choose to take a closer look - if you want to find out more, head to the book's homepage.



Sunday, 26 May 2019

Did you realise wards were actually very interesting?

More map and data fun today. I know there's a massive market for blog posts about administrative geographies, so here I am. It's partly inspired by the fact that I look at this kind of data all the time and get to know it quite well, and partly because of this Twitter exchange some time ago with Mags Hall and Allan Faulds, who truly do know too much about this kind of thing.

Did you know that the UK's biggest ward accounts for 2% of the total area of the UK? You did? Ok then, did you know that only one UK ward out of more than 9,000 begins with 'z'? Perhaps you did. But did you know that 'Plumpton, Streat, East Chiltington and St John (Without)' is the longest ward name in the UK, and also perhaps the best? How about the fact that there are 11 UK wards bigger than Greater London and the smallest ward in the country (in the City of London) is not very big at all - 0.044 square km (about 6 football pitches). The ward that you'd most like to drink? Why, that's the ward of 'Speyside Glenlivet' (in Moray), surely.

Time for some maps now. They all have the name of the local authority they're in in the top left, with the ward name along the bottom.


Not quite as big as Trinidad and Tobago, but close enough

It's small, ancient and has about 320 people

Zetland ward, in Redcar and Cleveland

If you're a local Councillor in the UK's biggest ward you have an awful lot of ground to cover, as you can see below for the journey between Achiltibuie and Kinloch Hourn, which are both in the same ward. Extra points if you can pronounce Achiltibuie (I can but I have a bit of an advantage on the Highland-place-names-as-Shibboleth thing).

The route between Achiltibuie and Kinloch Hourn (in same ward)

There are two really, really big wards in the UK. One is shown above and it's Wester Ross, Strathpeffer and Lochalsh, and the other is North, West and Central Sutherland. Both are in the north west Highlands, and are more than 4,800 sq km in size (that's over 1,800 sq miles, which is close to 3x Greater London or 18 City of Edinburghs). The biggest ones in other parts of the UK are a good bit smaller, and here they are below. Overall, the 10 biggest UK wards account for more than 10% of the land area of the UK, and the 100 biggest account for just over 30% of the UK's land area. You could fit almost 3,000 of the smallest UK wards in Wester Ross, Strathpeffer and Lochalsh but I don't think it's a very sensible idea so I'd advise against it.


By far the biggest ward in England

Just a smidgen bigger than Torr Head and Rathlin

The biggest ward in Wales is also a donut ward

The other humongous ward 

All this isn't supposed to be profound or anything like that, just a bit of map trivia, so read on for a bit more about the little wards. The smallest wards in the UK are all in the City of London, and we've seen the smallest of those above (Queenhithe) so let's look at smallest ones in different parts of the UK instead.

Northern Ireland's smallest ward

Scotland's smallest ward

The smallest ward in Wales

Not the street of Charles Booth fame, but it is small

Wards are actually very important though, and they represent a very important part of local democracy in the UK, so there are some practical implications to this kind of thing, particularly when you consider the different areas people represent and how widely they can vary, even within a single local authority. For example, in Northumberland the biggest ward is more than 1,100 times the size of the smallest. In the Highland Council area in Scotland the biggest ward is over 1,300 times the size of the smallest.

But did you know that wards can also be mapped with a basemap in greyscale? You didn't? Okay, here's proof, with a selection of wards covering more than 100 sq km.

Lots of big wards in this neck of the woods

Not anywhere near Bolton

Another donut ward - I'm not sure how many there actually are

10th biggest ward in Northern Ireland

Yes, the Isle of Skye is a single ward (pop about 10,500)

I like the name of this ward


Notes: I used ward boundaries for 2018 from the ONS Open Geography Portal. This file contains 9,114 wards for the UK, with 7,446 in England, 462 in Northern Ireland, 354 in Scotland and 852 in Wales. Scotland has relatively few wards compared to Northern Ireland and England but I won't go into that here. My favourite ward? Not sure, but Aird and Loch Ness is definitely a contender - see below. It contains all of Loch Ness, is pleasingly-shaped and is only a little bit smaller than Luxembourg. Then there is 'Highland' ward which is not in 'Highland' (the council area) but is in the Highlands but in the Perth and Kinross council area. I have loads more of these maps but that's enough for today.


The midgie capital of the world (at least in my experience)

Hmm


Monday, 13 May 2019

All populated places in Great Britain in a single file

A data-sharing post today with details of a new file I've made to share with the world - or at least anyone who's looking for a comprehensive place names file of Great Britain to use in their maps. The short version: I've taken the 'populated places' from Ordnance Survey's massive Open Names dataset and made it available as a single shapefile, geopackage and geojson. You can see all the files, including a ready-made QGIS project file, in the project repository. I've also added this file to the Resources section on my personal web page, where you'll also find (e.g.) all buildings in Great Britain, parliamentary constituencies, and more. Here are some examples of what the file looks like. 

More than 42,000 places in a single file

You can have Gaelic or English place names

You can filter to show different kinds of places

You can also use Welsh place names, or English ones

In addition to the layers and QGIS project, I've also included some comments in the expression boxes in QGIS to explain how you do various things - like using different font size or CASE for different types of place name (e.g. for 'City' or 'Town' or 'Village'). See the screenshots below for more on this and look at the QGIS project if you want to see it in more detail and to change any settings.


This is how you make some labels bold

This sets a different label buffer for different types

This filter is used to show only some places

This determines the font size for different label types

This determines the CASE (e.g. upper/lower) for the labels

This sets the symbol size


That's all for now. Hope you find this useful. I've pasted below the text (including comments) that I've used for the labelling, just in case you want to copy/paste it quickly. As you can see, I've also used this to change 'Kingston upon Hull' to 'Hull' in a kind of find/replace way.

wordwrap((

CASE


WHEN "NAME1_LANG" = 'gla' THEN  "NAME2"

WHEN "NAME2_LANG" = 'gla' THEN  "NAME2"
WHEN "NAME1_LANG" = 'cym' THEN  "NAME1"
WHEN "NAME2_LANG" = 'cym' THEN  "NAME2"
WHEN "NAME1" = 'Kingston upon Hull' THEN 'Hull'

ELSE  "NAME1"


END


),14)


--If you want to show English place names in place of Welsh or Gaelic ones, or vice versa, or any combination of this then you just need to change the variables above.


--For example, in the first WHEN statement we are saying that when the language in the "NAME1_LANG" column is specified as 'gla' (for Scottish Gaelic) then we want to show the "NAME2" (English) label instead of the "NAME1" label (Gaelic).


--The wordwrap function at the start - and end with the 14 and brackets - just wraps place names on more than one line when they exceed 14 characters. Just delete this bit at the start and end if you don't want to do this.


-- You'll also notice that instead of displaying the default name of 'Kingston upon Hull' (which hardly anybody would use) I have used a WHEN/THEN statement to replace it with 'Hull' (which people actually use).