Skip to content

In this analysis, I wrote a Python script that generates a vote count per candidate and per county and creates a report for U.S. congressional race in a Colorado precinct.

Notifications You must be signed in to change notification settings

namu12345/Election_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Election_Analysis:

The Election analysis is done with Python programming using Visual Studio Code. The data used is of Colorado Local congressional Election.

Project Overview :

In this project I am helping Tom - Colorado Board of Election employee to complete the election audit of a recent local congressional election. Alongwith Tom My task here will be to report :

  • Total # of Votes Cast
  • Get the list of candidates who received votes.
  • Total # of votes for each candidate
  • % of Votes for each candidate and
  • Finally the Winner of the election based on popular vote.

Further while working on challenge few more tasks were added by election commission :

  • The voter turnout for each county.
  • The percentage of votes from each county out of the total count.
  • The county with the highest turnout.

Election Audit Results :

  • The total # of Votes counted were 369,711. Screenshot for the same as follows:

image

image

image

  • Now, we started with getting the list of candidates and calculating the total # & % of votes each candidate received. Its better explained with the below code and its reading:

image image image image

  • Further we started working on coding for Winning candidate with its votes and % of votes the candidate won by : image image image

So until here i tried to help Tom & Seth to submit the the election audit results to the election commission. But wait! The election commission has requested some additional data to complete the audit:

  • The voter turnout for each county
  • The percentage of votes from each county out of the total count
  • The county with the highest turnout.

All the above can be better understood by the below code and its outcome in txt file. image image image image image image image

Summary

To summarize - myself with Tom & Seth we'll worked on Colorado Local congressional election to submit the election audit results to election commission. The outcome summary of the Colorado Local congressional election analysis is as follows :

image

This script can be easily modified to fit any type of election. For example, if you wanted to analyze a federal congressional election, all you need to do is change the counties to states. Another example, if you had a local initiative election, all you need to do is change candidates to in favor or against.

Resources

  • Data: election_results.csv
  • Software: Python 3.7.6, Visual Studio Code 1.62.0

About

In this analysis, I wrote a Python script that generates a vote count per candidate and per county and creates a report for U.S. congressional race in a Colorado precinct.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages