We are assisting Tom, Colorado board of election employee to perform an Audit of the tabulated results for U.S. congressional precinct in Colorado.
The totals and percentage of votes corresponding to all candidates and winner will be reported, reviewing the data from various voting methods as Mail-in ballot, punch cards and direct recording electronic.
At the end, the vote count report will certify the results of this u.s congressional race.
‣ Jefferson: 38,855 votes with 10.5%
‣ Denver: 306,055 votes with 82.8%
‣ Arapahoe: 24,801 votes with 6.7%
for county_name in county_votes:
CountysVotes = county_votes.get(county_name)
CountysVote_percentage = float(CountysVotes) / float(total_CountysVotes) * 100
counties_results = (
f"{county_name}: {CountysVote_percentage:.1f}% ({CountysVotes:,})\n")
print(counties_results)
‣ Charles Casper Stockham: 23.0% with 85,213 votes
‣ Diana DeGette: 73.8% with 272,892 votes
‣ Raymon Anthony Doane: 3.1% with 11,606 votes
for candidate_name in candidate_votes:
votes = candidate_votes.get(candidate_name)
vote_percentage = float(votes) / float(total_votes) * 100
candidate_results = (
f"{candidate_name}: {vote_percentage:.1f}% ({votes:,})\n")
print(candidate_results)
‣ Diana DeGette
272,892 votes
73.8%
The audit of the tabulated results for the U.S. congressional precinct in Colorado worked successfully by reviewing the data set coming from the different voting methods and providing detailed votes counts per candidate and counties. The report certified the mentioned results of the U.S Congressional race.
This script can easily be modified to be used for other elections audit processes. It automates the analysis process and provides a detailed report of the results by going through the whole data set and extract from the same date. These results can be analyzed from different perspectives.
- The path of the CSV can be modified to analyze a different dataset.
- Variables can be modified according to the new dataset data
- Changing the printing statements to be relevant and precise to the new election process.