Coder Social home page Coder Social logo

trump-voter-stimulus-model's Introduction

trump-voter-stimulus-model

Model to estimate the fraction of Trump voters in Appalachia that received stimulus money.

Data

Necessary data:

  1. CCES20_Common_OUTPUT.csv - 2020 CES (formerly CCES) results. Can be found here.
  2. potus_2020_county.csv - 2020 Presidential Election results (at county level). As published by the MIT Election Data + Science Lab, can be found here.
  3. additional_state_data.csv - region and average income (normalized) is taken from census. State PVI is taken from wikipedia.
  4. arc_counties.csv - List of counties belonging to Appalachia, as defined by the Appalachian Regional Commission.
  5. voterfile_appalachia_individual_data.csv - individual level voterfile information from every registered voter in Appalachia (from L2). Including gender, age and ethnicity, as well as state and county fips. Also whether they voted in 2020.
  6. voterfile_appalachia_household_data.csv - Household level voterfile information for every registered voter in Appalachia (from L2). Including household income, household size, state and county fips.

Running

  1. 01_model_trump_vote.R - generate model to estimate individual level likelihood of supporting Donald Trump based on 2020 CES.
  2. 02_apply_model_to_voterfile.R - apply the model the voterfile
  3. 03_stimulus_in_trump_areas_voterfile.R - uses model probabilities to compute estimated number of Trump voters that received stimulus (based on L2 income).

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.