Coder Social home page Coder Social logo

election_analysis's Introduction

Election Analysis

Project Overview

Analysis for an election audit of the Colorado Board of Elections for a recent local congressional election, to determine the winning candidate and the largest voter turnout based on county. The analysis required the follwing data to be presented:

  1. The total number of votes cast.
  2. The list of all candidates in the election.
  3. The total number of votes received per candidate.
  4. The total number of votes per county.
  5. The percentage of votes for each candidate.
  6. The winner of the election.
  7. The county with the largest voter turnout.

Election Audit Results

  • After conducting the analysis, a total of 369,711 votes were cast during this congressional election from the counties in the precinct, those being Denver, Jefferson, and Arapahoe. As can be referenced on the image below, the breakdown of the total votes per county lists Denver, the county with the largest number of votes, with an 82.8% of the popular vote achieving a total of 306,055 votes. The county of Jefferson received a 10.5% of the popular vote with 38,855 votes while Arapahoe received 6.7% of the popular vote with a total of 24,801 votes.

    alt text

  • The running candidates and the results per candidate can are listed below and can also be referenced on the screenshot below:

    • Diana DeGette received 73.8% of the vote which is 272,892 votes, was the winner of the election.
    • Charles Casper Stockham received 23.0% of the vote which are 85,213 votes.
    • Raymon Anthony Doane received 3.1% of the vote which are 11,606 votes.

    alt text

Election Audit Summary

The code developed to run this analysis is a great and efficient tool for the election commission to analyze data sets of big scales, like this audit, the code is extremely customizable and can be easily run to analyze any data set by making small adjustments. The script can be applied to any electoral tabular dataset simply by changing the source of the data on the code itself, as can be seen in the screenshot below.ย 

alt text

As can be seen in the following image, it's very easy to manipulate the script to be run for any sort of election, be it a congressional or even a federal election, as it was designed to pull the candidates from the dataset itself. On the second screenshot, it can also be referenced how the input for the county could be switched to a city, or even a state and the code can be easily modified to gather this data on its own as opposed to being manually entered shows how flexible and usable this code can be for the commission.

Candidate Field easily modifiable alt text

County can be switched to modify the target regions alt text

Resources

Data Source: election_results.csv

Software: Python 3.6.1, Visual Studio Code, 1.38.1

election_analysis's People

Contributors

karenjakins 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.