Thursday, 23 July 2015

OSM Retail Survey: Part-7

This material seems to be generating quite a bit of interest, and I'm starting to get questions asking about what it means in practice. We'll come to that, but first I'd like to consider a different aspect of data quality. So far most of the focus has been on coverage: what proportion of retail features have been added to the database.

Coverage of one common category of shop has not been considered yet, though. In around 1% of cases the intent of the contributor was clearly to indicate that this was a shop that was not in use. These include “shop=closed”, “shop=empty”, and most commonly “shop=vacant”.

High street vacancy rates across the UK are currently averaging around 10%. Out of around 50,000 vacant shops, we have data on just over 1,000 (2%). This is one of the lowest levels of coverage that we have identified. We can probably assume that contributors are most active in the most vibrant high streets (i.e. those with fewest vacancies), but this still suggests that vacant shops are badly under-recorded in OSM. It is difficult to say whether that means the missing vacant shops are completely un-recorded, or recorded in a way that is difficult to recognise. Either way they are not readily available to data users. However, that probably doesn't matter greatly. It's difficult to imagine many users who would value an application that can find the nearest vacant shop.

But data quality is not just about completeness. We must also question whether the recorded data accurately represents what is on the ground.

In my efforts to uncover as many retail premises as possible I've identified over 2,000 different tag combinations. Around 80 of those account for more than 95% of retail premises. The most common 26 account for 85%. Among the 2,000 are around 200 minor spelling mistakes. These represent 10% of the tagging variations, but a much smaller proportion of the data.

My estimate of the number of spelling mistakes is based on calculating the Levenshtein distance between different values of the shop tag. Where there are only one or two differences in spelling between one tag and another, my initial premise is that the less common variant is a spelling mistake for the more common alternative. However, this approach also picks up some correct values of the shop tag, that have to be eliminated manually from the sample (“shop=car” and “shop=card” for example only differ in one character, but are not spelling variations of each other). The approach is bound to miss some more complex spelling mistakes, but hopefully not too many. I think it is capturing the great majority.

Variations in the use of plural and singular forms account for around 60% of these errors; differences in capitalisation for around 8%; and differences in hyphenation and underscores around 6%). The remaining 25% of near matches are more diverse. Overall this approach detected spelling mistakes in around 0.7% of shop tagging.

The "proper" values of “shop” that are most commonly misspelled are “card” (cards), “carpet” (carpets), “solicitors” (solicitor), off_licence (off_license, offlicence, off-licence).

Given the controversies over bulk editing, it may be worth noting that
  • the number of retail features in the database which contain a spelling mistake in the shop key is in the order of 1,000 (compared to 385,000 missing retail premises). 
  • around a third of the spelling mistakes in the shop tag are unique occurrences
  • many spelling mistakes are an unusual spelling of a value which itself is comparatively rare (or a non-standard use of the “shop” tag)
  • data users are probably just going to ignore these - the volumes of lost data are too small to justify a lot of effort on their part   
In other words, it looks as though very few of these cases are suitable for bulk editing: virtually all either need to be checked and fixed manually, or can be more easily fixed manually than with a bulk edit.

Examples of spelling mistakes which occur more than a couple of times include:

Less common 
value
Occurrences More common
equivalent
Normal
occurrences
cards 60card77
carpets 32 carpet 494
solicitor 22 solicitors 32
crafts 16 craft 152
kitchens 15 kitchen 287
bathrooms 14 bathroom 72
antique 13 antiques 395
game 13 games 29
chandler 13 chandlery 15
bookmakers 12 bookmaker 1,542
opticians 12 optician 1,226
communications 12 communication 14
beds 11 bed 100
tile 11 tiles 67
window 11 windows 35
fireplaces 11 fireplace 26
printers 11 printer 25
furnishing 10 furnishings 23
off_license 10 off_licence 17
grocer 9 grocery 52
estate agent 8 estate_agent 1,656
accountants 8 accountant 23

Wednesday, 22 July 2015

OSM Retail Survey: Part-6

