US County Electoral Map – Land Area vs Population

Posted In: Maps | Voting

County-level Election Results from 2020 and 2016

The map has been updated to include the latest 2020 results and also adds the option to color the circles by the win margin rather than just looking at the winner.
Click here to view a visualization that looks more explicitly at the correlation between population density and votes by county.
This interactive map shows the election results by county and you can display the size of counties based on their land area or population size.

Previously, I created a map (cartogram) that showed the state by state electoral results from the Presidential Election by scaling the size of the states based on their electoral votes. The idea for that map was that by portraying a state as Red or Blue, your eye naturally attempts to determine which color has a greater share of the total. On a normal election map, Red states dominate, especially because a number of larger, less populated states happen to vote Republican. That cartogram changed the size of the states so that large states with low population, and thus low electoral votes tended to shrink in size, while smaller states with moderate to larger populations tended to grow in size. Thus, when your eyes attempt to discern which color prevails, the comparison is more accurate and attempts to replicate the relative ratio of electoral votes for each side.

This map looks at the 2020 and 2016 presidential election results, county by county. An interesting thing to note is that this view is even more heavily dominated by the color red, for the same reasons. Less densely populated counties tend to vote republican, while higher density, typically smaller counties tend to vote for democrats. As a result, the blue counties tend to be the smaller ones so blue is visually less represented than it should be based on vote totals. More than 75% of the land area is red, when looking at the map based on land areas, while shifting to the population view only about 46% of the map is red. Neither of these percentages is exactly correct because each county is colored fully red or blue and don’t take into account that some counties are won by a large percentage and some are essentially tied. However, the population number is certainly closer to reality as Trump won about 48.8% of the votes that went to either Trump or Clinton.

Instructions

This tool should be relatively straightforward to use. Just click around and play with it.
The map has a few different options for display:

  • Hide Circles – just shows the county map
  • Show land circles – where the area of the circle matches the area of the county itself, though obviously shaped like a circle. The counties are colored red or blue depending on whether Trump or Biden (in 2020) or Clinton (in 2016) won more votes in that county.
  • Show population circles – where the area of the circle matches the relative population of the county itself. More populated counties will grow larger while less populated counties will shrink. The counties are colored red or blue depending on whether Trump or Biden or Clinton won more votes in that county.
  • Selecting the No County Overlap checkbox will spread out all of the circles so you can see them all. The total displayed area of the county circles is the same in either land and population view, though if the circles are overlapping, you may see less total colors.
  • Selecting the Color by Margin checkbox will color the each county circle by the amount that a candidate won the county. If the vote margin is small, the county will be colored light blue or red, whereas if a county strongly favors one candidate, it will be colored darker red or blue.

Visualization notes

This was my second attempt at using d3 to generate visualizations. I typically use leaflet to do web-based mapping but I wanted the power of d3 which has functions for the circles to prevent overlapping. This map was inspired by Karim Douieb’s cool visualization of 2016 election results. I modified it in a number of different ways to try to make it more interactive and useful.

This visualization does not actually simulate the collisions between the circles on your browser. It is a bit computationally taxing and causes my computer fan to turn on after awhile. So instead I ran the simulation on my computer and recorded the coordinates for where each circle ended up for each category. Then your browser is simply using d3 transitions to shift positions and sizes of the circles between each of the maps, which is simpler, though with 3142 counties, it can still tax the computer occasionally.

Data and Tools
County level election data for 2016 is from MIT Election Lab. The 2020 county level data is downloaded from the New York Times county election data API and processed using a python script. Population data used is for 2018. The visualization was created using d3 javascript visualization library.




21 Comments »


