Other things on this site...

MCLD
music
Evolutionary sound
Listen to Flat Four Internet Radio
Learn about
The Molecules of HIV
MCLD
software
Make Oddmusic!
Make oddmusic!

Data visualisation of pubs in UK & Eire

OK, if you want to know where in the country has good pubs, how do you do it? Well, here's what I do: download a data extract of all the pubs in the UK/Eire from OpenStreetMap, and use density estimation to look at the distribution of pub attributes such as whether it serves real ale, or food, or has wifi. That's the normal way, right?

I've put online my code for analysing pub data distributions in OpenStreetMap. Now let's look at the plots. First of all here's a simple plot of all the pubs in the land:

pubdensity

So far so good. Some obvious urban dense spots in there. But what about real ale, for example? Which parts of the country have a stronger representation of real ale pubs than average? We can show this by finding the density of pubs marked as real_ale around the country, then dividing it by the overall density of pubs. If this ratio is higher than average we'll mark it blue, if lower than average it's red, and if it's exactly average it's grey. Here are the results:

pubdensityratio_realale

(By the way, you can see that my country boundaries are really sloppy. I haven't bothered to tell the script exactly where the coastline is, so the edge just occurs where the estimated pub density falls below an arbitrary threshold.)

There are some quite clear tendencies in there. If you want real ale, go to the Manchester/Derbyshire/Yorkshire area, or Norfolk. (And maybe Cardiff's not too bad.)

I should say right away that the source data might be skewed. It comes from OpenStreetMap where the data is contributed by volunteers, and the volunteers decide what information they want to add. It's entirely possible that in some parts of the country, there are dedicated bands of people who like to contribute real-ale info, whereas in other parts of the country they're more interested in logging the number of toilets. For proof of this, see the crazy distribution I get for relative availability of toilets, clearly influenced by some sort of London-region push to log that data:

pubdensityratio_toilets

So in all of this analysis, the patterns are probably a combination of the true picture and contributor bias. The picture for real ale does reflect some folk wisdom so I think it's relatively well-mapped (though only 3% of pubs overall have the real_ale tag, which is not many).

Looking back at that real-ale plot - what about London? It has a massive density of pubs, as the top plot shows, but according to this view it's moderate-to-poor for real ale. Well, it's probably the high density of pubs that's working against it here. If you look at the raw density of real-ale pubs, then London is actually the third-biggest peak. So this means that in London, we can make two statements which feel contradictory but aren't: (1) in London your nearest real-ale pub is generally closer than if you were elsewhere; but (2) if you walk into the nearest pub you're not so likely to find real ale. (I don't honestly know if these are true, so I'll remind you of the caveat about trusting the data.)

OK, what about other features, such as food or wifi? The plots tell a different story than for the real ale:

pubdensityratio_foodpubdensityratio_wifi

For both of these, the tendency is for the blue (positive) regions to be outside the urban centres, spread around the countryside. For food, this makes a kind of sense: country pubs often have food, while in the cities you can go elsewhere for food. But for wifi? I would have thought it was more common in cities. Again it's possible that urban OSM mappers haven't logged these data; would be good to re-run these statistics when the data is more complete.

(Also note that the wifi densities tend to be quite low in exactly the regions where the real-ale density was notably high. A curious anticorrelation - is this something about regional differences in the general nature of pubs...?)

One kind of data that is nice and complete is pub names. So, for example, here's the relative density of pubs whose names begin with "The " or "Ye " (or the Welsh "Y " or "Yr "):

pubdensityratio_the

I didn't expect a very strong trend here, and indeed that's what you get: the washed-out colours show the differences are not massive. But it's a bit of an Anglo tendency to prefix the pub name with a definite article. So, then, what about the hyperquaint subset of names beginning with "Ye olde" (or "Ye old")? Here's the plot:

pubdensityratio_yeold

You can see from the stronger colours that the tendency is more pronounced - it seems "Ye olde" pubs tend to be found not so much in Scotland/Eire, but in rural England/Wales.

Monday 31st December 2012 | openstreetmap | Permalink
Comments:
Name: SK53
Website: http://sk53-osm.blogspot.co.uk
Email: SK53_osm art yahoo dort co dort uk
Date: Thursday 17th January 2013 08:01
Nice stuff Dan. Of course there is history on doing this in OSM, even if I saw so myself :-) (http://sk53-osm.blogspot.co.uk/2011/02/updating-pub-density.html)

Add your comments:

Name:
Email:
Website:
Comment:
I am a:
Everything is optional - and email addresses will be marmalised to protect you
Creative Commons License
Dan's blog articles may be re-used under the Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. Click the link to see what that means...