President-elect Joe Biden won the presidency last month less because of a massive shift in the country rather than hundreds of little ones. Biden did better against President Trump than Clinton did four years earlier in a large number of counties, even if he flipped relatively few from red to blue. Even though he didn’t do much better than Clinton in a number of cities — and in some cases did worse — he improved enough elsewhere to earn a solid victory.

Those county-level shifts are at times fascinating. In 2000, a quarter of counties in the continental United States had presidential margins of 10 points or less. In 2012, it was 18 percent. Four years ago, only 10.6 percent did, slightly more than the 10.2 percent of counties which did so last month. Less than 1 percent of counties were within a point, slightly fewer than in 2016.

Explore for yourself. The interactive below will allow you to see the voting history for any county in the Lower 48 states — vote margins, vote totals and party splits — since 2000. It uses data from MIT’s Election Lab and 2020 data through Thursday from Edison Research. Demographic data is from the Census Bureau; county descriptions are from the National Center for Health Statistics.

For what county are you looking?

We included the counties adjacent to each county because it often informs how a geographic area voted broadly. Using that same data on county adjacency (which also comes from the Census Bureau), we determined the average deviation in the 2020 voting margin for each county relative to its neighbors. Shown as a map, the patterns aren’t immediately obvious.

You’ll notice, though, that much of the reddest part of the country — that swath from the South Dakota-Minnesota border south — is home to counties that voted more like their neighbors. Counties that diverged from their neighbors are often cities, like that green blob in northern Tennessee which represents Davidson County, home of Nashville.

The dynamic of cities being surrounded by counties that voted differently is one reason that in counties that supported Biden, deviations in their vote margins relative to their neighbors were about twice as large as Trump counties on average. The average Biden county deviated from its neighbors by about 33 points, while the average Trump county deviated from its neighbors by about 18.

Plotted as a scatter graph, there’s an obvious link between support for Biden and deviation from neighboring counties.

The counties that deviated the most, though, were usually small in population (enabling larger margins of support) and surrounded by counties that voted the other way. You can plug either of the counties highlighted on the graph above into the interactive to see how they compare.

Over the past several decades, the urban-rural divergence that helped Biden win has been expanding. But most counties tend to have widely varying differences in their presidential votes from their neighbors. On average, counties in the continental United States had a presidential vote margin that was more than 20 points different from its neighbors. Only 2.5 percent of counties had an average deviation of less than five points, and most of those counties didn’t have many neighboring counties.

The result is the mottling seen in the map above. Counties aren’t the most refined unit of geography, but the data do suggest that even in smaller regions, there’s more political diversity than it might appear.