OSU Module 3 Python
Complete audit of a Colorado election for a recent congressional seat.
- Calculate total number of votes.
- Get a complete list of candidates who received votes.
- Calculate the total number of votes for each candidate and each county.
- Calculate the percentages for each candidate and each county.
- Determine the winner of the election based on the popular vote and the county with the highest voter turnout.
- Data Source: election_results.csv
- Software: Python 3.8.8, PyCharm 2021.3 (Community Edition)
- Jefferson: 10.5% (38,855)
- Denver: 82.8% (306,055) ๐
- Arapahoe: 6.7% (24,801)
The purpose of the election analysis audit was to process the results of the election without having to tabulate by hand. Results and summary were provided in one readable and one portable format.
This code can be used to tabulate election results for any jurisdiction. Modifications might include the types of files the election board is reading from and writing to. Modifications could be made to include a breakdown of candidate results per county. Voter turnout could be further calculated if population, voter registration, and eligible voters information were provided.