Skip to content

fix: keep councils apart in geogrid maps, and improve the README - #2

Merged
CodeWithBehnam merged 3 commits into
mainfrom
docs/readme-badges
Nov 10, 2026
Merged

CodeWithBehnam merged 3 commits into
mainfrom
docs/readme-badges

Conversation

@CodeWithBehnam

Copy link
Copy Markdown
Owner

What changed

  • Geogrid fix. In the combined files, areas near the border landed in the other council, because geogrid matches areas to hexagons by distance alone. scripts/hex.R now keeps geogrid's grid but does the matching itself, one council at a time, and repairs stray hexagons.
  • Geogrid for Output Areas. The new matching runs once instead of once per area (49 seconds for 1,291 areas, where geogrid's own had not finished after 8 minutes), so there are now 84 map files, up from 75.
  • README. Badges, a dashboard screenshot, an "At a glance" table, a three-step quick start, and the ONS sources table in a collapsible block.
  • Guides and dashboard. Text updated for the fixed geogrid and Output Area support.

How it was checked

  • bun run typecheck
  • bun run check: all 84 map files, their images and the sample data are in step
  • bun run site:build, and the geogrid Output Area map looked right in headless Chrome
  • All nine combined geogrid files have each council in one cluster (the 2021 LSOA file had 5 and 4 before)
  • All 12 single-council geogrid files are unchanged area by area
  • 122 relative links resolve, and every map file is linked in the README

Notes for the reviewer

  • swansea-oa-2001-hexmap.json also changed: it predated the geometry repair in scripts/hex.R, and the rebuild made it consistent.
  • Nothing was tested in Power BI itself.

Behnam added 3 commits November 10, 2026 16:23
geogrid matched areas to hexagons by distance alone, so areas near the border landed in the other council. scripts/hex.R now keeps geogrid's grid but does the matching itself, one council at a time, and repairs stray hexagons. Single-council results are unchanged area by area.

The new matching runs once instead of once per area, so geogrid is now built for Output Areas as well (84 map files, up from 75). Also rebuilds swansea-oa-2001-hexmap, which predated the geometry repair.
@BehnamEbrahimiSBUHB

Copy link
Copy Markdown

good

@CodeWithBehnam
CodeWithBehnam merged commit 9f1fdef into main Nov 10, 2026
1 check passed
@CodeWithBehnam
CodeWithBehnam deleted the docs/readme-badges branch November 10, 2026 16:56
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