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

Filter FHRS data to remove old establishments #2

Closed Cj-Malone closed 3 years ago

Cj-Malone commented 3 years ago

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.

Cj-Malone commented 3 years ago

This suggests highly rated are surveyed less often and 5 star establishments can be over 2 years between inspections. I think doubling that to 4 years would be a safe age to filter, although I haven't queried the FHRS data to check.

gregrs-uk commented 3 years ago

Rating dates are now displayed to aid mappers, and are highlighted yellow if not within the last 5 years. (Between 90% and 95% of establishments have been inspected in the last 5 years.)

I don't think we should filter by rating date as looking at the data there are plenty of valid establishments which haven't been inspected for a long while (e.g. especially church/village halls), and I would imagine there will be quite a few establishments inspected within the last few years that have since closed.

Some further analysis of the age of ratings below.

histogram

percentile age_days age_years
      0.5       709       1.9
      0.75     1009       2.8
      0.9      1496       4.1
      0.95     2236       6.1
      0.99     4196      11.5