Skip to content

Finding out voting information for each county using Python

Notifications You must be signed in to change notification settings

Deving789/Election_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Election_Analysis

Finding out voting information for each county using Python

#Purpose of the election audit

The purpose of this project is to find out which county is the largest based off of votes. In module 3 we learned how to read csv files in python and begin to run the data with our coding skills. The data file has 4 columns, we had to search through the one that had all of the candidates and figure out how many votes each candidate recieved. Once we figure out the total votes and percentage of the total that they had we wrote the results to a text file with a winner. In the module 3 challenge we are doing something similar but different. This time we will search through the counties column to figure out the total votes and percentage of each county to find which county is the largest.

#Election audit results #By County -After the code is finished we are able to find that there is a total of 369,711 votes between 3 counties. -Jefferson county had 10.5% of the vote with 38,855 total votes -Denver had 82.8% of the vote with 306,055 total ballots submitted -Arapahoe had 6.7% of the total vote with 24,801 ballots submitted -Denver had the most amount of votes in the county by commiting 82.8% of the ballots #By Candidate -Charles Casper Stockham(85,213/23%) -Diana DeGette(272,892/73.8%) -Raymon Anthony Doane(11,606/3.1%) -Diana DeGette won the election recieving 272,892 total votes which was 73.8% of the total votes submitted.

Screen Shot 2020-08-07 at 8 14 24 PM

#Election Audit Summary Seeing how our script is able to effectively find votes counts, percentage of votes won by each county and candidate it is safe to assume that we can even figure out what the percentages of each county voted for each candidate. We can do something like this by adding another if statement to under line 76 that will give us a breakdown showing what counties voted for who. This can be used for any future election because it gives us a great breakdown of counties or even states if the data was different.

Screen Shot 2020-08-07 at 8 04 22 PM

Releases

No releases published

Packages

 
 
 

Languages