Skip to main content

View Diary: More Fantasy Redistricting: Oregonian Irredentism (23 comments)

Comment Preferences

  •  By using perl (0+ / 0-)

    in Linux or Mac OS its easy.  Save the file and then run

    perl ApportionScript.txt

    For Windows you will need to download perl first:

    http://www.perl.org/...

    Lines of the file you may need to change:

    for($iPotentialSeat=2; $iPotentialSeat <= 60; $iPotentialSeat++) {

    Replace 60 with a larger maximum, if you have more potential seats for any given state.  Choosing too large a number will cause the program to take a long time.

    while( $iSeat <= 445 ) {
      $Priority = @ListOfPriority[$iSeat-51];
      if( $iSeat=436 ) {
       print "nJust for grins show where additional seats would have gone.nn"
      }
      $State
    $PriorityValue{$Priority};
      $SeatNumber = ++$StatesSeatNumber{$State};
      print "$iSeat: $State Seat $SeatNumber, PV=" . int($Priority) . "n";
      if( $iSeat > 435 ) { $StatesSeatNumber{$State}-- }; # fix up!
      $iSeat++;
     }

    Replace 445, 435 and 51 with the appropriate numbers if you want a different number of seats or a different number of states.

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site