tonmcg/US_County_Level_Election_Results_08-20
United States General Election Presidential Results by County from 2008 to 2016
repo name | tonmcg/US_County_Level_Election_Results_08-20 |
repo link | https://github.com/tonmcg/US_County_Level_Election_Results_08-20 |
homepage | |
language | Jupyter Notebook |
size (curr.) | 2899 kB |
stars (curr.) | 247 |
created | 2016-11-11 |
license | |
United States General Election Presidential Results by County from 2008 to 2020
Presidential election results for 2008, 2012, 2016, and 2020 from The Guardian, townhall.com, Fox News, Politico, and the New York Times.
2008 election results at the county-level compiled by GitHub user @wboykinm.
2012 election results at the county-level are taken from results published in an Excel file by the Guardian.
2016 election results at the county-level are scraped from results published by Townhall.com. Their well-formatted county-level result tables for the 2016 presidential general election makes it easy for a web scraper like beautifulsoup to capture results.
2020 election results at the county-level are scraped from results published by from Fox News, Politico, and the New York Times.
Idea for 2012 election results from tweet to John A Guerra Gomez. Idea for 2016 election results from tweet to DJ Patil
To run
Place in your favorite iPython / Jupyter notebook environment.
If you don’t have one, get Docker and use:
./run-notebook.sh
in a shell based environment. Or open up the shell command and issue the docker command in a Windows environment.