Code Monkey home page Code Monkey logo

fhodot's Introduction

FHODOT: the food hygiene open data OpenStreetMap tool

You don't need to install anything to use this tool; simply use the instance running on the OpenStreetMap development server.

You may wish to read the documentation on contributing or setting up a local development environment.

Why use food hygiene (FHRS) data?

  • It's a rich source of open postcode and address data that can be used in OpenStreetMap because it's published under the Open Government Licence
  • It provides a useful reminder of establishments you already know about but haven't mapped, and can help find areas that would benefit from a physical survey
  • When establishments disappear from the FHRS data this is a useful indication that they may have closed down or changed name (see also Robert Whittaker's Survey Me!, which uses data from this tool)

Features of the tool

  • Allows efficient matching of Food Hygiene Rating Scheme establishments and relevant OpenStreetMap objects in the UK through JOSM remote control or iD
  • Suggests matches between FHRS and OSM data (based on proximity and fuzzy matching of names) on the 'Suggested matches' map layer
  • Shows issues such as outdated fhrs:id tags or matches between objects with different postcodes (see red map markers and tables) or between distant objects (in particular on the 'Distant matches' map layer)
  • Automatically parses FHRS addresses into the correct addr:* tags
  • Shows matching progress by local authority district

Major improvements since the original FHRS/OSM comparison tool

  • A much-improved user interface
  • More efficient manual matching through JOSM remote control without having to view data on the FSA website
  • Address parsing
  • Continuous map scrolling without data being broken into districts
  • Map-based display of progress by local authority district when zoomed out
  • Includes data for Northern Ireland
  • More maintainable code

Why not import the data in bulk?

  • The locations of FHRS establishments are often inaccurate, sometimes being based on postcode centroids
  • Although the tool can often suggest matches, these need to be verified by a human, and it can't find every match with an existing OpenStreetMap object
  • Although the tool can often parse FHRS addresses into addr:* tags automatically, addresses still need checking
  • Mappers will sometimes spot and fix other issues whilst matching objects

Licence

The majority of the code in this repository is published under the GNU General Public License v3.0, but where data is derived from other sources the relevant licence is indicated at the top of the file.

fhodot's People

Contributors

gregrs-uk avatar kasperfranz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fhodot's Issues

Distinguish between mismatched postcodes and invalid IDs in map

The OSM object graph summary distinguishes between matched objects with different / missing postcodes (dark pink) and OSM objects with invalid FHRS IDs (light pink). But, at least to my eyes, the map does not.

Invalid FHRS IDs definitely are a problem that needs fixing, but postcodes sometimes are ambiguous, e.g. in a large shopping centre, there is often inconsistency in different sources on the postcode for a particular outlet. I'm not keen to use not:addr:postcode in this case (which should be for real errors in the FHRS data). These then leaves a lot of "false positives", where the genuine errors / out-of-date items are indistinguishable from non-problems.

Perhaps use red / orange for invalid FHRS ID and postcode mismatch respectively?

A more sophisticated approach for the tables view would be to show the distance between mismatched postcode centroids (or the OSM object and the assigned postcode). This would more clearly highlight real issues from "non problems".

Exclude closed establishments

Some establishments stay in the dataset after they have closed. It would be nice for them to no longer be shown.

I don't have a programmatic way know if an establishment is closed, however OSM does currently have 4k variations of old_fhrs:id. I've collected them here. Another option would be to allow users of fhodot to flag them.

Show markers at lower zoom level

Hey, the new version is looking good. However I hope some functionality is not lost in the transition.

In the previous version the district page provided a good overview on how a specific area was mapped, and highlighted issues and suggested matches. The new version doesn't highlight issues or show suggested matches until being quite zoomed in, making it harder to match and monitor a large area. In the old tool I felt I could easily monitor/maintain all of the Isle of Wight, but I don't think I could do that with the new tool. I think showing more data at a lower zoom would be one way to help.

Catch (mass) re-numbering

South Tyneside seems to have a had a mass update of its FHRS IDs, and so the match rate has gone from overnight from ~30% to 0%, which is very disheartening.

Perhaps this could be managed? It would require comparing looking specifically at "old" and "new" FHRS records and identifying a changed FHRS ID where all the address data remained the same. The "suggested match" layer could then be extended to propose "New FHRS ID?".

Add tables for suggested matches view

@rjw62 comments:

Looking at https://api.ratings.food.gov.uk/Help/Status it seems that over the past year, a number of Authorities have re-issued all their FHRS IDs, meaning the matches we've previously entered in OSM are now all invalid. [โ€ฆ]

What might be helpful is if the suggested match view in your tool could have tables below it, split into whether the object has an existing defunct FHRS ID or not. If the table could provide the FHRS/OSM names and postcodes, along with the JOSM RC links that would potentially make the update a lot quicker. Better still if there could be a JOSM link to just update the FHRS ID. Typically the address details are already there if the OSM object already has an FHRS ID, and it would save having to untick those rows in JOSM.

Related to #8.

Add tables of all unmatched establishments/objects in map area

These could be useful for memory jogging without having to click on each map marker in turn. It could be useful to sort by postcode in order to group objects that are geographically close.

The OSM table should include objects with (only?) invalid fhrs:id tags too. Both tables should include links to select / select & zoom as used in existing tables.

The necessary data should already be returned by the endpoints for the FHRS and OSM data sources.

Endpoint(s) for Potlatch

@SK53 suggests (via this mailing list post:

If one could download geojson for an area in the viewport one could do two
things with Potlatch:

  • pull it in as a custom vector layer, allowing individual items to be
    pulled into the editing view along with their tags
  • use the same geoson as a task list to step through the items for review.

Both can be populated via URLs, so perhaps providing a geojson end-point
for the viewport would make this easier with Potlatch.

Filter FHRS data to remove old establishments

There are more than a few establishments still in the FHRS dataset after they have closed eg. Old inspection dates can be an indicator for that, perhaps they shouldn't be shown.

Another option would be to make the inspection date more viable to make mappers aware. Maybe show it in the blue boxes that show the FHRS data.

Add table for quick matching of FHRS/OSM objects with same postcodes

This is useful for spotting matches that haven't been picked up as suggested matches, and particularly when a large number of FHRS IDs are changed in bulk for a local authority, as has happened in the past.

The table could use the OSM objects within the map area sorted by postcode and should include establishments with matching postcode but no location.

There isn't currently an API endpoint that provides this data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.