An election board in Colorado has asked that an election-audit be conducted on a recent local congressional election. The following tasks include:
- Calculate the total number of votes,
- Obtain a completed list of all candidates who received votes,
- Caluculate total number of votes for each candidate,
- Calculate the percentage of votes each candidate received,
- And, based on popular vote, determine the winner of the election.
The total number of votes in this election was 369,711.
Provide a breakdown of the number of votes and the percentage of total votes for each county in the precinct.
Denver County had the most votes out of the three counties. It came in with 82.8% of votes counted in the district. The total number of votes was 306,055. Jefferson County came in second highest with 10.5% of all votes totaling 38,855. Finally, Arapahoe County had the lowest percentage of votes in the district with 6.7% of the votes and a county total of 24,801.
Denver County had the highest number of votes in the district.
Provide a breakdown of the number of votes and the percentage of the total votes each candidate received.
The candidate with the most votes in the election was Diana DeGette. She accounted for 73.8% of the votes with a total of 272,892 total votes. Charles Casper Stockham was the runner up with a total vote count of 85,213 which accounted for 23.0%. Raymon Anthony Doane came in last with 3.1%. He received 11,606 votes.
Which candidate won the election, what was their vote count, and what was their percentage of the total votes?
Diana DeGette won the election with 272,892 votes out of 369,711. That is 73.8% of all the votes in the district.
This script can be used in any election cycle. As shown, it can extract and calculate massive amounts of data and refine it in a very efficient way. Not only was this script used to find total votes by county and candidate, but it could also find the total votes within the district and counties. It can also calculate percentages which is extremely helpful in, not only elections themselves, but election polling as well. The script can be modified to include a larger portion of a state by expanding the county library. For example, if one wants to know how the entire northern region of Colorado voted, with the correct raw data, voting patterns can be found as a broader region as opposed to only a district. By adding variables to the names of the candidates, a commission could use this data to see trends in political party concentration. For example, by adding the party affiliation (Democrat, Republican, Independent) one could see how which part of a county, district, or state tends to vote.