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

Large number of postcodes listed in the middle of nowhere #62

Closed pwithnall closed 5 years ago

pwithnall commented 5 years ago

Screenshot attached of https://gregrs.dev.openstreetmap.org/fhrs/district-14.html, where a large number of FHRS entries are listed on a point just north of Matterdale End, which is a tiny hamlet which definitely doesn’t contain all those businesses.

Is this a bug, or an oddity of how postcode centroids work?

screenshot_2019-01-29 fhrs osm comparison for eden

gregrs-uk commented 5 years ago

Thanks @pwithnall. That is odd, but it's a problem with the underlying data provided by the FSA or local authority. (The authority is visible at the bottom of the FHRS page you get if you click one of the links in your screenshot).

For example, Julie's Cakes has a postcode in Holmrook but the location in the FHRS XML file is just north of Matterdale End.

<EstablishmentDetail>
<FHRSID>229918</FHRSID>
<LocalAuthorityBusinessID>PI/000034925</LocalAuthorityBusinessID>
<BusinessName>Julie's Cakes Cumbria</BusinessName>
<BusinessType>Other catering premises</BusinessType>
<BusinessTypeID>7841</BusinessTypeID>
<AddressLine1>Longholme</AddressLine1>
<AddressLine2>Holmrook</AddressLine2>
<AddressLine3>Cumbria</AddressLine3>
<PostCode>CA19 1UG</PostCode>
<RatingValue>5</RatingValue>
<RatingKey>fhrs_5_en-GB</RatingKey>
<RatingDate>2018-02-14</RatingDate>
<LocalAuthorityCode>058</LocalAuthorityCode>
<LocalAuthorityName>Copeland</LocalAuthorityName>
<LocalAuthorityWebSite>http://www.copeland.gov.uk</LocalAuthorityWebSite>
<LocalAuthorityEmailAddress>envhealth@copeland.gov.uk</LocalAuthorityEmailAddress>
<Scores>
<Hygiene>0</Hygiene>
<Structural>0</Structural>
<ConfidenceInManagement>0</ConfidenceInManagement>
</Scores>
<SchemeType>FHRS</SchemeType>
<NewRatingPending>False</NewRatingPending>
<Geocode>
<Longitude>-2.93555045127869</Longitude>
<Latitude>54.60365676879883</Latitude>
</Geocode>
</EstablishmentDetail>

I'll busy at the moment but I'll try to get in touch with the FSA regarding this soon.