A Board of Elections employee has given you the following tasks to audit the local election.
- Calculate the total votes
- Calculate the County Votes
- Calculate large County Turnout
- Calculate the percentage and number of over for each candidate
- Determine the winner of the election based on the popular vote.
- Data Source: election_results.csv
- Python 3.8
-How many votes were cast in this congressional election?
Total Votes
-Provide a breakdown of the number of votes and the percentage of total votes for each county in the precinct.
County Votes
-Which county had the largest number of votes?
Largest number turnout
-Provide a breakdown of the number of votes and the percentage of the total votes each candidate received.
Breakdown of the votes and percentage of candidates
-Which candidate won the election, what was their vote count, and what was their percentage of the total votes?
breakdown of who won, their vote count, and percentage of total votes
This script can be used in a similar format by giving three columns of ID, county, and candidates in different locations or years.
It can also be used to determine who lost this election, based on the number of votes within this county.