Building and Interpreting Election Maps

Election maps are not just pretty pictures. They are spatial data visualizations that encode voting behavior across geographic boundaries, and the 2020 result is one of the most studied examples in recent political cartography. When you look at a standard county-level choropleth of the 2020 presidential race, you are seeing a nation where urban cores leaned heavily Democratic and rural counties leaned heavily Republican, but the actual pattern is more layered than a simple red-blue split suggests. To build an accurate map yourself, you need three things: clean shapefiles for the geographic units, a corresponding dataset of vote totals or margins by those same units, and a rendering engine. I use QGIS for exploration and leaflet for interactive web output. The shapefile source matters a lot. The Census TIGER/Line county boundaries are free and current through 2020, but they do not update in real time, and some county boundary changes happened after November. If you are mapping results, use the 2020 delineation, not whatever boundary was active on election day, unless your data explicitly matches the older geometry. Mismatched geometries are the single most common source of error in election maps. My preferred workflow is straightforward. Download the TIGER county file for 2020. Join it to a CSV containing county FIPS codes and the two-party margin. Use a diverging color ramp from blue to red with a neutral midpoint at zero. Label the states. Export or publish. That process takes about twenty minutes on a standard machine if your data is already clean. If it is not clean, factor in two to four hours of normalization work.

There is a specific problem I hit repeatedly. When joining election data to shapefiles, many people assume the FIPS column in their spreadsheet matches the FIPS column in the shapefile. It rarely does. The Census shapefile stores FIPS as numeric values with leading zeros stripped. Your spreadsheet often keeps them as strings with leading zeros intact. A simple string-based join will drop entire counties with mismatched formatting. The fix is to cast both fields to integer before joining. In QGIS you do this in the Field Calculator with a Cast function. In Python with geopandas, you convert both columns to int64 before merging. This step alone prevents roughly half the silent data loss issues I see in student and amateur projects. Beyond the basics, there are nuances that separate a usable map from a misleading one. One of those is the choice of geographic unit. County-level maps make the rural-urban divide look enormous, which it is, but they also compress population. A single vast rural county in the West may have 5,000 residents and register Republican by forty points, while five adjacent counties near a city might have 500,000 people between them and lean Democratic by thirty points. Both appear similar on a blank map. The Democratic voters are simply far denser. If you want to show population-weighted voting patterns without distorting the geography, you can create a weighted kernel density overlay. It takes more computation, but it reveals where the actual voter concentration lies. Another common pitfall is the color scale. Most election maps use a fixed sequential or diverging scale from one election to the next. That sounds reasonable until margins shift dramatically. In 2020, several swing-state counties that voted Republican by single digits in 2016 moved toward the Democratic side. If you lock your color scale to the 2016 range, the 2020 map will understate those shifts visually because the color ramp does not adapt. The workaround is to set the scale dynamically based on the current election's margin range. Clip the extremes if necessary, but let the bulk of the data define the palette rather than forcing everything into a fixed bin.

When it comes to interpreting the 2020 map specifically, the headline takeaway is that the Democratic coalition is geographically concentrated in metropolitan areas and suburban rings, while the Republican coalition is spread across low-density territory. The electoral college magnifies this difference because it allocates votes by state rather than by population density. A state like Utah covers roughly 82,000 square miles and votes strongly Republican, while a state like Massachusetts is only 10,000 square miles and votes strongly Democratic. Both have roughly comparable populations. The map makes one look larger and the other smaller purely because of area, which is exactly why county-level choropleths can be deceptive if you are trying to communicate national sentiment. I also run into issues with small-ballot jurisdictions and write-in votes. Some counties report total ballots cast but do not break down every candidate. If you only map the two major-party margins, you are ignoring a slice of the electorate. In 2020, the unaccounted share was small nationally, but in certain down-ballot races it exceeded three percent of the total vote in multiple counties. If you are mapping statewide or presidential results, the impact is usually negligible. If you are mapping congressional or judicial races, it is not. There are better alternatives for some questions. If your goal is to show how close races were, a dot density map or a hexagonal binning approach often communicates uncertainty better than a solid-color choropleth. Solid colors imply certainty. They do not. A hex grid sized to roughly fifty thousand people per cell smooths out county boundary artifacts and gives a clearer picture of where the margin was tight versus lopsided. It also avoids the large empty western counties that dominate visual space without representing large numbers of voters.

Get the Full Details

United states of america map divided in red and blue showing political ...
United states of america map divided in red and blue showing political ...

For downloading raw data, the MIT Elections Data and Science Lab maintains a clean repository with county-level results for every recent election. The Dave Leip Atlas provides historical context and ballot-access notes. If you need shapefiles, the Census website is the baseline. For interactive publishing, Leaflet or Mapbox GL JS will handle county polygons comfortably up to a few thousand features before you need to switch to a vector-tile pipeline. The most important thing to remember when working with election maps is that they are models of reality, not reality itself. They abstract complex voting behavior into colors on polygons, and every abstraction introduces distortion. The 2020 result showed a clear geographic pattern, and the map makes that pattern visible. What it does not show is why the pattern exists, who voted differently within each county, or how the results would look under a different geographic scale. You have to decide which question you are actually answering before you start rendering.