Coder Social home page Coder Social logo

election_analysis's Introduction

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

election_analysis's People

Contributors

deving789 avatar

Watchers

 avatar

Forkers

tw99ch 293264

election_analysis's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.