Giter Club home page Giter Club logo

election_analysis's Introduction

Election_Analysis

Project Overview

A Colorado Board of Elections employee assigned the following tasks to complete the election audit of a recent local congressional election.

  1. Calculate the total number of votes cast.
  2. Get a complete list of candidates who received votes.
  3. Calculate the total number of votes for each candidate received.
  4. Calculate the percentage of votes each candidate won.
  5. Determine the winner of the election based on popular vote.
  6. Calculate the voter turnout for each county.
  7. Calculate the percentage of votes from each county out of the total.
  8. Determine the county with the highest turnout.

Resources

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

Summary

The analysis of the election shows that:

  • There were 369,711 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.0% of the vote, for a total of 85,213 votes. Diana DeGette received 73.8% of the vote, for a total of 272,892 votes. Raymon Anthony Doane received 3.1% of the vote, for a total of 11,606 votes.

  • The winner of the election was:

    Diana DeGette, who received 73.8% of the vote for a total of 272,892 votes.

  • The voter turnout for each county was:

    Jefferson produced 10.5% of voters, for a total of 38,855 voters. Denver produced 82.8% of voters, for a total of 306,055 voters. Arapahoe produced 6.7% of voters, for a total of 24,801 voters.

  • The county with the largest voter turnout was:

    Denver, which produced 82.8% of voters, for a total of 306,055 voters.

result

Election-Audit Summary

  • Expanding the Election Audit to include voter turnout by county with candidates results has been a great way to take advantage of the convenience a script provides.

  • The added insight can be a guide for future election performance, so that you may properly allocate resources where turnout is low or demographics are hard to reach.

  • A little time invested into customizing the script can provide on-demand analysis for years to come.

  • Modifying the script to produce turnout results by county is just one of many ways that minor adjustments to the code can reveal critical data. For example, we could also dive deeper and determine what percentage of each county voted for each candidate by adding an if-statement to the code. These type of Decision Statements are how the code runs calculations and all we've done is provide it with a data file.

election_analysis's People

Stargazers

Harprit K Chohan avatar

Watchers

Harprit K Chohan 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.