Kenner82 / Election_Audit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Election Analysis

Project Overview

A Colorado Board of Elections employee provided 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 votes.
  6. Determine the voter turnout by county.
  7. Calculate the percentage of votes from each county out of the total votes.
  8. Determine the county with the highest voter turnout.

Election-Audit Results

Election_Analysis_Results

Using repetition statements, conditional statements with logical operators, and print statements, we were able to calculate the following:

  • 369,711 total votes were cast in the election
  • County Breakdown:
    • Jeffereson County was responsible for 10.5% of the votes with 38,855
    • Denver County provided 82.8% of the total votes with 306,055
    • Arapahoe County came in at 6.7% of the total votes with 24,801
    • Denver County had the largest number of votes
  • Candidate Breakdown:
    • Charles Casper Stockham received 23.0% of the votes with 85,213
    • Diana DeGette got 73.8% of the total votes with 272,892
    • Raymon Anthony Doane had 3.1% of the votes with 11,606
    • Diane DeGette won the election, receiving 272,892 votes (73.8% of the total votes)

Summary

This code can easily be reconfigured to work for any kind of election.

Demographic Breakdowns

In this analysis we broke down the voting results by candidate and county, but we could also delve into voter turnout by any metric that is collected (e.g., by gender, socio-economic status, language spoken, etc.). This could help candidates evaluate how they performed with different demographics, to determine which outreach programs to focus on in the future or how their previous actions informed voter turnout amongst various groups.

Ballot Measures

This code could also be used to determine the factors influencing other kinds of elections, such as voting turnout and demographic breakdown for ballot measures. Knowing your kind and level of public support can inform decisions regarding advertising methods and budgeting, copyediting, and lobbying measures.

About

License:MIT License


Languages

Language:Python 100.0%