Template:Election/doc

From blackwiki
< Template:Election
Revision as of 00:40, 18 January 2010 by imported>Harej (better introduction)
Jump to navigation Jump to search

This template is one of many available for presenting election results; however, the eventual goal is that this template becomes the standard used throughout Wikipedia.

Usage

Important: While most of the template parameters are optional, if you use a field for one candidate, use that field for all candidates.

Header

title= The name for an election.

year= The year an election took place; this occupies the top-left corner of the table. This field is optional but makes individual elections easily distinguishable if multiple election boxes are on a page.

width= The width of the table — default value is 55%. If a page has multiple election boxes, make sure to keep the width consistent throughout.

Example:

{{Election
| title = [[United States presidential election, 2008|United States presidential election]]
| year = [[United States presidential election, 2008|2008]]
}}

yields

2008 United States presidential election
Majority

Candidate Rows

Note that template parameters in this section have an "n" in their name. This should be substituted with the number of the candidate in order of appearance in the template. Up to 10 candidates are supported.

Political party

In non-partisan elections, political parties can be left out at the discretion of the editor.

partyn= For "prepared" political parties. For example, if partyn is defined as "Democratic Party (United States)", the color defined at {{Democratic Party (United States)/meta/color}} is used and the short name defined at {{Democratic Party (United States)/meta/shortname}} is used.

To use a custom political party and color:

partynname= for the name of a political party (linked at the user's discretion).

partyncolor= for the color of a political party. Hexadecimal codes or color names can be used. This value defaults to gray.

Candidate name

In elections that involve only political parties, the candidate name column can be left out.

candidaten= The name of the candidate, linked at the user's discretion.

Votes received

votesn= The counted number of votes received. Example value: 9,015

percentn= The percentage of votes received. Example value: 54%

percentchangen= The percent change in votes received by the party (or the person for independents) in the previous election. Example value: +1.5%

Running mates

Individual running mates should only be added to an election box in situations where the running mate's candidacy is substantially different; for example, if there is a difference in political parties or votes received.

runningmaten= The name of the running mate.

runningmate-partyn= The political party of the running mate.

runningmate-partynname= For custom political parties (see above).

runningmate-partyncolor= For custom political parties (see above).

runningmate-votesn= Votes received.

runningmate-percentn= Percent of votes received.

runningmate-percentchangen= Percent change of votes received.

Party votes

For mixed member proportional representation elections, such as those in New Zealand.

partyvotesn= The amount of votes received by a party.

partypercentn= The percent of votes received by a party.

partypercentchangen= The percent change of votes received by a party.

Majority

The majority in an election is the difference in votes received between first place and second place.

majority= The difference in counted votes between first and second place.

majoritypercent= The percent difference between first and second place.

majoritypercentchange= The percent change between first and second place compared to the previous election.

For when running mates are involved: runningmate-majority=, runningmate-majoritypercent, and runningmate-majoritypercentchange

For when party votes are involved: partymajority=, partymajoritypercent=, and partymajoritypercentchange=

Turnout

turnout= The number of voters in an election.

turnoutpercent= The percent of voter turnout, compared to the electorate (amount of people eligible to vote) as a whole.

turnoutpercentchange= The percent change in an election compared to the prior election.

Winning political party

winner= The winning political party. In legislative elections, this is the political party that won the most seats.

winnername= The name of the winning political party (for custom political parties; see above).

winnercolor= The color of the winning political party (for custom political parties; see above).

result= Whether the election was a hold or a gain from another political party. Defaults to "hold".

Swing

While a standard in Commonwealth politics, swing is not typically calculated for United States elections. For that reason, it is optional.

swing= The percent swing in an election.

swingchange= The percent change in swing in an election.

See also