PA election results

Precinct-level results for Pennsylvania's 2022 and 2024 general elections, on one map.

Map of Pennsylvania with every precinct shaded by the 2022 governor's race margin, blue for Shapiro and red for Mastriano.
2022 governor, by precinct: Josh Shapiro (D) 56.5%, Doug Mastriano (R) 41.7%.

An interactive map and table of every precinct result from Pennsylvania’s 2022 and 2024 general elections: 13 races, from President and Governor down to the State House, across roughly 9,100 precincts in all 67 counties.

The hard part

Precinct lines change between elections, so results reported on one year’s lines don’t line up with another’s. I re-aggregated the Department of State’s precinct returns onto current precinct boundaries, assigning each older precinct to the current one that holds most of its area, so every race shows on the same map.

Congressional lines also cut through some precincts. Rather than shading a split precinct with votes from two different races, the map cuts it along the district line and shows each piece with its own district’s result.

What you can do with it

Built with

TypeScript, Vite and MapLibre GL for the site; Python, GDAL and QGIS for the data pipeline.