4 colors on an electoral map (user search)
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 08:22:41 AM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  About this Site
  Talk Elections Q & A
  How To (Moderator: Virginiá)
  4 colors on an electoral map (search mode)
Pages: [1]
Author Topic: 4 colors on an electoral map  (Read 11451 times)
True Federalist (진정한 연방 주의자)
Ernest
Moderators
Atlas Legend
*****
Posts: 42,157
United States


« on: July 31, 2006, 04:37:19 PM »

You can get four colors, by manipulating the url for a map by hand.

I did so to get this map for an alternate 1956 election recently:


Here's part of the URL so I can discuss what's going on


uselectionatlas.org/TOOLS/genusmap.php?year=1956&pv_p=1&ev_p=1&type=calc&AL=3;11;3&AZ=2;4;5

Following the question mark are a number of parameters, separated by ampersands.

The first is year and right now this works for any year divisible by four from 1824 to 2008 with one caveat.  The modern borders of each state are used despite the fact that Missouri doesn't acquire the Platte Purchase until 1837 and Virginia doesn't lose West Virginia until 1863.

The next possible parameter ev_c, but that only has an effect if state gives each CD an EV with the 2 remaining EV being decided statewide.  No states used that system in 1956, so that's why it wasn't used.  Set it to 0 of you don't want any splitting by CD's and to 1 if you do.

pv_p controls whether you want states shaded according to the popular vote percentage (0=no 1= yes) and ev_p controls whether you want the EV's displayed on the map.  I'm not certain what the type parameter does, so just leave it alone.

Next comes the entry for each state. of the form XX=#;#;#
XX is the two letter postal abbreviation (followed by a CD number if you're using CD's on your map. 

The first of the three numbers indicates the color of the state, 0=gray; 1=red; 2=blue; 3=green

The second number is the number of EV's, so you can change it from history, or even replace it with text.

The third number is the color intensity which is a number from 3 to 9, corresponding to 30 to 90%.  Since in a three way race, the winner has to get at least 30% of the vote, lower percentages aren't supported.  Also gray never varies in intensity.

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.031 seconds with 13 queries.