Skip to content

alxsoares/2016-us-election

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2016-presidential-election

This contains the code to clean and create the 2016 US Election dataset on Kaggle

It requires Python 3, and you can re-create the data release by running make all from the root directory.

sc-rep

nh-dem

Exploration Ideas

  • What candidates within the Republican party have results that are the most anti-correlated?
  • Which Republican candidate is Hillary Clinton most correlated with based on county voting patterns? What about Bernie Sanders?
  • What insights can you discover by mapping this data?

Do you have answers or other exploration ideas? Add your ideas to this forum post and share your insights through Kaggle Scripts!

Do you think that we should augment this dataset with more data sources? Submit a pull request to this repo, or let us know here!

Data Description

The 2016 US Election dataset contains several main files and folders at the moment. You may download the entire archive via the "Download Data" link at the top of the page, or interact with the data in Kaggle Scripts through the ../input directory.

  • primary_results.csv: main primary results file
    • state: state where the primary or caucus was held
    • state_abbreviation: two letter state abbreviation
    • county: county where the results come from
    • fips: FIPS county code
    • party: Democrat or Republican
    • candidate: name of the candidate
    • votes: number of votes the candidate received in the corresponding state and county (may be missing)
    • fraction_votes: fraction of votes the president received in the corresponding state, county, and primary
  • county_facts.csv: demographic data on counties from US census
  • county_facts_dictionary.csv: description of the columns in county_facts
  • database.sqlite: SQLite database containing the primary_results, county_facts, and county_facts_dictionary tables with identical data and schema
  • county_shapefiles: directory containing county shapefiles at three different resolutions for mapping

Original Data Sources

To consider adding

Notes

React command: var data=[]; for (i=0;i<$r.props.children.length;i++) { data.push($r.props.children[i].props);}; JSON.stringify(data)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 58.5%
  • Python 41.5%