Code Monkey home page Code Monkey logo

election_analysis's Introduction

Election_Analysis

Project Overview

The purpose of this project was to provide an election audit for the Colorado Board of Elections.

  1. Calculate the total number of votes casted.
  2. Get a complete list of candidates who received votes.
  3. Get the county who had the highest voter turnout.
  4. Calculate the total number of votes each candidate received.
  5. Calculate the percentage of votes each candidate won.
  6. Determine the winner of the election based on popular vote.

Resources

Data Source: election_results.csv Software: Python 3.7.6, Visual Studio Code

Results

The analysis of the election show that:

  • There was 379,111 votes cast in the election.

    • The candidates were:
    • Charles Casper Stockham
    • Diana DeGette
    • Raymon Anthony Doane
  • The candidate results were:

    • Charles Casper Stockham received 23% of the total vote with 85,213 votes.
    • Diana DeGette received 82.8% of the total vote with 272,892 votes.
    • Raymon Anthony Doane received 3.1% of the total vote with 11,606 votes.
    • TOTAL VOTES= 369,711
  • The winner of the election was:

    • Candidate Diana DeGette, who recieved 82.8% of the total vote with 272,892 votes.
  • The counties results:

    • Jefferson county had 10.5% of the total vote with 38,855 votes.
    • Denver county had 82.8% of the total vote with 306,055 votes.
    • Arapahoe county had 6.7% of the total vote with 24,801 votes.
    • TOTAL VOTES= 369,711
  • Largest county was Denver 306,055 votes.

Screen Shot 2020-08-02 at 6 36 11 PM

Challenge Summary

This script can me modified for different future purposes by having it run multiple tasks to get a deeper understadning if someone was a campaign manager for a candidate. The first example is that we could look into cities and not just counties. We can go into a more in depth look at which cities hold a significant position in determining if a candidate will the winner of the election. Obviously we would have to gather this data and input it into our election_results.csv file then basically do the same concept as we did for our counties part in this script. The second example on how we can continue and modify this script for future use is that we can see demographics among the different candidates. Age, sex, and ethnicity are three that are significant and in the interest of the candidates to understand which group they need to appeal to more. As stated before, we need to add these inputs into the election_results.csv file in order to begin the script for it. These two examples can be used for future puposes for candidates to see how to win a future election.

election_analysis's People

Contributors

bsamimi25 avatar

Stargazers

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