Jump to content

Template:US elections imagemap/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

This is a template for creating image maps for yearly elections in the United States, particularly Senate and gubernatorial elections. For presidential elections, use Template:United States presidential election imagemap.

To create maps, use the base map File:Blank USA, w territories.svg, and fill it with colors from Wikipedia:WikiProject Elections and Referendums/USA Legend Colors § Seat control.

Parameters
Parameter Usage Example
image Map image 2018 United States gubernatorial elections results map.svg
link-template Template for links 2018 STATE gubernatorial election
cycle[a] The election cycle Gov2
extra-states Extra states to include[b] OR;WV[c]
extra-lines Extra raw lines to include[b] rect 702 391 725 423 [[2020–21 United States Senate special election in Georgia]][c]
state-overrides Override links for certain states[b] AZ=2020 United States Senate special election in Arizona
excluded-states States to exclude. Overridden by extra_states[b] AK;HI
  1. ^ If not specified, no states will be linked, unless added with extra-states or extra-lines.
  2. ^ a b c d (; delimited)
  3. ^ a b For valid values of |cycle= and |extra-states=, see below.

Data

[edit]
Cycles
Name Description
None None
SenateClass1 Class 1 United States Senate seats
SenateClass2 Class 2 United States Senate seats
SenateClass3 Class 3 United States Senate seats
SenateClass1pre1960 Same as above, excluding Alaska and Hawaii
SenateClass2pre1960
SenateClass3pre1960
Gov0 State governors elections in year modulo 4
Gov1
Gov2
Gov3
StateLegLower0 State legislative elections in year modulo 4
Note: Minnesota and New Jersey Senate elections need to be added manually, as they are not consistent with what cycle they are in (as they follow a mod 10 cycle with 2-4-4 terms, not a mod 4 cycle).
StateLegLower1
StateLegLower2
StateLegLower3
StateLegUpper0
StateLegUpper1
StateLegUpper2
StateLegUpper3
Gov0WithTerritories Same as Gov0, but with Puerto Rico and American Samoa
Gov2WithTerritories Same as Gov2, but with Guam, United States Virgin Islands, and Northern Mariana Islands
AllStates All 50 states
AllRegular All states, plus territories (PR, AS, GU, MP, and VI)
All All of the above, plus insets for special elections (currently exist for AL, CA, GA, KS, MN, MS, NC, ND, NY, OK, SC, TN, and WY). Not recommended!

Examples

[edit]

Simple

[edit]

{{US elections imagemap|image=2018 United States gubernatorial election results.svg|link-template=2018 STATE gubernatorial election|cycle=Gov2WithTerritories}}

2018 Alabama gubernatorial election2018 Alaska gubernatorial election2018 Arizona gubernatorial election2018 Arkansas gubernatorial election2018 California gubernatorial election2018 Colorado gubernatorial election2018 Connecticut gubernatorial election2018 Florida gubernatorial election2018 Georgia gubernatorial election2018 Hawaii gubernatorial election2018 Idaho gubernatorial election2018 Illinois gubernatorial election2018 Iowa gubernatorial election2018 Kansas gubernatorial election2018 Maine gubernatorial election2018 Maryland gubernatorial election2018 Massachusetts gubernatorial election2018 Michigan gubernatorial election2018 Minnesota gubernatorial election2018 Nebraska gubernatorial election2018 Nevada gubernatorial election2018 New Hampshire gubernatorial election2018 New Mexico gubernatorial election2018 New York gubernatorial election2018 Ohio gubernatorial election2018 Oklahoma gubernatorial election2018 Oregon gubernatorial election2018 Pennsylvania gubernatorial election2018 Rhode Island gubernatorial election2018 South Carolina gubernatorial election2018 South Dakota gubernatorial election2018 Tennessee gubernatorial election2018 Texas gubernatorial election2018 Vermont gubernatorial election2018 Wisconsin gubernatorial election2018 Wyoming gubernatorial election2018 Guam gubernatorial election2018 Northern Mariana Islands gubernatorial election2018 United States Virgin Islands gubernatorial election


With extra-states

[edit]

{{US elections imagemap|image=2018 United States Senate elections results map.svg|link-template=2018 United States Senate election in STATE|cycle=SenateClass1|extra-states=MNS;MSS|state-overrides=MSS=2018 United States Senate special election in Mississippi;MNS=2018 United States Senate special election in Minnesota}}

2018 United States Senate special election in Minnesota2018 United States Senate special election in Mississippi2018 United States Senate election in Arizona2018 United States Senate election in California2018 United States Senate election in Connecticut2018 United States Senate election in Delaware2018 United States Senate election in Florida2018 United States Senate election in Hawaii2018 United States Senate election in Indiana2018 United States Senate election in Maine2018 United States Senate election in Maryland2018 United States Senate election in Massachusetts2018 United States Senate election in Michigan2018 United States Senate election in Minnesota2018 United States Senate election in Mississippi2018 United States Senate election in Missouri2018 United States Senate election in Montana2018 United States Senate election in Nebraska2018 United States Senate election in Nevada2018 United States Senate election in New Jersey2018 United States Senate election in New Mexico2018 United States Senate election in New York2018 United States Senate election in North Dakota2018 United States Senate election in Ohio2018 United States Senate election in Pennsylvania2018 United States Senate election in Rhode Island2018 United States Senate election in Tennessee2018 United States Senate election in Texas2018 United States Senate election in Utah2018 United States Senate election in Vermont2018 United States Senate election in Virginia2018 United States Senate election in Washington2018 United States Senate election in West Virginia2018 United States Senate election in Wisconsin2018 United States Senate election in Wyoming