tomwhite / covid-19-uk-data

Coronavirus (COVID-19) UK Historical Data
http://tom-e-white.com/covid-19-uk-data/
The Unlicense
162 stars 79 forks source link

Lower-upper tier local authority area codes for Scotland? #10

Closed timday closed 4 years ago

timday commented 4 years ago

Thanks for making this excellent resource available.

When trying to merge it with other more fine-grained regional data, it quickly becomes apparent that I need to get to grips with the upper and lower tier regional authority codes (apologies if my terminology is off... I'm quite new to this).

There is an promising table at https://geoportal.statistics.gov.uk/datasets/lower-tier-local-authority-to-upper-tier-local-authority-december-2017-lookup-in-england-and-wales ... but that only covers England and Wales and I am having no luck finding anything similar for Scotland.

Anyone any idea where to find such a resource?

(For example covid-19-cases-uk.csv here has S08000024,Lothian but other more fine-grained data at lower-tier level will have records for all of S12000010,East Lothian & S12000040,West Lothian & S12000019,Midlothian & S12000036,City of Edinburgh instead. Easy enough to resolve this for England and Wales using the ONS geoportal data mentioned above but Scotland a problem until I can find something similar).

FranticHunt commented 4 years ago

I think what you're looking for is the Scotland NHS Boards:

https://spatialdata.gov.scot/geonetwork/srv/eng/catalog.search#/metadata/f12c3826-4b4b-40e6-bf4f-77b9ed01dc14

timday commented 4 years ago

I think what you're looking for is the Scotland NHS Boards:

https://spatialdata.gov.scot/geonetwork/srv/eng/catalog.search#/metadata/f12c3826-4b4b-40e6-bf4f-77b9ed01dc14

Thanks... interesting... that page just seems to have spatial data "shape files". I'm more looking for something which just tells me S08000024 is comprised of sub-areas S12000010, S12000040, S12000019, S12000036... . (Which they should do, as that page does mention the boundaries "align Health Boards with the combined area of each Local Authority that they serve"). Or the inverse lookup from local authority code to its upper tier code would be equally useful.

The site looks like the right sort of place to find such a table though... will see what else they've got.

timday commented 4 years ago

Aha... this looks like exactly what I need: https://statistics.gov.scot/data/data-zone-lookup (page links a .csv download).

Seems the area code hierarchy has quite a few levels to it: DataZone,InterZone,MMWard,SPC,UKPC,Council,HB,HIA,TTWA,CTRY)

S08000024 (Lothian) is in the HB (presumably Health Board) column. S12000010 (East Lothian) is found the Council column (with S08000024 in the HB column as expected).

Perfect! (Well at least it looks like it is... the proof is once I've loaded all this stuff into dicts and am trying to mash it all up...)

timday commented 4 years ago

Yup that seems to be what I was looking for. Closing issue.