To assess how OSM data compares to commercial services similar searches of retail data were compared across different types of platform. I have not yet managed to do this programmatically, but a broad impression can be gained by comparing the results from a commercial search engine with the results of searching a similar area for equivalent tags on Overpass Turbo (http://overpass-turbo.eu/). The comparisons cannot be carried out precisely, so the approach relies on general impressions, and the findings are more qualitative than quantitative.  Because this approach is so subjective, it would be interesting to hear the impressions that others have of similar comparisons.

OSM was searched by specific categories of shop. The equivalent searches of commercial engines relied on using similar keywords. While these two different approaches can produce similar numbers of results, there were also differences in the specific results that were obtained.

Scope OSM Commercial Notes
Supermarkets and convenience stores around Maidenhead Around 50 examples Around 50 examples Similar coverage, and similar mix. Both identify many convenience stores as a supermarket
Pet shops in Truro None Three, plus some variants, such as pet charities OSM retail coverage is incomplete. Commercial search is more effective
Fishmongers across Norfolk Around 60 examples Around 40 examples OSM coverage better within Norwich (though some duplicates) but thin elsewhere. Commercial search produces more results in coastal towns which are less well-mapped in OSM
DIY on Tyneside Around 80 examples Around 40 examples Both find branches of major chains. Commercial search picks up smaller stores by name match, including some false-positives. OSM picks up some smaller hardware shops based on DIY tagging
Cafés in Harrogate Around 20 examples Around 70 examples OSM retail coverage looks incomplete. Commercial search better at finding in-store cafés and similar, but also includes many false positives (e.g. restaurants)

Inherently, the OSM search was looking for a particular “key=value” pair. I have no inside knowledge of exactly how commercial search engines do this, but it's well understood that - given a particular keyword - they use subtle algorithms to find equivalent matches within bodies of text. This includes some fuzzy searching using inflexions, synonyms and various matching algorithms to expand the scope of results beyond the specific keywords that were requested. For example, if we ask a search find “pharmcy” we are not surprised when it corrects the spelling to “pharmacy” and then retrieves “pharmacies”, pharmacist”, etc. We expect such a search to find retail pharmacies, but we are not surprised that it also retrieves university courses, job vacancies, drug manufacturers, and work by Damien Hirst as well.

I suspect that commercial search engines are also embedding some assumptions about major retail chains. So, for example, if I search for a hardware shop they seem to have some understanding that branches of B&Q and Wickes will also be of interest.

By contrast, the assumed behaviour of data retrieval in OSM is that it will be based on a search for nodes, ways and relations that satisfy a specific set of documented values within a limited subset of available keys. This implicit assumption about how data retrieval will work has an effect on the way that contributors chose how to represent data.

Certainly this model has advantages, and opens up opportunities for users of OSM data that may be difficult to achieve with services that operate on a different search techniques. For example (and for some encouragement about the quality of data that OSM is already able to deliver), try searching for a café with wheelchair access in London.




It may, of course, be a reasonable assumption, that future OSM data retrieval will be heavily based on searching for combinations of specific key=value pairs, but this may also be too limiting as a way to think about how things will work. For example, an application that is asked to find a cycle shop could search both "shop=bicycle" and "name similar to Halfords". A search for a hardware shop could well re-cast this as a search for any combination of shop=hardware / doityourself / trade, or any outlet that is part of a chain that has a name like B&Q, Homebase, Wickes, Jewson, etc.

In summary: at its best, OSM is capable of outperforming a commercial search engine in terms of both the quantity and precision of the results obtained. Generally searches based on OSM data should retrieve fewer false positives because they can draw (to a greater extent) on a degree of data structure. However, successful retrieval of data from OSM relies heavily on the volume of data recorded, of a particular type of shop, within a particular area.

OSM coverage tends to vary more from place to place. In areas where OSM coverage is around 50-60% of retail premises then my impression is that data users can expect the results of a search of OSM to match the volume of data retrieved from a commercial search engine. Commercial search engines do not find every retail outlet, so in places where OSM coverage is almost complete data users can expect better results from OSM. However, for most retail formats, across much of the UK a search for retail premises on OSM is less effective in retrieving results than a commercial search engine.

OSM Retail Survey: Part-5

Apart from estimating overall coverage, it should also be possible to provide feedback on the type of coverage within a town or similar area. In one small town that I am fairly familiar with, pubs had been thoroughly mapped, but none of the cafés or shops had been mapped. It is relatively easy to measure that kind of discrepancy in the OSM data, and contributors might find that kind of feedback useful as a pointer to areas that need more attention.

It isn't difficult to derive some broad rules of thumb about the balance between different types of retail premises that might suggest where coverage looks incomplete. Across all of the data that I have extracted, 48% of retail premises are shops, and the rest offer either refreshments or services. There are a number of places where the mix is quite different. Of course it may be that some of these towns have an extraordinarily large number of cafés and pubs. More likely that contributors haven't got round to adding many shops yet.



Similarly, there are towns where there don't seem to be as many cafés and pubs as one would normally expect. Again, this could reflect reality on the ground, but it might also point to areas that deserve some more attention.



Following the same line of thought, it ought to be possible to measure the mix on individual shopping streets. For this experiment I used the centre of Nottingham. I have no local knowledge of Nottingham, but the coverage of retail premises there is comprehensive - so the data is relatively easy to work with. Here the mix of retail premises is highlighted on any street where there is a decent sample to work with. The proportion of Shops is shown in Cyan; Refreshments (cafés, pubs, etc) in Yellow, and Services (banks, estate agents, etc) in Magenta. Green implies areas where shops and refreshments predominate. Orange implies that refreshments and services predominate (i.e. comparatively few shops). The idea was to test whether it is possible to give contributors an overall impression of the contents of the map which they can compare against local knowledge of how the town centre is organised – at a broader level than the detailed location of individual shops. It has flaws, and the data is difficult to manipulate - so I'm not convinced the approach is practical - but it might point a way towards better alternatives.



Contributors with an interest in mapping particular types of retail may be able to take advantage of the fact that similar types of retail tend to cluster together. On OSM, 85% of clothes shops have another clothes shop with 100 metres (25% have at least 10 more clothes shops within 100 metres); 70% of banks have another bank within 100 metres; 60% of estate agents and 60% of fast food outlets have an estate agent / fast food outlet within 100 metres; 40% of pubs have another pub within 100 metres. Identifying this kind of cluster might be helpful for some kinds of location search, and it may also provide useful feedback to contributors, who are able to compare the state of the map against local knowledge to identify clusters that look incomplete.

Here, for example is a map of Manchester showing clusters of clothing shops that can be identified from existing data. The analysis began with a broad definition of a clothing shop (shop=clothes, shoes, fashion, boutique, or department store) then used R clustering capabilities (the DBSCAN algorithm) on a data extract to find areas where there are more than five clothing shops within 100 metres of each other. This particular example is probably of limited use to those of us who are unfamiliar with Manchester (and also, for that matter, for those of us who are unfamiliar with shopping for clothes). But on the face of it, there must be quite a lot of missing clothes shops in Manchester, and the presence and absence of clusters in the data might point local fashion-conscious mappers to areas that deserve attention.


SK53 has just pointed out that it should be possible to extend this kind of approach using Food Hygiene data to identify retail areas, and compare them with OSM data. I haven't tried yet, but it sounds like a promising idea.



Here is an additional example, picking up on the idea that Food Hygiene data might be used to identify suburban areas that need more attention. The Food Hygiene data shows location and food hygiene status for a variety of retail outlets, including pubs, supermarkets, takeaways, restaurants, cafes and some other types of retailer. Of course, the same data could also be used to identify individual outlets that are missing, but since the data only covers certain types of outlet, the aim here is more general. The idea is to identify suburban areas where there may be several missing retail outlets, including some that don't offer food. 

These are Liverpool suburbs where there is Food Hygiene data on at least five retail outlets, but none appear in OSM. Relatively few areas in the UK fit these rather crude criteria. More sophisticated approaches must be possible, but refining them will need more experimentation, and that will take longer. Meanwhile this suggests that the general approach should work in principle.



And another example, covering Sunderland. This uses the more granular ONS Lower Layer Super Output Areas. Those rendered are where OSM contains no retail outlet, but the Food Standards Agency has at least one Food Hygiene Record (for a high-street business type). The darker the polygon, the more FSA records it contains, and hence the more retail outlets are likely to be missing from OSM. 





And a third example, for Sheffield, showing the difference between the number of Food Hygiene Records (for high-street business types), and the number of OSM retail features that fall within each LSOA. Once again, the figures aren't directly comparable. The aim is to highlight areas where the OSM data is implausibly thin, so the figures are no more than a proxy measure of how great the shortfall is likely to be. Areas are not coloured where the volume of OSM data is equal to or larger than the FSA Food Hygiene figure - but this doesn't necessarily imply that they are complete. The real message is "if you go to the dark red areas you should find lots of unmapped shops to add".




OSM Retail Survey: Part-4

It is often useful to raise our sights from the data that has been recorded in OSM, and consider the data that hasn't been recorded. As discussed above, the overall level of retail coverage in England is 27% of retail premises. However, there are variations in the extent to which different types of shop are recorded.

There are a number of ways to assess OSM coverage of a specific sector at a national level. The approach, broadly, is to count the number of shops of a particular type that are already recorded in OSM, estimate the total number that should be there, and compare the two.

There are various sources of statistics that give basic information on numbers of different types of shop at a national level. Getting useful estimates of numbers at a more local level is a bigger challenge.


  • It isn't difficult to find information on the number of branches for major retail chains - through their own publications, from business reporting, or from Wikipedia. The OSM Wiki has a detailed page on major UK Retail chains. 
  • There are national statistics which can be used for some sectors and types of shop (for example, see UKBA01a Enterprise/local units by 4 Digit SIC and UK Regions; and Retail Hereditaments by Administrative Area issued by the Valuation Office Agency). 
  • For independent specialists, many trade associations publish figures on the size of their sector.
  • Press articles and market research companies will sometimes publish figures on the number of different types of retailer. 
  • When all else fails, searching a directory  (such as Yellow Pages) can give some idea of the likely number of outlets. 
  • Where retailers need to be licensed (tattoo parlours, for example), I thought it would be easy to obtain figures at a local authority level. No doubt this would be possible (through FOIA, for example), but so far I haven't found a more accessible source of licensing statistics. Local figures may be easier to find from the licensing authority, and any ideas would be welcome on where to find national figure.

For specific retail locations:


  • within the OSM community, Robert Whittaker has tools relating to Post Offices on his Post Hoc pages (http://robert.mathmos.net/osm/postboxes/). 
  • Beyond the community, most large retail chains publish a list of branches, and some have given permission for this information to be added to OSM. 
  • Trade associations for specialist independent retailers don't normally seem to provide information on the location of individual members, but some may,
  • The NHS provides lists of pharmacies and opticians.

Using this approach, and taking three examples where we might expect levels of recording to be relatively high:

  • There are 11,696 post offices in the UK, and I have found 7,622 (65%) of them in OSM. Around 90% of built-up areas with a population of more than 5,000 have a post office in OSM. The 72 that don't might be good places to find missing post offices. More generally, post offices can be used as an indicator of a wider gap in coverage. They are one of the types of retail outlet that are likely to be added before other retail properties. So a larger settlement with a missing post office is likely to contain other retail properties that need to be added. 
  • There are 11,647 community pharmacies in England. I found 4,225 tagged as a pharmacy (36% of the total), and another 483 tagged as “chemist”. Strictly speaking “chemist” is for shops that don't supply prescriptions, but has been quite widely used as a synonym for “pharmacy”. Taken together we locate about 40% of community pharmacies. More than half are missing. I imagine that towns the size of Braintree, Grantham, Peterlee, Melton Mowbray, Haverhill, Maghull, and Congleton have a community pharmacy – but none seems to be recorded in OSM (they are displayed in Google location searches). Only around half of the pharmacies in England are specialised shops – the rest are an operation embedded within another store. Community pharmacies that operate from within a large supermarket seem to be under-recorded in OSM. 
  • There are about 2,500 specialist bicycle shops in the UK, and I have found 1,631 (65%) in the OSM database. The largest bicycle retailer, Halfords, has 465 branches across the UK, of which I found 364 (78%). I'm not sure how many of those offer bicycles, but OSM says that 151 of them do (41%). That must surely under-state the true figure.

And some examples where I expected coverage to be relatively low:

  • Figures suggest that there are about 1,400 pound stores in the UK. I've found 586 tagged with “variety_store”, and another 170 or so with alternative tagging. Which means that tagging is inconsistent, but suggests that coverage is over 50% - i.e. more than I expected. Perhaps my estimate of the total is too low
  • There are 8,500 Charity Shops in England, 900 in Scotland and 500 in Wales. I should find 9,900 in my data extract. Depending on how carefully I interpret the data, I can find between 1,751 and 1,994 (18-20%). Around 90% are tagged as “shop=charity” but there is a smattering of others tagged according to their specialisation: “shop=clothes”, “shop=secondhand” or “shop=books”



Primary
tag value
OSM count
(UK)
OSM count
(England)
Estimated 
 actual (UK)
Estimated 
 actual (England)
Approx. coverage
pub
34,937
31,180
48,000

73%
restaurant
16,062
13,855
60,000

27%
fast_food
15,762
13,794

41,295
33%
cafe
13,137
11,280
16,501

80%
convenience
13,108
11,212
48,303

27%
supermarket
8,720
7,352
6,410

119%
post_office
7,622
6,199
11,696

65%
hairdresser
7,187
6,366
38,300

19%
fuel
6,207
5,190
8,588

72%
bank
5,946
5,089
8,961

66%
pharmacy
4,871
4,225

11,647
36%
charity
1,682
1,476
9,900
8,500
17%
bicycle
1,631
1,406
2,500

65%
beauty
1,543
1,361
13,000

12%
bookmaker
1,386
1,242
9,128

15%
optician
1,161
1,041
7,250

16%
florist
983
885
8,000

12%
alcohol
784
665
5,575
4,195
14%
variety_store
586
528
1,400

42%
deli
456
391
2,500

18%
seafood
87
70
950

9%



It is interesting to consider in more detail at how data users might interpret some specific examples.

Finding a pharmacist (i.e. someone who can dispense prescriptions) could be the basis of a useful application, and there have been various attempts to develop appropriate tagging, but the actual data is quite complex for data users to interpret.

Values of “pharmacy” and “chemist” can appear for “amenity” and “shop”; “dispensing” can be set to “yes”, “no” or sometimes the name of the outlet. And all of these can be combined in different ways, alongside other values of “amenity” and “shop”.

  • “amenity=pharmacy” alongside any value of “shop=*” and either “dispensing=yes” or no value for “dispensing”: this is in line with the various guidelines, and unambiguously indicates that prescriptions will be dispensed. This accounts for almost 90% of cases in the data
  • “shop=chemist” without any indication of “dispensing”: is correct tagging for a place where prescriptions will NOT be dispensed, but examining actual examples suggests that it is widely mis-used for pharmacies. So in practice it has to be regarded as ambiguous. It represents almost 10% of cases.
  • “amenity=pharmacy” with “dispensing=no”: is inconsistent tagging, and not in line with the guidelines, but can still be interpreted fairly confidently as a place where prescriptions will NOT be dispensed. It accounts for around 1% of cases
  • “shop=chemist” without “amenity=pharmacy”, and with “dispensing=no” is correct tagging, and unambiguously a place where prescriptions will NOT be dispensed. It only accounts for 0.1% of cases.
  • “shop=pharmacy”, “amenity=chemist”, with or without other values are examples of incorrect use of the tags, but small in volume (less than 0.5%), and often appear alongside a correct tag (e.g. “shop=pharmacy”+“amenity=pharmacy”): the incorrect tag values can safely be ignored by data users without sacrificing significant amounts of relevant data

The above figures are calculated from pharmacies and chemists recorded in the database. So it is worth recalling that this only accounts for 40% of actual pharmacies, and around 60% of these outlets do not appear in the database at all.

In practice data users are going to be reasonably confident that they have found a dispensing pharmacist where “amenity=pharmacy” is present, and “dispensing” is either absent, or set to anything other than “no”. They will have to treat “shop=chemist” as ambiguous in this context. In practice they will probably ignore everything else because the complexity of the logic increases out of all proportion to the quantity of reliable data that it can uncover. In summary they will confidently interpret 90% of the data in the database, and find just over one in three pharmacies. If they interpret the data more loosely they will be able to point their users to about 40% of real pharmacies. If they want to find more, then at present they will have to look elsewhere for their data.

Next we will look at how coverage by type of retail outlet might be used to provide useful feedback to contributors and data users.....

OSM Retail Survey: Part-3

It is quite difficult to identify areas of incomplete retail mapping within a large conurbation.

Initially I thought investigation of areas marked as “landuse=retail” showed promise, but they proved disappointing in practice. The meaning of this tag has been interpreted in different ways, and used inconsistently. Almost half of retail areas in OSM contain no retail properties, so they can provide some indication of gaps. However, some of them are very small, and two-thirds of retail properties already in OSM lie outside a marked retail area, so in general checking for data on shops within retail areas is unlikely to be efficient.

  • A number of fairly large settlements don't have any retail area described in OSM (including Weymouth, Wellingborough, Grantham, and Newark-on-Trent). 

The reasons vary.

  • In most of these the main retail area hasn't been marked as such, even though other types of urban landuse have been applied in other parts of the town. 
  • In some cases the whole town is marked as “landuse=residential”, 
  • In others an area that seems to be predominantly retail space has been described as “landuse=commercial”. 

Overall, there are too many exception cases to make productive use of retail landuse data.

On a very traditional high street, individual shop frontages tend to be relatively narrow, and relatively consistent in length. In theory, if we could compare the density of shops in OSM with what we expect, then we should be able to get a sense of where the database looks thin. However, this can only give a broad indication.


  • A well-documented street with a few large shops will still look empty in comparison to a street where the data only includes a small proportion of numerous small shops. 
  • There are practical difficulties in calculating density consistently when nearby shops may lie on opposite sides of a street, or in adjoining, and neighbouring streets. 

These challenges can be overcome to a degree, but my attempts have involved some intensive computation. In practice a simple heat map seems to be equally useful for flagging up suburban areas that already have fairly high levels of retail content. In conjunction with local knowledge of where retail outlets are clustered this could be sufficient to identify some larger suburban shopping areas that need attention.

This is an example from Newcastle. Data on retail is dense in the centre of the city, the quayside, and along Gosforth High Street. Coverage of retail barely shows up in areas such as Jesmond, and along Westgate Road. Those with local knowledge might be able to use this kind of feedback to identify areas that are worth further investigation.


Finally, while the overall level of retail coverage in England is 27% of retail premises, there are variations in the extent to which different types of shop are recorded. Analysis of the mix can be useful at a national level, but it can also be informative at a local level.

First, though, we will look at the mix at a national level.

Tuesday, 21 July 2015

OSM Retail Survey: Part-2

With 528,000 retail premises in England for a population of 53million, there is roughly one retail property for every 100 people across the whole country. It would be handy if we could use this ratio to examine coverage at a more detailed level than local authority.

The Office of National Statistics provides boundary data and population figures for Lower Layer Super Output Areas (LSOA) and Middle Layer Super Output Areas (MSOA). An LSOA has a population of 1,000 – 3,000 and an MSOA has a population of 5,000 – 15,000.

So we would expect to find 10-30 shops in an LSOA and 50-150 shops in an MSOA. However, when we use these ratios to measure actual coverage in OSM we find wide divergence. It is particularly noticeable that rural areas seem to be exceptionally well mapped, while suburban / residential areas appear under-mapped.



The underlying problem is that the number of retail premises is not proportional to the population at this level of detail. Suburban areas are well served by city centres, so have fewer shops than we expect. Rural areas with a dispersed population tend to have relatively large numbers of small shops - i.e. more than we expect. This diversity is demonstrated by examining how OSM coverage compares to the national average for different types of area. Sparse areas look well-mapped, even when they aren't. Urban areas don't look well mapped even when they are.

For what it's worth, at this level of detail, the correlation between the number of shops in OSM, and the number of residents employed in the retail sector  is even worse than the correlation between numbers of shops, and total population. So retail employment is likely to prove even less useful as an indicator of how many shops to expect, and I haven;t pursued this further.


ONS Rural / Urban classification
OSM retail units 
as % of expectation 
based on national average
Rural town and fringe
30%
Rural town and fringe in a sparse setting
83%
Rural village and dispersed
33%
Rural village and dispersed in a sparse setting
55%
Urban city and town
31%
Urban city and town in a sparse setting
61%
Urban major conurbation
32%
Urban minor conurbation
51%

As a result of these variations this approach is of limited use to us.

There are some variants that might be more useful. This example from North Tyneside highlights several Middle Layer Super Output Areas where there is no post-office recorded in OSM. Some of these might really have no post-office, but it's a fair bet that some of them really will contain a post-office, alongside other retail outlets that haven't been mapped yet.


So there may be some useful ways of using data from output areas based on population, but it turns out that it is probably more useful to examine the coverage of retail outlets across built-up areas.

Of the retail properties that I have found in OSM, 85% fall within a built-up area. It makes sense to look for numbers of retail properties within settlements. Again the Office of National Statistics provides us with handy geography and population data to work with. Here I'm using their data on population and boundaries of built-up areas to compare the volume of OSM retail data in larger towns and smaller cities. This is a less reliable, but a more granular view than we can extract from VOA statistics on retail properties that are available at local authority level.


This approach seems to work particularly well for mid-sized towns, and it can be adapted to make it useful for smaller towns and larger villages. We would expect most larger towns to be the main retail centre for the local population, so they should have roughly the average number of retail premises in proportion to the population. In practice, we find that well-mapped towns come close to this ratio. Where a town falls well short of the expected ratio it suggest that there is scope for improvement, and visual examination tends to confirm this impression.

We can see that Exeter and Chesterfield have roughly half the number of retail premises in OSM that we would expect to find on the ground. In Hull and Lincoln perhaps two-thirds of the retail premises are missing from the data.

Searches for retail locations will have higher utility to some people in some places than in others. If an application provider wants to use OSM retail data to support views of individual towns, then they might chose to begin with towns and cities of a manageable size, with large numbers of visitors, relatively high turnover in population, good technology infrastructure, etc.

University towns, for example, can be expected to have a high turnover of technologically adept students,



Cathedral cities are likely attract large numbers of visitors.



And so are Seaside towns.



Some towns fit into more than one of these categories, and quite a few of these look well-mapped (Bangor, Cambridge, Canterbury, Durham, Ely, Norwich, Oxford, Salisbury, Scarborough).  Others probably wouldn't take a huge effort to bring up to a similar level of coverage (Exeter, Worcester, York).

Measuring the ratio between retail premises and population begins to break down for smaller settlements. Retail is not evenly distributed, and we expect things to average out across a larger settlement, but not across a smaller settlement. The population of many smaller towns expect to travel elsewhere for some of their shopping. Some smaller settlements are predominantly residential. Others serve as retail centres for a wider area, so these have more than their fair share of shops and services. Similar variations apply in towns and villages that are popular visitor destinations. Nevertheless, it's unlikely that a settlement of 1,000 people would have only a couple of shops. It's not impossible that a town of more than 5,000 people will have no post office, or no pharmacy, but it seems unlikely. We should be able to use these assumptions (and others) to identify smaller settlements where retail is suspiciously under-represented in OSM.
  • There are 26 built-up areas with a population of more than 10,000, and 83 with a population of more than 5,000 where no Post-Office is recorded in OSM. The largest are Kirkby, Haverhill, Witham, and Formby.
  • There are 80 built-up areas with a population of more than 10,000; and more than 200 with a population of more than 5,000 where no Pharmacy is recorded in OSM. The largest are Braintree and Grantham.
  • There are 30 built-up areas with a population of more than 10,000; and 120 with a population of more than 5,000 where no food shop seems to be recorded in OSM.
I've used a mixture of these assumptions to identify smaller settlements close to home where the number of shops in OSM is implausibly low. It pointed me to a couple places locally that needed attention, and I have started to add shops. However, my home area is not a good example to illustrate the principle. Here, the under-mapped towns turn out to be quite widely dispersed, and don't show up well on a map. I'm less familiar with the locations in the more densely populated rural area around Durham, but it is a better example to illustrate the principle. The city itself is exceptionally well-mapped, but some of the surrounding small towns and villages look as though they might benefit from attention.



This approach of measuring the content across built-up areas seems more promising than using Output Areas, but it still has limitations. Individual settlements lying within a more rural landscape can easily be highlighted in this way, but it is more difficult to identify areas of incomplete retail mapping within a large conurbation.

To be continued....

OSM Retail Survey: Part-1

According to the Valuation Office Agency (the organisation which assesses business rates in England), there were 528,000 retail premises in England in 2012. This includes shops, banks, post offices,  cafés, restaurants, and take away food outlets, It doesn't include pubs or wine bars. It includes kiosks, some service providers (e.g. hairdressing salons), but it doesn't include filling stations.

To get a comparable figure from the OSM database we need to extract a mix of tags: most shops, some amenities, and some offices. So far I have found 142,803 features in England that fit the VOA categories of retail property (27% of the expected total). The shortfall across England is 385,000 retail premises that VOA have counted, but which I can't find in the OSM database.

The VOA statistics are broken down by local authority, so it is straightforward to compare OSM coverage at local authority level.


In notoriously well-mapped areas such as Nottingham and the neighbouring authorities of Broxtowe and Erewash the number of retail premises recorded in OSM is close to the number of retail premises reported by the VOA (Nottingham = 2,996 in OSM, 3,340 from VOA). In Tendring (Essex), the OSM tally is 95% of the VOA figure. In Oxford, and Cambridge it is almost 80% of the VOA figure.

I'm sure I must be missing some retail properties that I should be counting, and counting some that I shouldn't. Overall, though, these well-mapped areas suggest that I must be quite close to capturing what I hope to capture.

  • In 34 local authorities I reckon that more than half of retail premises are recorded in OSM,
  • In 24 local authorities less than one in ten of retail premises is recorded in OSM. 
  • The lowest levels of retail coverage are in Burnley, Castle Point, Doncaster, Eastbourne and St Helens.

Regionally, intense mapping around Nottingham means that the average coverage of shops in the East Midlands is relatively high (though not as high as the average across Inner London).

The lowest levels of coverage tend to be in larger northern towns and cities. Picking a few at random, I found less than one in ten shops recorded in Bolton, Doncaster, Rochdale, South Tyneside, and Sunderland. In the south, towns like Basildon and Luton do not fare much better.

Coverage of shops across rural counties is close to the national average.  The most complete rural areas border intensively mapped cities (Nottingham, Oxford, Cambridge). The least complete rural areas are widely scattered.

It doesn't really work this way, but imagine for a moment that the community collaborated to raise more areas to the standard achieved by leading examples such as Nottingham, Oxford and Cambridge. The obvious approach would be to prioritise areas that could be completed relatively easily, and the quickest wins would be where there is only a small shortfall between the number of retail premises reported by VOA and the number of retail premises recorded in OSM.

  • The smallest shortfalls between the VOA statistics and OSM content include authorities like Rutland (140), Maldon (176), Eden (201), Redditch (261), and Wokingham (269).

More generally, mapping of shops involves wandering around recording them. Comparing two authorities with a similar shortfall, it stands to reason that a more compact area would need less effort than the larger one:

  • There are just four authorities where coverage is already in the top decile, and size in the bottom decile, and all are inner London Boroughs – Camden, Westminster, Islington and the City of London.
  • There are nine more authorities that rank among the smallest 20% by area, and highest 20% by coverage. All are outside London. In addition to Oxford and Cambridge they include Cheltenham, Norwich, Redditch, Southampton, Tamworth, Woking and Worcester

By contrast, the local authority where I live covers a large area, has a low population density, and the proportion of retail properties recorded in OSM is below average. There is a long way to go before it ranks among the most thoroughly mapped. Random searching for shops could take a long time, so I need some way to prioritise.

To be continued....