21 Responses to US County Electoral Map – Land Area vs Population

  1. asdf wer says:

    if you color by margin & select population map, one thing stands out clearly, Village folks are dead sure about voting republican.

  2. jess romero says:

    It would be interesting to overlay the 2020 data with Covid19 data. Specifically, infection/vaccination rates from Jan 2020 to today.
    Possibly point your scraper to:
    https://covid19-projections.com/

  3. Thomas Richardson says:

    This is a very nice data display!

    I do have one comment/question regarding Alaska. Your map shows county equivalents (aka boroughs and census districts) for Alaska. However, the NY Times (also the MIT Election Lab data you linked) for Alaska are reported for State House Districts, which are different. Some districts overlap several boroughs. (Though MIT list “FIPS codes” for Alaska these are not the real census FIPS codes.) Given this, how are you imputing the election results for the boroughs?

  4. Tim Sample says:

    Interesting that Trump increased the land percentage from 2016.

    • RootPatrick says:

      Am I toggling wrong? When I click the land circle 2016, the Trump percentage = 76.7%, and when I toggle to 2020, it reads Trump, 74.4%, a 2.3% decrease. No?

  5. Yeah, that’s awesome. Interesting that only few circles (about 60 out of more than 3000) change their colour from 2016 to 2020. Until now I found only one circle which has changed from blue to red (Nassau County NY).

    Greatings from Switzerland

  6. N says:

    Great map! For the 2020 results from NYT, did you manually enter every single county or use some kind of scrapper? I do not see an option to download all the county data or even a single sheet with it on their site. Would love to know how you got that to use data for my research!

  7. Richard Siemon says:

    Love the graphic but as a physicist with a little mathematical background, I have been trying to understand what is happening with a “simple as possible” numerical graph. The county voting data provide unambiguous vote vs. population as you have utilized in the graphic. I would sure be interested nation wide in the relative size of Democratic votes to Republican votes (or the reciprocal doesn’t matter) plotted as a function of population. I took Pennsylvania (manually copying data from state web site) and plotted the ratio rD as a function of p. After playing around with Excel, I found the result that a log-log plot fits reasonably well the curve rD=r0 exp(p/p0), where r0 is the ratio of votes in small populations and p0=ln(1/rD) is the population where the Democrats overtake republicans as population grows. For Pennsylvania r0 is about 0.38 and p0 is about 300,000. The same two characteristics are obvious from the raw data, but maybe the curve fitting would be a way to quickly condense the raw data for the whole nation, and region by region? That is what I meant by “as simple as possible.”

  8. Almondolphin says:

    Any chance I could request a 2020 map (population circles) but using a color gradient from red-white-blue to reflect the margin of voter choice? I’d love to see how “red” or “blue” the map becomes when close elections wash out to white.

    • chris says:

      Just added this option, click the “Color by Margin” checkbox.

      The color ranges from Red (strongly R) to white (even) to Blue (strongly D).

  9. Doug Rice says:

    It would be awesome to see this map with purple for 47.5-52.5% results integrated into the visualization.

  10. Sam says:

    Hennepin County and Ramsey County in Minnesota are wrong! The margins for Trump vs Biden are reversed on this graphic

  11. Mike says:

    Something is wrong here. Hennepin County voted for Biden, as did the state of Minnesota, and by a pretty wide margin. Your map shows Hennepin County red.

  12. Sieneyen says:

    awesome viz. the percentages don’t seem to be updating when switching between 2016 and 2020

  13. Andrew Bishop says:

    Awesome work. Thanks.
    Is it possible to let the colored area sum up to area = U.S. geography, and then flow into the map, losing the circles and eliminating the grey space?
    The tiny circles and grey space around them still exaggerate the significance of small population/large acreage states.

  14. E says:

    Thank you for the visualization and providing your data sources 🙂

    This is exactly the type of viz I was wanting to make to examine as a factor in where I might want to live in the future.

  15. Quillen says:

    This is an amazing graphic to provide/share, thank you. You make data beautiful.

    One of my friends from Minneapolis says that she keeps seeing her area portrayed as red and can’t imagine a time it was ever anything but blue. She saw other maps showing her area as red, as well. Just for note in case it helps. 🙂

  16. Michael Mout says:

    It’s nice to see the population map by state, but it doesn’t reflect the national proportionately. In a tru national po;ulation map Montana and Wyoming would be little dots, smaller than rhode island. All the geographic maps over emphasized the red vote.

Leave a Reply

Your email address will not be published. Required fields are marked *