Template:US elections imagemap/sandbox
![]() | This is the template sandbox page for Template:US elections imagemap (diff). See also the companion subpage for test cases. |
Related pages |
---|
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.
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 |
Data
[edit]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 |
StateLegLower1 | |
StateLegLower2 | |
StateLegLower3 | |
StateLegUpper0 | |
StateLegUpper1 | |
StateLegUpper2 | |
StateLegUpper3 | |
StateLegUpper2Redist | Same as StateLegUpper2 , but also including Minnesota, which holds a Senate election in the x2 year following redistricting (and otherwise only in cycle 0).
|
StateLegUpper3Redist | Same as StateLegUpper2 , but also including New Jersey, which holds a Senate election in the x3 year following redistricting (and otherwise only in cycle 1).
|
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}}
![](http://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/2018_United_States_gubernatorial_elections_results_map.svg/350px-2018_United_States_gubernatorial_elections_results_map.svg.png)
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}}
![](http://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/2018_United_States_Senate_elections_results_map.svg/350px-2018_United_States_Senate_elections_results_map.svg.png)