National vote shares do not explain how the 350 seats in Congress are distributed across 52 constituencies.
Decision
I isolated the electoral engine as pure TypeScript functions running in the browser and encoded scenarios in the URL to share them without backend lookups.
Spanish Elections Simulator
Challenge
Projecting national estimates to each province while preserving the aggregate and implementing traceable D'Hondt allocation, the 3% threshold and tie-breaks.
Result
Adjust the national vote and watch the 350 seats shift province by province; every scenario is shareable as a link, with no backend.