Git Product home page Git Product logo

election-analysis's Introduction

Election-Analysis

Overview of Election Audit

At the beginning of the module, I was asked to find the total votes of the election, each candidate's votes, and their percentage of votes. Finally, the winner would be the person having the most votes. However, now I have to figure out the vote turnover for each county and their percentages while finding the highest among them. All of this is possible by reading the csv file and writing it inside another txt file.

Election-Audit Results

  • How many votes were cast in this congressional election? The total votes for this election are 369,711 votes. Capture.jpg
  • Provide a breakdown of the number of votes and the percentage of total votes for each county in the precinct. The three counties' number of votes and percentages are shown below.

fds.jpg

  • Which county had the largest number of votes? Denver is the county with the highest number of votes. fsdcx.jpg

  • Provide a breakdown of the number of votes and the percentage of the total votes each candidate received. The three candidates' votes and their respective percentages are depicted in the image below. czx.jpg

  • Which candidate won the election, what was their vote count, and their percentage of the total votes? Diana won the election, and her vote count and the percentage are shown in the image below.

ccc.jpg

Election-Audit Summary

Some changes must be implemented to apply this python file for other elections. The first modification is to change the new csv file's path and change the text file's path that we are writing the new results. The second modification is to change the index of the row that we want to read based on the initial csv. We used the [2] index to retrieve the candidate's name in our challenge.

election-analysis's People

Contributors

sohrabrezaei avatar

Watchers

 avatar

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.