Closed gregrs-uk closed 7 years ago
select gid, name from districts where name like 'Stirling';
gid | name
-----+----------
334 | Stirling
(1 row)
select count("FHRSID") from fhrs_establishments where district_id = 334;
count
-------
9
(1 row)
Looks like only 9 establishments are within the BoundaryLine district and the current threshold for inclusion is 10.
select count("FHRSID"), district_id, name from fhrs_establishments
left join districts on fhrs_establishments.district_id = districts.gid
where "LocalAuthorityCode" = 790 group by district_id, name;
count | district_id | name
-------+-------------+--------------
1263 | |
4 | 334 | Stirling
1 | 303 | Glasgow City
(3 rows)
Something fishy going on as virtually all the Stirling FHRS records seem to fall outside a BoundaryLine district.
Looking at the establishments table, these FHRS establishments don't have a location associated with them so the problem is with the underlying data fetched from the FHRS API.
Number of FHRS establishments by BoundaryLine district:
count | name
-------+----------------------------------------------
1 | Dumfries and Galloway
1 | Blaenau Gwent - Blaenau Gwent
9 | Stirling
20 | Inverclyde
71 | Isles of Scilly
Other districts above also appear to have problems with FHRS data, but Isles of Scilly are correct.
fitzsimons reports that Stirling is missing from the list of districts.