Methods

How the county lists on this site are computed, and where the method breaks

A methods note. Two public boundary files, one point-in-polygon test, 436 districts, and five cases where it returns nothing.

By Sahil Manwani · September 4, 2026 · 2 min read

Every ballot page here says which counties are inside the district. That list is not typed in and not sourced from a third party. It is computed once, offline, from two files the site already ships for its maps, and this note says exactly how so that you can check it.

The inputs

The test

For each district, take every county in the same state, compute the county's spherical centroid, and ask whether that point falls inside the district polygon. Every county whose centroid lands inside is listed. Areas are computed as spherical area on the sphere rather than from a projection, which is why Alaska comes out at 1,713,379 square kilometres and not the much larger number a Mercator map would imply.

A centroid test is a deliberate simplification. A county whose centroid falls in district A but whose eastern third falls in district B is listed only under A. For the ballot pages that is the right trade, because the alternative, listing every county a district touches at any point, would put Los Angeles County under a dozen districts and tell a reader nothing.

The result is that 352 of the 436 districts get a county list this way.

The fallback, and the five it cannot save

A district smaller than the county around it contains no county centroid, so it gets an empty list. For those, a second test asks whether the district sits wholly inside a single county, and if so the page says so instead. That recovers 79 more, including all ten Los Angeles districts and Maricopa County's five.

Five are left with neither: CA-15, CA-36, CA-42, FL-14 and FL-27. They are all coastal and all smaller than their county, and the containment test fails on a coastline mismatch. The two files were simplified independently, so their shorelines disagree by a few hundred metres. Of CA-36's 115 boundary vertices, 96 sit inside Los Angeles County and 19 sit just outside it, in water one file calls land and the other calls sea. A strict containment test reads those 19 points as the district leaving the county.

436 minus 352 minus 79 is 5. The District of Columbia is inside the 436 and has no voting seat, which is why the seat total on this site is 435 and the geography total is 436.

What would fix it

Buffering the county polygon by a few hundred metres before the containment test would recover all five, at the cost of occasionally claiming a district sits inside a county when it genuinely straddles a line by a small margin. Clipping both files to a shared coastline would be correct and is more work than the payoff justifies for five pages. Neither has been done, so five ballot pages currently say nothing about counties, and that is a known gap rather than an oversight.

Advertisement

Referenced here

How this was produced

Every figure in this piece was computed from the public Census boundary files this site ships, or from the apportionment table it uses to build race pages. Nothing here is summarised from another publisher. Where a number is wrong, it is a bug in the method rather than a citation error, and the methods note describes the method well enough to check.

Electorate HQ is built and edited by Sahil Manwani, a biomedical engineering student at the University of Texas at Austin pursuing a minor in entrepreneurship.

More analysis