Apportionment fun (user search)
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
April 29, 2024, 12:00:04 PM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  Presidential Elections - Analysis and Discussion
  Presidential Election Trends (Moderator: 100% pro-life no matter what)
  Apportionment fun (search mode)
Pages: [1]
Author Topic: Apportionment fun  (Read 12313 times)
Beefalow and the Consumer
Beef
Junior Chimp
*****
Posts: 9,123
United States


Political Matrix
E: -2.77, S: -8.78

« on: November 19, 2004, 05:24:47 PM »

If anyone is interested, I wrote a Perl script to take a file containing states and populations, and figure out how many EVs each state gets, using the current method of Congressional apportionment.  Some interesting finds:

Utah was 856 residents away from stealing an EV from North Carolina in 2000.

According to the 2010 population projection made in 2001 by the US Census Bureau, the following EV changes will take place in 2010:

CA +2
TX +2
WA +1
OR +1
UT +1
MT +1

NY -2
IL -1
PA -1
OH -1
MI -1
MA -1
IA -1

I was surprised to see CA gaining an extra two EVs, while AZ, CO, GA, VA, and TN didn't gain any.  Florida came very close to getting another EV at Texas' expense.

Last five EVs awarded:
5. Missouri (11) (falling)
4. California (57) (rising)
3. Minnesota (10) (falling)
2. North Carolina (15) (static)
1. Texas (36) (rising)

First five EVs almost awarded:
1. Florida (28) (rising)
2. Michigan (17) (falling)
3. California (58) (rising)
4. Massachusetts (12) (falling)
5. Illinois (21) (falling)

So, Minnesota and Missouri are also in danger of losing EVs, but are not projected to lose them in 2010, based on the population projections I found.

GOP states are looking to pick up 4 EVs, with Democrat states losing 1, and Battleground states losing 3.
Logged
Beefalow and the Consumer
Beef
Junior Chimp
*****
Posts: 9,123
United States


Political Matrix
E: -2.77, S: -8.78

« Reply #1 on: November 20, 2004, 09:05:13 PM »


Looking over this, it looks pretty much like my prediction, except CA should be 56 reps instead of 58.  (Ah, I think one comes from Ohio and the other comes from Minnesota.  And another Ohio seat is going to Florida - you must have very different numbers than I have.)

Anyone have some more recent state population projecitons for 2010?  I can feed those numbers into my program (I really ought to create a Web interface for this...)  I think it's going to be a close battle between TX and FL for the 435th seat.
Logged
Beefalow and the Consumer
Beef
Junior Chimp
*****
Posts: 9,123
United States


Political Matrix
E: -2.77, S: -8.78

« Reply #2 on: November 20, 2004, 10:20:49 PM »

Here's the perl program I wrote to do this.  To run it, you supply a name of a file with a state and a population on each line, separated by a tab.  The file name is the first argument.  An optional second argument is the number of seats you want to apportion (the default is 435).


Code:
#! /usr/bin/perl

use warnings;
use strict;

if (@ARGV < 1) {
  print "Usage: app.pl population_file [number of seats]\n";
  exit(1);
}

if (@ARGV < 2) {
  $ARGV[1] = 435;
}

# read state pops
open STATEPOP, $ARGV[0] or die $!;

my %statepops;
while (my $line = <STATEPOP>) {
  chomp $line;
  my ($name, $pop) = split (/\t/, $line);
  $pop =~ s/,//g;
  $statepops{$name} = $pop;
}

my $seats = $ARGV[1] - keys(%statepops);

close (STATEPOP);

# generate app table:
my @atable;
$atable[0] = 0;
$atable[1] = 1;
for (my $i=2; $i<200; $i++) {
  push (@atable, 1/(sqrt($i*($i-1))));
}

# generate final evtable:
my %evtable;
foreach my $key (keys(%statepops)) {
  $evtable{$key} = 1;
}

for (my $i=1; $i<=$seats; $i++) {
  my $maxpri=0;
  my $state;
  foreach my $key (keys(%statepops)) {
    my $seatnum = ($evtable{$key} + 1);
    my $pop = $statepops{$key};
    my $pri = $pop * $atable[$seatnum];
    if ($pri > $maxpri) {
      $maxpri = $pri;
      $state = $key;
    }
  }
  if ($i==386) { print "-------------------\n"; }
  print "Awarding seat ", $evtable{$state}+1, " to $state.\n";
  $evtable{$state}++;
}
print "\n";

# Add senators:
foreach my $key (keys(%evtable)) {
  $evtable{$key} += 2;
}

my @sorted = sort{$evtable{$b} <=> $evtable{$a}} keys(%evtable);
foreach my $key (@sorted) {
  print $key, ": ", $evtable{$key}, "\n";
}

When I get around to it, I may create a web interface.  Although I don't currently have any place to host it (Dave?).
Logged
Beefalow and the Consumer
Beef
Junior Chimp
*****
Posts: 9,123
United States


Political Matrix
E: -2.77, S: -8.78

« Reply #3 on: November 20, 2004, 10:24:43 PM »

Here's another fun little use for this:  I discovered how much you would have to expand Congress for every state to have at least 2 Congressmen.  We would need 806, and they would distribute like this (with the 2 Senatorial EVs added):

California: 99
Texas: 62
New York: 56
Florida: 48
Illinois: 38
Pennsylvania: 37
Ohio: 34
Michigan: 30
New Jersey: 26
North Carolina: 25
Georgia: 25
Virginia: 22
Massachusetts: 20
Washington: 19
Indiana: 19
Missouri: 18
Tennessee: 18
Maryland: 17
Arizona: 17
Wisconsin: 17
Minnesota: 16
Louisiana: 15
Alabama: 15
Colorado: 14
Kentucky: 14
South Carolina: 14
Oregon: 12
Connecticut: 12
Oklahoma: 12
Mississippi: 10
Kansas: 10
Arkansas: 10
Iowa: 10
Nevada: 8
Utah: 8
Nebraska: 7
West Virginia: 7
New Mexico: 7
Hawaii: 6
Maine: 6
New Hampshire: 6
Idaho: 6
Montana: 5
Rhode Island: 5
North Dakota: 4
Delaware: 4
Vermont: 4
South Dakota: 4
Alaska: 4
Wyoming: 4

Wyoming, of course, gets the final seat.
Logged
Beefalow and the Consumer
Beef
Junior Chimp
*****
Posts: 9,123
United States


Political Matrix
E: -2.77, S: -8.78

« Reply #4 on: November 22, 2004, 06:08:54 PM »

Bogart, I've heard that projected out eventually the Electoral colllage system will fail because of population shifts and a real minority with the power of electing the president over a vast majority. How far out can we project state populations. What would the map look like in 2020, 2050 or even 2100.  True many things might affect state populations by then but it will interesting to see.  Especially when the Ogallala Fossil Aquafir becomes completely depleted (projected to happen sometime this century)  This will make life pretty hard in Kansas Nebraska, and Oklahoma  So these states will probably shrink in size relative to neighboring states.

If the plains become uninhabitable deserts, chances are some states will have to be consolidated.

I imagine in 100 years we'll have perfected some sort of renewable energy, allowing for massive desalination and transport of water.  Fresh water will probably be an unlimited resource by 2100.
Logged
Pages: [1]  
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.034 seconds with 13 queries.