For this project the election results for 3 counties: Denver, Arapahoe, and Jefferson. Every vote was registered in an Excel file. Using Python to automate the election result count and obtain a visual summary of all relevant data insights to facilitate the election commission's work.
The characteristics of the data analysis will be reviewed below:
A total of 369,711 votes were cast for the congressional election.
Counties Breakdown
The county of Jefferson had 10.5% of the total votes with 38,855 votes emitted.
The county of Denver had 82.8% of the total votes with 306,055 votes emitted.
The county of Arapahoe had 6.7% of the total votes with 11,606 votes emitted.
The county of Denver had the largest number of votes (82.8% of the total votes).
Candidates Breakdown
Candidate Charles Casper Stockham obtained 23.0% of all the votes (85,213 votes). Candidate Diana DeGette obtained 73.8% of all the votes (272,892 votes). Candidate Raymon Anthony Doane obtained 3.1% of all the votes (11,606 votes).
Winner Summary
Candidate Diana DeGette was the winner of the congressional election with a total vote count of 272,892 representing 73.8% of all emitted votes.
The Python script simplifies the election analysis and is adaptable for variable input. It automatically iterates through data sources with different counties and candidates, extracting information to generate summaries. The code can be reused with minimal to no refactoring for datasets with a similar format. For improved usability, additional checking points for the analyst can be configured by printing lists and dictionaries used to confirm proper information assessment.
- Reccomendations:
Adding more checkpoints by printing lists and dictionaries would facilitate following the analysis, ensuring auditing of critical information and possibly spotting errors given the sensitivity of the information.