All cases
LiveProductClaude Opus 5.5

Election Control, a live map of the US midterms

A live three-dimensional results map of the November 3, 2026 US midterms, built in the two days before the vote and kept updating through election night while its data source failed.

Screenshot 1 of 3

Election Control, a live map of the US midterms — screenshot 1

Teaser

Stack

TypeScriptViteThree.jsd3-geoTopoJSONPythonDockerCaddy

Pipeline

  1. 1

    A collector polls the results every minute

    A small Python service in a Docker container reads civicAPI's three national aggregates (Senate, House, Governors) every 60 seconds and rewrites one snapshot file atomically. Each office refreshes on its own, so a failed or implausible answer for one keeps that office's last good data while the others move on.

    PythonDocker
  2. 2

    Only the source calls a race

    Seat counts are the seats not up this year plus declared winners. A race is shown as won only when the source marks a winner; leading is drawn as leading, never as a call.

    Python
  3. 3

    Polls, a forecast and a news wire ride alongside

    Every 30 minutes the collector adds the latest polls from VoteHub and civicAPI's race-level forecast; every 6 minutes it reads the RSS and Atom feeds of Stateline, Votebeat and The Conversation, keeping election headlines with their links only.

    Python
  4. 4

    The page draws the country in 3D

    State and district shapes are projected with d3-geo from TopoJSON and extruded in Three.js; the column height is votes counted, the colour is who leads or has won. The page reads only the snapshot, every 30 seconds, and says plainly when the data is late.

    TypeScriptThree.jsd3-geoTopoJSONVite
  5. 5

    The build is published as a static site

    One deploy script builds the page, runs the collector's tests, copies the files to the media host behind Caddy and restarts the collector container.

    ViteCaddyDocker

Links

What it does

Election Control is a live results page for the 2026 US midterms. A three-dimensional map of the country shows every Senate, House and Governor race: the height of a state or district is how many votes are counted, the colour is who leads or who has won. Chamber panels add up the seats and draw the Senate and House as hemicycles against the line needed for control.

Around the map sit the context panels: the generic-ballot average and the latest polls (VoteHub), a news wire of election headlines from Stateline, Votebeat and The Conversation, and an event log of what changed since you opened the page. A Forecast tab switches the map to civicAPI's pre-election ratings, from safe to toss-up. The page never calls a race itself: a race is marked won only when the source declares a winner.

How it works

The page and its collector were built in one Claude Code session over two days before the election, with the founder deciding each step: civicAPI as the source, a collector that writes a snapshot the browsers read instead of every visitor hitting the API, three-dimensional rather than flat maps, and no race calls of our own. The layout was rehearsed against invented results run through the real normalizer before any real count existed.

On election night the source's API started answering most requests with errors from late evening on November 3, 2026, while its website stayed up. The collector was changed during the night to refresh each office separately and keep the last good data for any office whose request failed, so the Senate and Governor races kept updating while the House waited for the source to recover. The page's "updated" stamp follows the latest successful refresh.

Where to see it

The page is live at midterms.tytarenkoagency.com and keeps updating as the remaining races are called. Drag the map to rotate it; switch between Senate, House and Governors, or between Results and Forecast, with the tabs above it. A teaser recorded on the live page is on the agency YouTube channel, in the Showcase playlist.

Share this case