GithubHelp home page GithubHelp logo

canvassohio's Introduction

This project uses Ohio voter registration and data from the US Census Bureau to determine the precincts within a state congressional district which have a large number of likely 2020 voters. The goal is to suggest regions for political canvassing. This project was made for the Insight Data Science program.

The State of Ohio publishes state-wide voter registration files containing lists of registered voters, including their name, age, date of registration, party affiliation, voting history, and which districts and precincts they are registered to vote in. The US Census Burea provides zip-code-level demographic information. I used this information to predict whether someone would vote in the 2020 election. From the Ohio voter files I look at age, (#elections voted in)/(#elections eligible to vote in), and whether someone voted in the previous presidential year election. From the census bureau I looked at zip-code-level education information: the percentage of people who had high school diplomas, and the percentage who had a bachelor's degree or higher.

I used these features to train a logistic regression. I used 60% of the data as a training set, and trained using the 2016 election as the training election. I used the 2000 to 2016 time window for the election participation fraction in the training set, and then moved the time window to 2004 to 2020 when running the prediction.

The prediction was used to select the three precincts inside of the state congressional district that had the most likely voters. The app, located at https://canvassohio.herokuapp.com/, displays the precincts on a map of the district, and lists them with their party lean. The party lean is determined from the likely voters who are registered with a particular party. Of the voters who are registered with a party, if more than 52.5% are registered Republican or Libertarian, the precinct is labeled "lean right". If more than 52.5% are registered Democrat or Green, it is labeled "lean left". If the margin is smaller than that, the label is "lean neutral".

The app was implemented in Flask and hosted using Heroku.

Data courtesy of the Secretary of State of Ohio and the US Census Bureau. District shape files from census.gov.

Precinct shapefiles courtesy of the Metric Geometry and Gerrymandering Group. Find the github repository at https://github.com/mggg/ohio-precincts.

canvassohio's People

Contributors

looperkr avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.