PolicyEngine / PolicyEngine/policyengine-app-v2
Own the UK constituency hex-map layout in the frontend
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 50m
- Merged PRs (30d)
- 39
Description
Supersedes PolicyEngine/policyengine-uk#1152 together with a coordinated PolicyEngine API issue.
Current behavior
PolicyEngine API reads constituency names, codes, and hex-layout coordinates from the public UK data artifact, combines the coordinates with calculated constituency impacts, and returns x and y in every constituency result. The app-v2 response type and constituency adapter require those fields and pass them directly to the SVG hex-map renderer.
Required change
- Add a versioned UK constituency hex-layout artifact to app-v2, derived reproducibly from the maintained public UK constituency data.
- Join API impact values to frontend-owned layout positions using a validated constituency identity. Coordinate with the API issue if a constituency code must be added to the value contract before coordinates can be removed.
- Update the response types and constituency adapter so the map renders without x and y in the API payload.
- Retain temporary compatibility with the existing response during the coordinated deployment.
- Document the layout source, constituency-boundary version, and update procedure.
- Add focused coverage for complete joins, missing layout entries, duplicate identities, and coordinate-free API data.
Deployment order
Deploy this frontend support before the API removes coordinates. The companion API issue must not change the response until the deployed frontend can render from its local layout.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the app-v2 response type and constituency adapter into the SVG hex-map renderer, then inspect the maintained public UK constituency data and the companion API issue. Add and validate the versioned local layout, preserve temporary compatibility, and document its source and update procedure. Done means the map renders without API coordinates and coverage handles complete, missing, duplicate, and coordinate-free data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100