Skip to content

Instantly share code, notes, and snippets.

@kevints
Last active June 2, 2017 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevints/9d8cdc3914e2feda14280727793644ca to your computer and use it in GitHub Desktop.
Save kevints/9d8cdc3914e2feda14280727793644ca to your computer and use it in GitHub Desktop.
# Voting-Age population of each state
# From https://www.federalregister.gov/documents/2017/01/30/2017-01890/estimates-of-the-voting-age-population-for-2016
cat > vap.tsv <<EOF
3766477 Alabama
554567 Alaska
5299579 Arizona
2283195 Arkansas
30157154 California
4279173 Colorado
2823158 Connecticut
747791 Delaware
16465727 Florida
7798827 Georgia
1120541 Hawaii
1245967 Idaho
9875430 Illinois
5057601 Indiana
2403962 Iowa
2192338 Kansas
3426345 Kentucky
3567717 Louisiana
1076765 Maine
4667719 Maryland
5433677 Massachusetts
7737243 Michigan
4231619 Minnesota
2267438 Mississippi
4706137 Missouri
814909 Montana
1433791 Nebraska
2262631 Nevada
1074207 New Hampshire
6959717 New Jersey
1590352 New Mexico
15564730 New York
7848068 North Carolina
581641 North Dakota
9002201 Ohio
2961933 Oklahoma
3224738 Oregon
10109422 Pennsylvania
848045 Rhode Island
3863498 South Carolina
652167 South Dakota
5149399 Tennessee
20568009 Texas
2129444 Utah
506066 Vermont
6541685 Virginia
5658502 Washington
1456034 West Virginia
4491015 Wisconsin
446600 Wyoming
EOF
# Minimum number of voters to get 34 senators = (17 senators * 2 senators / state)
# This is enough to prevent a 2/3 majority, which requires 67 senators
## 18471225
cat vap.tsv |sort -rnk1|tail -n 17|awk '{s+=$1} END {print s}'
# Total voting-age population (in states that have senators)
## 248924951
cat vap.tsv |awk '{s+=$1} END {print s}'
# Percentage of votes that could be cast in favor of an opposition party without allowing a 2/3 majority
## 92.58000
bc <<< "scale=5; (1 - (18471225 / 248924951)) * 100"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment