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.
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
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.