Use the power of Python to automate the vote-counting process for local election.
A Colorado board of elections Employee has requested data to submit the election audit results for the local congressional election.
1.Total number of votes cast 2.A complete list of candidates who received votes 3.Percentage of votes each candidate won 4.Total number of votes each candidate received 5.The winner of the election basedon the popular vote 6.Calculate the percentage of votes from each county out of the total. 7.Determine the county with the highest turnout. 8.The voter turnout for each county
- Data sources: Election_results.csv
- Software: python 3.6.1, Visual Studio code,1.38.1
- There were 369,711 votes cast in the Election
- Charles Casper Stockham achieved 23.0% of the vote, for a total of 85,213 votes
- Diana DeGette brought about 73.8% of the vote, for a total of 272,892 votes
- Raymon Anthony Doane concluded 3.1% of the votes for a total of 11,606% votes
- Charles Casper
- Diana DeGette
- Rayon Anthony Doane
- Denver is the largest turnout county of all, which produced 82.8% of voters, for a total of 306,055.
- Jefferson carried out 10.5% of voters, for a total of 38,855 voters
- Denver achieved 82.8% of voters, for a total of 306,055 voters
- Arapahoe produced 6.7% of voters, for a total of 24,801 voters
- Diana DeGette won the election, Her vote count ; 272,892 and her percrntage is 73.8%
- Modifying the script to achieve turnout results by county is just one of the minor accommodating to the code that can disclose critical data. For example; By using an if-statement we can dive deeper to determine what percentage of each county voted for each candidate and also if this were a federal election, we can use the same script and change the county to state.