/Election_Analysis

Use the programming language Python to create scripts that read, write, and store data from files or in arrays as well as perform mathematical operations.

Primary LanguagePython

Overview of Election Audit

  1. Provide additional data to to complete the audit as below:
  • 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:

  • How many votes were cast in this congressional election?

Total voted casted in the congressional election were 369,711

  • Provide a breakdown of the number of votes and the percentage of total votes for each county in the precinct.

Jefferson County: 10.5% (38,855)

Denver County: 82.8% (306,055)

Arapahoe County: 6.7% (24,801)

  • Which county had the largest number of votes?

With 306,055 Denver had the largest number of votes.

  • Provide a breakdown of the number of votes and the percentage of the total votes each candidate received.

Charles Casper Stockham: 23.0% (85,213)

Diana DeGette: 73.8% (272,892)

Raymon Anthony Doane: 3.1% (11,606)

  • Which candidate won the election, what was their vote count, and what was their percentage of the total votes?

Winner of the election: Diana DeGette

Total Votes for Diana: 272,892

Percentage of total votes for Diana: 73.8%

Election-Audit Summary:

Below are two examples of how this script can be modified to be used for other elections.

  1. Including voters age:

Age is one of the leading indicators of voter turnaround. We can do this by adding the age description in coding lines following the data we already have, example:

winning_county = ""

winning_county_count = 0

winning_county_percentage = 0

adding

winning_county_age = 0

in other similar lines too.

  1. Including voters enthusiasm:

It is more a quality indicator. Similarly to the above coding lines we could add (Extremely motivated

Very motivated

Somewhat motivated

Not too motivated

Not at all motivated

No opinion)