Giter VIP home page Giter VIP logo

election-data's People

Contributors

widal001 avatar

Watchers

 avatar  avatar

election-data's Issues

Dataset Cleanup

Summary

Clean the input datasets to prepare them for exploratory analysis

To Do

CIean input datasets

  • Drop everything but the following columns:
    • year
    • state
    • state_po
    • office
    • district
    • candidate
    • party
    • candidatevotes
    • totalvotes
  • Convert party names to lowercase and condense to the following categories:
    • democrat
    • republican
    • third-party
  • Calculate vote percentage by party

Create a set of outcomes dataframes

  • pres_outcome with state and year as the unique composite key
  • house_outcome with state, district, and year as the unique composite key
  • senate_outcome with state and year as the unique composite key
  • Calculate the following additional columns for each outcomes data frame:
    • win_party - which party won the district/state for that election
    • win_percent - the percentage of the vote with which that candidate won the district/state
    • win_count - the number of votes with which that candidate won the district/state
    • win_margin_percent - the percentage point margin by which the candidate won the district
    • win_margin_count - the vote count margin by which the candidate won the district
    • dem_percent - percentage of the vote that went to the democratic candidate
    • gop_percent - percentage of the vote that went to the republican candidate

Exploratory Analysis

Sumary

Do some basic exploration of the dataset in a jupyter notebook, guided by the questions below.

Exploratory Questions

  • How has the vote margin between Democrats and Republicans changed over time in each state?
  • What is the relationship between Senate, House, and Presidential outcomes in each state?
  • What is the relationship between population change in each state and the vote margin between Democrats and Republicans?
  • What is the relationship among voting outcomes of neighboring states (and neighboring districts within states)? Does it change over time?

Project Set Up

Summary

Buildout the basic project structure

To Do

  • ReadMe
    • Overview
    • Getting started
    • Contributing
  • Testing framework
  • GitHub Setup
    • Project Setup
    • Issue Templates
    • PR template

Resources

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.