Coder Social home page Coder Social logo

election_analysis's Introduction

Election_Analysis

Project Overview

A Colorado Board of Elections employee named Tom has given 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 each candidate received.
  4. Calculate the percentage of votes each candidate won.
  5. Determine the winner of the election based on popular vote.
  6. Determine the total number and percentage of votes of each county.
  7. Determine which county had the largest voter turnout.

Resources

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

Summary

The analysis of the election shows:

Total Votes: 369,711

Charles Casper Stockham: 23.0% (85,213)
Diana DeGette: 73.8% (272,892)
Raymon Anthony Doane: 3.1% (11,606)

Winner: Diana DeGette
Winning Vote Count: 272,892
Winning Percentage: 73.8%

Challenge Overview

The challenge required outputting the vote total and vote percentage for all counties involved in the election.

Challenge Summary

This script can be used in any election where multiple counties and multiple candidates are involved to track number of votes and the percentage of votes received for each candidate and from each county. In this report three candidates and three counties were counted, but more counties and candidates can be counted if needed. This script can be modified to track other indices such as age group, race, sex, etc.

County Votes:
Jefferson: 10.5% (38,855)
Denver: 82.8% (306,055)
Arapahoe: 6.7% (24,801)

Largest County Turnout: Denver

election_analysis's People

Contributors

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