gregrs-uk / fhodot

Food hygiene open data OpenStreetMap tool
https://gregrs.dev.openstreetmap.org/fhodot/
GNU General Public License v3.0
9 stars 3 forks source link

Add tables for suggested matches view #23

Open gregrs-uk opened 9 months ago

gregrs-uk commented 9 months ago

@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.

jnicho02 commented 9 months ago

Aww, that's rotten! Explains why somewhere like Ipswich has loads of mismatches :( https://gregrs.dev.openstreetmap.org/fhodot/?lat=52.05766&lon=1.16171&zoom=12&layer=osm

Screenshot 2024-01-04 at 12 14 54
rjw62 commented 9 months ago

A lot of those Ipswich ones should be fixed now. I've got a reasonably efficient workflow to deal with a many of those cases, with a lilttle bit of manual work. I first have a script to extract a list of OSM objects in the bounding box of the relevant council area that have unmatched FHRS ID's using the list at /fhodot/api/surveyme . Then I load those objects into JOSM and save the resulting .osm file. I download the relevant district FHRS file from https://ratings.food.gov.uk/open-data . I've then got a script the processes the two files, looking for current FHRS listings that share a postcode with one of the OSM objects. The output it creates looks like this: https://osm.mathmos.net/updates-299.html . The main links in the "Matches" column are JOSM RC links that update the FHRS ID. It's pretty straightforward to go down that column just clicking on the matching link (if there is one) in each box. I'd be happy to generate those files for other districts that have the same issue if there are people want to work on them.

gregrs-uk commented 9 months ago

Thanks @rjw62. That table is exactly the kind of thing I was imagining for https://github.com/gregrs-uk/fhodot/issues/8. Pull requests for either of these issues welcome, though it might take me a little while to review.

gregrs-uk commented 9 months ago

8 now implemented

A suggested matches table would probably be simpler to implement in some ways, but we'd need to think when to load the parsed address from the API. This happens when clicking on a map marker and showing details in the inspector but would probably have to be done when clicking the JOSM link from the suggested matches table to keep server load as low as possible.