Free tools & games for everyone
Free · No sign-up · No accounts
See how district lines change election results: draw equal districts on a grid town of two fictional parties, compare seats, wasted votes and compactness.
Draw districts: pick a district number, then tap squares to put them in it. Purple voters are round, Orange voters square.
| Tab | Move between the district buttons and the squares |
|---|---|
| Enter or Space | Pick a district, or paint the focused square |
Drawing electoral districts so that they favour one side is often called gerrymandering, after an 1812 Massachusetts district said to look like a salamander. This lab uses a made-up town and two made-up parties to show the arithmetic; it says nothing about any real party or place. Researchers and courts have proposed many measures, each with known limits; the efficiency gap and Polsby-Popper compactness shown here are two of the best known.
The map maker starts from stripes and keeps trading two voters on the edges of two touching districts (so sizes stay equal), keeping only maps where every district stays in one piece. It accepts changes that bring it closer to the chosen goal, and early on also some that do not (simulated annealing), so it does not get stuck.
The tests recount every district, seat, wasted vote and compactness value in Python, and check that every map the maker draws has equal, connected districts.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product