Atlas of King County Politics

A comprehensive atlas of electoral data. View it here: https://atlas.lltt.co.

Introduction

The Atlas of King County Politics is a comprehensive database of current and historical election results in King County, Washington. It organizes 15 years and 20 million rows of detailed results data, along with an apparatus of spatial data for analyzing, querying, and visualizing those results. The purpose of the project is to have cleaned and normalized historical data available for analysis that is timely and responsive to new questions in its domain and also provides a public facing front end for querying the spatial results of past elections. The Atlas relies on PostGIS, Python, JavaScript, and AWS.

Election results data format

Figure 1: Raw csv for single election

The machine that counts ballots for the King County Department of Elections regards each observation of a vote for a candidate or a contest left blank on a given ballot as a distinct event. The reports generated and made public tabulates those observations by the precincts–county defined voting areas–from which ballots have been cast. Ballots themselves are anonymous, but they are marked, grouped, and counted by precinct. Each row of the county data file represents the number of times an indicated phenomenon was observed on ballots from an indicated precinct.

Figure 1 contains the first few lines of one election results file, and shows the number of votes counted for each of the candidates listed under “CounterType” for the Attorney General’s race in the precinct of ADAIR. This database combines dozens of elections’ results files into a single results table, and a series of other tables for accessing it and filtering it. Since 2015, precinct-level results have been released both for the counts announced on election night, typically about half the vote, and for the final official result. This contains both counts for elections where it is available.