NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi everyone!

I am a final year student at my university, currently working on my project on rising popularity of coffee shops in the UK and Warwickshire specifically, and their market entry/exit decisions.

My theory is if a coffee shop is not on the map in the year, e.g 2008, but it is in years 2009 - 2013, and is not in 2014, it would mean it entered the market in 2009 and exited in 2014.

I am well aware this method has flaws and limitations, for instance the coffee shop might have been opened in 2000 but only appeared on a map in 2009.

Hopefully, someone would be able to help me.

Regards, M

asked 21 Jan '20, 21:51

MikhailL's gravatar image

accept rate: 0%

As @SomeoneElse has said the key issue is that many are unlikely to have been mapped, particularly in the timeframe before around 2014. You may be interested in some work I did on patterns of mapping retail outlets over time by local authority area.

You could use my techniques to get historical data for all cafes in Warwickshire mapped on OSM. It's fairly technical and requires compiling osmium-tool, some UNIX scripting and familiarity with SQL and PostGIS.

An alternative for smaller areas is to run a series of overpass queries with attic data. Unfortunately these only go back to Sept 2012, but they're certainly a way of sense checking the approach. These queries are for cafes in Warwickshire on 30th Sept 2012 (200 ish) and now (~580).

Another source of data which may work for some local authorities, and which ought to not suffer from the completeness issue, is Food Hygiene Ratings (FHRS). The FSA do not publish historical data, but may retain it. I have complete dumps of this data for various dates between (roughly) 2013 and 2017.

Lastly both OSM and FHRS have a generic café description. Not all cafes will be coffee shops, some will be tea shops and others greasy spoons. More recent entries may be dessert or shish cafes both of which I've noticed increasing in the past 5 years. I suspect most cafes are not tagged in detail as to precise type (and this is not available on FHRS which lumps them with restaurants).

For small areas standard on-line commercial directories may be a useful source of info as they seem to be very poor at removing outdated retail locations. Other places which could be useful to supplement a classification are local forums: people living in an area can often demonstrate fantastic recall of shops going back 50 years or so.

A couple of point items from Nottingham of coffee shop cafes which entered & left the market in your timeframe: Smythsons from 2012-2018, Leaf & Bean 2013-2014, The Footman's Rest (not really a coffee shop), 2018-2019.

In practice I think you'll need to use multiple sources of data, but OSM may be a good start in Birmingham.

permanent link

answered 22 Jan '20, 10:18

SK53's gravatar image

SK53 ♦
accept rate: 22%

Thank you for your help! I have already contacted Geofabrik and they gave me the history file for Warwickshire, however, I encountered some problems. I don't really care for specific types of coffee shops, as I am making a comparison between chains vs independents, however, it might be a good addition to the model. The problem is that some cafes are nodes whereas some are ways and even relations. So my question is whether it is possible to convert all of them into nodes (dots) whilst also saving data like name, address, type, etc. I was told I could do that by loading the OSM files for each year into a PostGIS database with osm2pgsql, however, I have very limited coding knowledge. Do you know if it is indeed a good way?

(22 Jan '20, 12:50) MikhailL

You can convert from ways to centroids using osmconvert, but I don't know if this works on history files (although some operations do work With a small file it's easy enough to try.

For limited data the overpass approach I described can be useful as you can save data as geojson and you can use out center to deliver the centroid rather than the polygon, and it also avoids the polygon assembly problem which plaques history files.

Certainly using PostGIS and SQL gives you the most control over your data, but QGIS is another possibility, which does allow converting line or area geometries to centroids.

If you want a more in-depth discussion feel free to contact me by email or OSM message (see as your problem interests me.

(22 Jan '20, 13:39) SK53 ♦

You'll also have the problem that once an area has been "mapped", it relies on there being regular re-surveys to spot the changes - almost every time I go into my local town centre I notice at least one shop has changed, but that's without me even checking OSM and there might be many more. One non-coffee shop related example: Lloyds TSB split into two separate banks back in 2013 and we still have loads of objects bearing the "Lloyds TSB" name -

permanent link

answered 22 Jan '20, 11:14

EdLoach's gravatar image

EdLoach ♦
accept rate: 22%

The problem, as you already say, is:

for instance the coffee shop might have been opened in 2000 but only appeared on a map in 2009.

However, maybe you could try and control for "things being mapped in an area in OSM" by also taking into account:

  • Those coffee shops that took over existing premises (i.e. it was a different sort of shop, but is now a coffee shop)
  • The rise of other shops in the same area. If a coffee shop "appeared" on the street at the same time as all the other shops, then clearly that street was only mapped at all at the time that they all appeared.

If you're not interested in the overall numbers of coffee shops and just want a few case studies, then it's pretty straightforward. If you do want to measure overall numbers, then you'll need to use some clever statistics to model change. You won't be able to assume an even rate of mapping across the West Midlands, but you might be able to talk to some of the people who did it - try getting in touch with Mappa Mercia.

permanent link
This answer is marked "community wiki".

answered 22 Jan '20, 00:08

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 Jan '20, 21:51

question was seen: 3,179 times

last updated: 22 Jan '20, 13:39

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum