Behind the scenes

How it's built

What started in early 2022 as a personal project combining political science and computer science grew into a full data pipeline — scraping thousands of results, building custom mapping algorithms, and generating tens of thousands of choropleth images.

Data collection

Scraped election results from thousands of Wikipedia pages and Dave Leip's Election Atlas, supplementing with hand-transcribed county results from printed reference books. Raw data for every race going back to 1916.

Coordinate mapping algorithm

Built a custom algorithm to translate latitude/longitude coordinates into pixel positions — handling the non-linear projection math needed to render county shapes faithfully. View source ↗

Choropleth rendering engine

Wrote a colorizer algorithm that reads vote-share data and generates county-level choropleth maps — computing color intensity from margin, blending party colors, and rendering clean PNG outputs at scale. View source ↗

Map generation at scale

Used the rendering engine to produce thousands of individual choropleth maps — one per state per election year — making up the full image library that powers the game and the data section.

Downloadable CSV export

Generated thousands of structured CSVs — one per race — containing county-level results. These are freely available to researchers on the Downloads page.

Data coverage

Presidential
1932 – 2024
Senate
1990 – 2022
Gubernatorial
1990 – 2022

What's next

The goal is to keep extending the archive backwards — pushing presidential data further into history, and expanding senate and gubernatorial coverage. More party systems means more interesting maps and a deeper guessing pool.