Election maps & cartograms
Mapping votes rather than land: county and constituency results, swing, cartograms, hex and tile maps, dot density and value-by-alpha.
An election map has a problem that most maps do not: the thing being counted is people, but the thing being drawn is land. On a county map of the 2024 US presidential election, counties won by the Republican cover 88% of the land and cast 51% of the votes; on a geographic map of the 2024 UK general election, Labour's 411 seats take less than a third of the paper. Every guide here is about closing that gap honestly.
They start from real results — US county returns for 2020 and 2024, the House of Commons Library's 2024 constituency results and the German 2025 Bundestag results — and work through the joins that quietly go wrong, then the alternatives to an area map: contiguous and Dorling cartograms, hex and tile maps, swing arrows, dot density and value-by-alpha.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- Hex and Tile Maps Explained: Equal Shapes for Equal Units hex map tile grid map explained
- Cartograms Explained: Trading Geography for Size cartogram explained types
- Election Maps Explained: What a Results Map Can and Cannot Say election maps explained misleading
- Election Map Colours Explained: Diverging Scales, Midpoints and Breaks election map colours diverging
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Make a US County Election Map in Python county election map python
- How to Make a Contiguous Cartogram in Python contiguous cartogram python
- How to Make a Dorling Cartogram in Python dorling cartogram python
- How to Make a UK Election Hex Map in Python uk election hex map python
- How to Make an Election Swing Map in Python election swing map python arrows
- How to Map German Federal Election Results in Python bundestagswahl map python
- How to Make a Dot-Density Election Map in Python dot density election map python
- How to Make a Value-by-Alpha Election Map in Python value by alpha map python
- How to Make a Non-Contiguous Cartogram in Python non-contiguous cartogram python olson
- How to Make a Proportional-Symbol Election Map in Python proportional symbol map election python
- How to Make a US State Tile Grid Map in Python us state tile grid map python
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- Election Results Won't Join the Boundaries: Codes, Wards and Renamed Places election results join fips leading zeros
- Dot-Density Map Puts Dots in the Wrong Places: Deserts, Borders and Weights dot density map dots in wrong place
- Hex Map Comes Out Scrambled: Offset Coordinates and Negative Rows hexjson hex map overlapping offset
- Cartogram Distorted Beyond Recognition: Twisted Shapes and Invalid Polygons cartogram distorted invalid polygons
Related topics
Subjects that keep coming up alongside this one, most overlap first.