gregrs-uk / python-fhrs-osm

Python tools and Leaflet maps for downloading, comparing and visualising Food Hygiene Rating Scheme (FHRS) and OpenStreetMap data
http://gregrs.dev.openstreetmap.org/fhrs/
GNU General Public License v3.0
8 stars 2 forks source link

Strange behaviour in Bristol #52

Closed spindr closed 6 years ago

spindr commented 6 years ago

Some strange behaviour in Bristol.

First had an incredible reduction in the number of bad FHRS ids. Then number of bad FHRS ids reduced to ~25 or so -- probably the next day'ish. Then noticed no longer had my usual rogue suggestions. Now the "%ge of FHRS establishments matched in Bristol" graph seems to suggest 100% matching -- which seems a bit high :-)

Anyway, I wondered if the FHRS in Bristol might have some new URL scheme or something that might have thrown automated scripts "out of whack".

Anyway, it's worked wonderfully before -- thanks for that -- address/poscodes got a lot better.

gregrs-uk commented 6 years ago

Thanks for reporting this. It seems to be caused by a problem in the underlying FHRS data. A lot of the FHRS establishments no longer have a geocode (see XML file). I've confirmed this in the comparison tool's database too:

Total FHRS establishments in Bristol authority area: 4237

select count("FHRSID") from fhrs_establishments where "LocalAuthorityCode" = 855;
 count
-------
  4237
(1 row)

Grouped by location, with those without a location at the top (i.e. 4128 establishments)

select geog, count("FHRSID") from fhrs_establishments where "LocalAuthorityCode" = 855 group by geog order by geog desc limit 5;
                        geog                        | count
----------------------------------------------------+-------
                                                    |  4128
 0101000020E61000000D0055DCB80505C080F3E2C457B74940 |     1
 0101000020E6100000FCFD62B664F504C024D1CB2896B74940 |     1
 0101000020E6100000B0045262D7F604C069E1B20A9BB74940 |     1
 0101000020E6100000BD55D7A19A5204C01AC39CA04DB84940 |     1
(5 rows)

The top left graph on the Bristol page shows what's happened over time: a big drop then a return of about half the geocodes. Hopefully the remaining geocodes will return soon. If not, you may wish to contact Sian Thomas at FSA. She's been helpful in getting these kinds of things sorted in the past.