[
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 The Upshot\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Presidential precinct data for the 2020 general election\n\nThe 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](https://int.nyt.com/newsgraphics/elections/map-data/2020/national/precincts-with-results-statistics.json). We are releasing this map's data for attributed re-use under the MIT license in this repository.\n\nThe GeoJSON dataset can be downloaded at: https://int.nyt.com/newsgraphics/elections/map-data/2020/national/precincts-with-results.geojson.gz\n\nProperties on each precinct polygon:\n\n- `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`)\n- `votes_dem`: votes received by Joseph Biden\n- `votes_rep`: votes received by Donald Trump\n- `votes_total`: total votes in the precinct, including for third-party candidates and write-ins\n- `votes_per_sqkm`: total votes divided by the area of the precinct, rounded to one decimal place\n- `pct_dem_lead`: `(votes_dem - votes_rep) / (votes_total)`, rounded to one decimal place (eg, `-21.3`)\n\n_Due to licensing restrictions, we are unable to include the 2016 election results that appear in our interactive map._\n\nPlease contact dear.upshot@nytimes.com if you have any questions about data quality or sourcing, beyond the caveats we describe below.\n\n## General caveats\n\n- 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.\n  - Because of this, spatially joining our precinct GeoJSON to other geographic datasets will most likely yield less-than-ideal output.\n- Some of the results we gathered are slightly incomplete:\n  - A few states' data are unofficial, since the certified results hadn't been released at time of collection.\n  - Wherever write-ins are not reported by the data source, our vote totals are marginally off.\n  - 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.\n- A few areas, such as rural Vermont, Hawaii, Nevada, and Nebraska, contain no voters, and those polygons are excluded from the GeoJSON.\n\n## State-by-state data availability and caveats\n\n|symbol|meaning|\n|:----:|:------|\n|✅|have gathered data, no significant caveats|\n|⚠️|have gathered data, but doesn't cover entire state or has other significant caveats|\n|❌|precinct data not usable|\n\nNote: 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.\n\n- [`AL`](https://www.sos.alabama.gov/alabama-votes/voter/election-data): ❌ absentee and provisional results are reported countywide\n- [`AK`](https://www.elections.alaska.gov/results/20GENR/index.php): ❌ absentee, early, and provisional results are reported district-wide\n- [`AZ`](https://azsos.gov/2020-election-information): ✅\n- [`AR`](https://results.enr.clarityelections.com/AR/106124): ⚠️ we could not generate or procure precinct maps for Jefferson County or Phillips County\n- [`CA`](https://statewidedatabase.org/d10/g20.html): ✅\n- [`CO`](https://results.enr.clarityelections.com/CO/105975): ✅\n- `CT`: ⚠️ township-level results rather than precinct-level results\n- [`DE`](https://elections.delaware.gov/results/html/index.shtml?electionId=PR2020): ✅\n- [`DC`](https://electionresults.dcboe.org/election_results/2020-General-Election): ✅\n- [`FL`](https://dos.myflorida.com/elections/data-statistics/elections-data/precinct-level-election-results/): ✅\n- [`GA`](https://results.enr.clarityelections.com/GA/105369): ✅\n- [`HI`](https://elections.hawaii.gov/election-results/): ✅\n- [`ID`](https://sos.idaho.gov/elections-division/election-results/): ⚠️ many counties report absentee votes countywide\n- [`IL`](https://www.elections.il.gov/ElectionOperations/ElectionVoteTotalsPrecinct.aspx?ID=8ehQy1Itjqo%3d&T=637465690113438072): ✅\n- [`IN`](https://enr.indianavoters.in.gov/site/index.html): ⚠️ state publishes machine-readable precinct results for only about half of counties\n- [`IA`](https://sos.iowa.gov/elections/results/precinctvotetotals2020general.html): ⚠️ Scott County does not provide machine-readable precinct-level data\n- [`KS`](https://sos.ks.gov/elections/elections-statistics.html): ✅\n- [`KY`](https://results.enr.clarityelections.com/KY/106379): ⚠️ only certain counties report results at the precinct level\n- [`LA`](https://voterportal.sos.la.gov/graphical): ❌ early and provisional results are reported countywide\n- `ME`: ⚠️ township-level results rather than precinct-level results\n- [`MD`](https://elections.maryland.gov/elections/2020/election_data/index.html): ✅\n- [`MA`](https://electionstats.state.ma.us/elections/view/140751/): ✅\n- [`MI`](https://github.com/openelections/openelections-data-mi/tree/master/2020): ⚠️ data collection not yet complete\n- [`MN`](https://www.sos.state.mn.us/elections-voting/election-results/2020/2020-general-election-results/2020-precinct-results-spreadsheet/): ✅\n- [`MS`](https://www.sos.ms.gov/Elections-Voting/Pages/2020-General-Election.aspx): ✅\n- [`MO`](https://github.com/openelections/openelections-sources-mo/blob/master/2020/general/Final%20Precinct%20data%202020%20-%20amendments%20on%20separate%20tab.xlsx): ⚠️ almost all counties report absentee votes countywide\n- [`MT`](https://electionresults.mt.gov): ✅\n- [`NE`](https://electionresults.nebraska.gov/resultsSW.aspx?text=Race&type=PRS&map=CTY): ✅\n- [`NV`](https://www.nvsos.gov/sos/elections/election-information/precinct-level-results): ✅\n- `NH`: ⚠️ township-level results rather than precinct-level results\n- [`NJ`](https://www.nj.gov/state/elections/election-information-2020.shtml#general): ⚠️ township-level results rather than precinct-level results\n- [`NM`](https://electionresults.sos.state.nm.us): ✅\n- `NY`: ✅\n- [`NC`](https://www.ncsbe.gov/results-data/election-results/historical-election-results-data#precinct-sorted): ✅\n- [`ND`](https://results.sos.nd.gov/Default.aspx?map=Cty): ✅\n- [`OH`](https://www.ohiosos.gov/elections/election-results-and-data/2020/): ✅\n- [`OK`](https://results.okelections.us/OKER/?elecDate=20201103): ⚠️ Tulsa County and Oklahoma County report absentee ballots countywide\n- [`OR`](https://github.com/openelections/openelections-data-or/tree/master/2020): ✅\n- [`PA`](https://github.com/openelections/openelections-data-pa/tree/master/2020): ✅\n- `RI`: ⚠️ township-level results rather than precinct-level results\n- [`SC`](https://results.enr.clarityelections.com/SC/106502): ✅\n- [`SD`](http://electionresults.sd.gov/resultsSW.aspx?type=SWR&map=CTY): ⚠️ three counties report absentee ballots countywide, and seven counties report all votes countywide\n- [`TN`](https://sos.tn.gov/elections/results#2020): ⚠️ Davidson County reports absentee ballots countywide\n- [`TX`](https://data.capitol.texas.gov/dataset/2020_general/resource/b7fe3d1b-fbb1-40c8-b4d2-b86462e0a740): ✅\n- [`UT`](https://github.com/openelections/openelections-data-ut/tree/master/2020): ✅\n- `VT`: ⚠️ township-level results rather than precinct-level results\n- [`VA`](https://results.elections.virginia.gov/vaelections/2020%20November%20General/Site/Presidential.html): ❌ provisional and absentee votes are reported countywide\n- [`WA`](https://results.vote.wa.gov/results/20201103/export.html): ✅\n- [`WV`](https://results.enr.clarityelections.com/WV/106210): ✅\n- [`WI`](https://elections.wi.gov/elections-voting/results/2020/fall-general): ✅\n- [`WY`](https://sos.wyo.gov/Elections/Docs/2020/2020GeneralResults.aspx): ✅\n\n## Credits\n\n- [Alice Park](https://github.com/umalice) and [Miles Watkins](https://github.com/mileswwatkins) compiled the precinct results, manually joined them to the precinct boundries, and built the data processing pipeline\n- [Derek Willis](https://github.com/dwillis) and [Open Elections](http://openelections.net) aggregated and extracted vote counts from PDFs in Michigan, Mississippi, Oregon, Pennsylvania, and Utah, and provided raw data for Missouri\n- [Benjamin Rosenblatt](https://twitter.com/BenJ_Rosenblatt) collected results and boundaries for New York State\n- [The Voting and Election Science Team](http://www.electproject.org/home/precinct_data) collected results and boundaries for Kansas\n- [Charlie Smart](https://www.nytimes.com/by/charlie-smart) provided geospatial technical support\n- [Rachel Shorey](https://www.nytimes.com/by/rachel-shorey) and [Matthew Bloch](https://www.nytimes.com/by/matthew-bloch) calculated the precinct boundaries wherever official GIS files weren't available\n- [Amanda Cox](https://www.nytimes.com/by/amanda-cox) and [Kevin Quealy](https://www.nytimes.com/by/kevin-quealy) provided editorial guidance\n- Additional scraping work by Rachel Shorey, [Quoctrung Bui](https://www.nytimes.com/by/quoctrung-bui), [Thu Trinh](https://github.com/trinhathu), and [Ben Smithgall](https://github.com/bsmithgall)\n- [Don Johnson](https://twitter.com/htmldon) provided assistance matching Tennessee's precinct boundaries\n"
  }
]