You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reposition the UK constituency and local-authority hex maps so they follow the UK's shape #1409
The UK hex maps for constituencies (650, 2024 boundaries) and local authorities (361, April 2023 boundaries) place many hexes poorly. Neighbouring areas aren't next to each other, and parts of the map don't resemble the UK's shape. That makes both maps hard to read in the v3 "Local areas" tab and the v2 constituency and local-authority views.
Where the positions come from today
Constituencies:x and y in each constituency result. They originate in policyengine-uk-data's constituencies_2024.csv, which .py copies as src/policyengine/data/uk_geography/constituencies_2024.csv.
Pick better layouts for both maps, ideally maintained ones that already cover these boundary sets. For example, Open Innovations publishes HexJSON layouts for UK constituencies and local authorities. Check their licence and that their codes match our 650 constituency and 361 local-authority codes.
Make the hexes follow the UK's shape (England, Wales, Scotland and Northern Ireland recognisable, and neighbouring areas next to each other where possible), with no two areas sharing a position.
Do this together with Own the UK constituency hex-map layout in the frontend #1190, which moves the hex layout into the frontend. Once the app owns the layout, it can use the new positions without the Public API or the simulation API changing their results.
Add a test that every one of the 650 constituency codes and 361 local-authority codes has exactly one position, and that no two share one.
Activity
Draw the v3 UK hex maps from frontend-owned Open Innovations layouts,…