Skip to content

TheUpshot/presidential-precinct-map-2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 

Repository files navigation

Presidential precinct data for the 2020 general election

The Upshot scraped and standardized precinct-level election results from around the country, and joined this tabular data to precinct GIS data to create a nationwide election map. This map does not have full coverage for every state: data availability and caveats for each state are listed below, and statistics about data coverage are available here. We are releasing this map's data for attributed re-use under the MIT license in this repository.

The GeoJSON dataset can be downloaded at: https://int.nyt.com/newsgraphics/elections/map-data/2020/national/precincts-with-results.geojson.gz

Properties on each precinct polygon:

  • GEOID: unique identifier for the precinct, formed from the five-digit county FIPS code followed by the precinct name/ID (eg, 30003-08 or 39091-WEST MANSFIELD)
  • votes_dem: votes received by Joseph Biden
  • votes_rep: votes received by Donald Trump
  • votes_total: total votes in the precinct, including for third-party candidates and write-ins
  • votes_per_sqkm: total votes divided by the area of the precinct, rounded to one decimal place
  • pct_dem_lead: (votes_dem - votes_rep) / (votes_total), rounded to one decimal place (eg, -21.3)

Due to licensing restrictions, we are unable to include the 2016 election results that appear in our interactive map.

Please contact dear.upshot@nytimes.com if you have any questions about data quality or sourcing, beyond the caveats we describe below.

General caveats

  • Where possible, we used official precinct boundaries provided by the states or counties, but in most cases these were not available and we generated boundaries ourselves, using L2 voter-file points to guess the precinct for each census block group; this results in generally accurate precinct boundaries, but can be rough in no- or very-low-population places like business parks or uninhabited rural land.
    • Because of this, spatially joining our precinct GeoJSON to other geographic datasets will most likely yield less-than-ideal output.
  • Some of the results we gathered are slightly incomplete:
    • A few states' data are unofficial, since the certified results hadn't been released at time of collection.
    • Wherever write-ins are not reported by the data source, our vote totals are marginally off.
    • A very small portion of the tabular precinct results (roughly 0.01%) could not be joined to the precinct boundaries, and thus these results are not present in the GeoJSON.
  • A few areas, such as rural Vermont, Hawaii, Nevada, and Nebraska, contain no voters, and those polygons are excluded from the GeoJSON.

State-by-state data availability and caveats

symbol meaning
have gathered data, no significant caveats
⚠️ have gathered data, but doesn't cover entire state or has other significant caveats
precinct data not usable

Note: One of the most common causes of precinct data being unusable is "countywide" tabulations. This occurs when a county reports, say, all of its absentee ballots together as a single row in its Excel download (instead of precinct-by-precinct); because we can't attribute those ballots to specific precincts, that means that all precincts in the county will be missing an indeterminite number of votes, and therefore can't be reliably mapped. In these cases, we drop the entire county from our GeoJSON.

  • AL: ❌ absentee and provisional results are reported countywide
  • AK: ❌ absentee, early, and provisional results are reported district-wide
  • AZ: ✅
  • AR: ⚠️ we could not generate or procure precinct maps for Jefferson County or Phillips County
  • CA: ✅
  • CO: ✅
  • CT: ⚠️ township-level results rather than precinct-level results
  • DE: ✅
  • DC: ✅
  • FL: ✅
  • GA: ✅
  • HI: ✅
  • ID: ⚠️ many counties report absentee votes countywide
  • IL: ✅
  • IN: ⚠️ state publishes machine-readable precinct results for only about half of counties
  • IA: ⚠️ Scott County does not provide machine-readable precinct-level data
  • KS: ✅
  • KY: ⚠️ only certain counties report results at the precinct level
  • LA: ❌ early and provisional results are reported countywide
  • ME: ⚠️ township-level results rather than precinct-level results
  • MD: ✅
  • MA: ✅
  • MI: ⚠️ data collection not yet complete
  • MN: ✅
  • MS: ✅
  • MO: ⚠️ almost all counties report absentee votes countywide
  • MT: ✅
  • NE: ✅
  • NV: ✅
  • NH: ⚠️ township-level results rather than precinct-level results
  • NJ: ⚠️ township-level results rather than precinct-level results
  • NM: ✅
  • NY: ✅
  • NC: ✅
  • ND: ✅
  • OH: ✅
  • OK: ⚠️ Tulsa County and Oklahoma County report absentee ballots countywide
  • OR: ✅
  • PA: ✅
  • RI: ⚠️ township-level results rather than precinct-level results
  • SC: ✅
  • SD: ⚠️ three counties report absentee ballots countywide, and seven counties report all votes countywide
  • TN: ⚠️ Davidson County reports absentee ballots countywide
  • TX: ✅
  • UT: ✅
  • VT: ⚠️ township-level results rather than precinct-level results
  • VA: ❌ provisional and absentee votes are reported countywide
  • WA: ✅
  • WV: ✅
  • WI: ✅
  • WY: ✅

Credits

About

The GeoJSON dataset behind our nationwide precinct map of the 2020 presidential general election

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •