[OC] Density vs. outcome for 146,000 precincts in 2020

Posted by wannagowest

6 comments
  1. Source: New York Times’ [The Upshot](https://www.nytimes.com/interactive/2021/upshot/2020-election-map.html)

    Tools: Python, Pandas, Seaborn, Lucidchart

    Methods: I downloaded the precinct-level data from the The New York Times and (boxen-)plotted the relationship between density (the number of voters per square kilometer) and the partisan preference in the 2020 presidential election in the US. Examples of precincts with a range of voter density are displayed on the right.

  2. Very nice. The individual rectangles are deciles, I assume?

    I wonder what this would look like if you made it a 2D histogram (x-axis is precinct density, y-axis is mean or median precinct household income, z-axis is mean or median party preference, either as bin height or a colormap or both). My hunch is that the slight curve to the right at extreme population density is driven by extremely wealthy households, but it would be interesting to see.

  3. There is nowhere in Texas that is even close to a population density of 42,500 persons/sq km.

  4. Really interesting, thanks! Only one aspect of the design I don’t follow — why are the tails colored the way they are (e.g., small tails to the left of the blue rectangles are a lighter not darker blue, long tails to the left of the red rectangles remain a light red where they recommend precincts that vote primarily for Democrats)?

    Very compelling stuff though.

  5. so basically democrats get along with everyone and republicans can’t even stand other republicans.

Comments are closed.