A Colorado Board of Elections employee has given you the following tasks to complete the election audit of a recent local congressional election.
- Calculate the total number of votes cast.
- Get a complete list of candidates who recieved votes.
- Calculate the total number of votes each candidate recieved.
- Calculate the percentage of votes each candidate won.
- Determine the winner of the election based on popular vote.
- Calculate county votes for each county.
- Calculate which county had the largest turnout.
- Data Source: election results.csv
- Software: Python 3.6.1, Visual Studio Code, 1.38.1
The analysis of the election show that:
- There were 369,711 votes cast in the election.
- The candidates were:
- Charles Casper Stockham
- Diana Degett
- Raymon Anthony Doane
- The candidate results were:
- Charles Casper Stockham received 23.0% of the vote and 85,213 number of votes.
- Diana DeGette received 73.8% of the vote and 272,892 number of votes.
- Raymon Anthony Doane received 3.1% of the vote and 11,606 number of votes.
- The winner of the election was:
- Diana DeGette recieved 73.8% of the vote and 272,892 number of votes.
- County Votes:
This script quickly identifies the each candidate's vote count, county vote counts and the winner. It would be important to identify the number of people eligible to vote to assess voter turnout. The percentages could be misleading based on the county population. Another modification could be the candidates political affiliation (republican, democrat or independent) or age group of voters.

