Skip to content

[UK] Allow CED GSS codes to be assigned from ONS geopackage rather than CSV file - #449

Merged
davea merged 1 commit into
masterfrom
update-ced-gss-codes
Sep 24, 2026
Merged

davea merged 1 commit into
masterfrom
update-ced-gss-codes

Conversation

@davea

@davea davea commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

ONS don't seem to publish a CSV with the required fields as often as we'd like, but they do provide a GeoPackage with the same data in - switch to matching MapIt's CED Areas spatially and assiging GSS codes that way instead.

Removes the need for all the name overrides too.

@davea
davea force-pushed the update-ced-gss-codes branch from d006969 to 2447d74 Compare September 11, 2026 10:28
@davea davea changed the title [UK] Allow CED GSS codes to be updated if they already exist [UK] Allow CED GSS codes to be assigned from ONS geopackage rather than CSV file Sep 11, 2026
@davea
davea force-pushed the update-ced-gss-codes branch from 2447d74 to fd045cf Compare September 11, 2026 10:31
@davea
davea marked this pull request as ready for review September 11, 2026 10:33
@davea
davea requested a review from dracos September 11, 2026 10:33

@dracos dracos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Do we want to have a check for if the area already has a GSS code, that it matches? If we ran this in the past. (But I can't see any CEDs with a code in the db, so perhaps we didn't?)

@davea

davea commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

I moved from area.codes.get_or_create to area.codes.update_or_create for that reason - there was at least one (I forget which now) that appeared to have changed GSS code.

@dracos dracos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine; but a GSS code should never change, so that's a bit odd - probably worth checking which it was in case there's an issue for some reason. (I guess perhaps there was a boundary change but we didn't pick it up properly?)

…an CSV file

ONS don't seem to publish a CSV with the required fields as often as we'd like,
but they do provide a GeoPackage with the same data in - switch to matching MapIt's
CED Areas spatially and assiging GSS codes that way instead.

Removes the need for all the name overrides too.
@davea
davea force-pushed the update-ced-gss-codes branch from 8ee2c0b to 9c187a5 Compare September 24, 2026 13:00
@davea
davea merged commit 9c187a5 into master Sep 24, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants