Difference between revisions of "Template:Compact election box no change/doc"

From blackwiki
Jump to navigation Jump to search
imported>Philosopher
(underconstruction - copying documentation from Template:Compact election box/doc)
 
imported>Philosopher
(adjusting doc page to its new home)
Line 5: Line 5:
 
These templates produce results like this:
 
These templates produce results like this:
 
{{Compact election box begin}}
 
{{Compact election box begin}}
{{Compact election box
+
{{Compact election box no change
 
  | election_title = [[Foobar South-Central by-election, 1953|1953 by-election]]
 
  | election_title = [[Foobar South-Central by-election, 1953|1953 by-election]]
 
  |election_note = death of [[Sir Bufton Tufton]]
 
  |election_note = death of [[Sir Bufton Tufton]]
Line 32: Line 32:
 
  | candidate2_change  = N/A
 
  | candidate2_change  = N/A
 
}}
 
}}
{{Template:Compact election box
+
{{Template:Compact election box no change
 
  | election_title = [[United Kingdom general election, 1955|1955 general election]]
 
  | election_title = [[United Kingdom general election, 1955|1955 general election]]
 
  | electorate = 57,901
 
  | electorate = 57,901
Line 43: Line 43:
 
| winner_party = Conservative Party (UK)
 
| winner_party = Conservative Party (UK)
 
}}
 
}}
{{Template:Compact election box
+
{{Template:Compact election box no change
 
  | election_title = [[United Kingdom general election, 1959|1959 general election]]
 
  | election_title = [[United Kingdom general election, 1959|1959 general election]]
 
  | electorate = 57,901
 
  | electorate = 57,901
Line 69: Line 69:
 
| candidate3_change  = N/A
 
| candidate3_change  = N/A
 
}}
 
}}
{{Template:Compact election box
+
{{Template:Compact election box no change
 
  | election_title = [[United Kingdom general election, 1964|1964 general election]]
 
  | election_title = [[United Kingdom general election, 1964|1964 general election]]
 
  | electorate = 62,184
 
  | electorate = 62,184
Line 128: Line 128:
 
| candidate8_change  = N/A
 
| candidate8_change  = N/A
 
}}
 
}}
{{Template:Compact election box
+
{{Template:Compact election box no change
 
  | election_title = [[United Kingdom general election, 1966|1966 general election]]
 
  | election_title = [[United Kingdom general election, 1966|1966 general election]]
 
  | electorate = 62,184
 
  | electorate = 62,184
Line 160: Line 160:
 
<pre>
 
<pre>
 
{{Compact election box begin}}
 
{{Compact election box begin}}
{{Compact election box}}
+
{{Compact election box no change}}
{{Compact election box}}
+
{{Compact election box no change}}
{{Compact election box}}
+
{{Compact election box no change}}
 
...
 
...
 
{{Compact election box end}}
 
{{Compact election box end}}
Line 170: Line 170:
 
<pre>
 
<pre>
 
{{Compact election box begin}}
 
{{Compact election box begin}}
{{Compact election box
+
{{Compact election box no change
 
  | election_title    =
 
  | election_title    =
  
Line 177: Line 177:
 
  | winner_votes      =
 
  | winner_votes      =
 
  | winner_percent    =
 
  | winner_percent    =
| winner_change      =
 
 
   
 
   
 
  | candidate2        =
 
  | candidate2        =
Line 183: Line 182:
 
  | candidate2_votes  =
 
  | candidate2_votes  =
 
  | candidate2_percent =
 
  | candidate2_percent =
| candidate2_change  =
 
 
}}
 
}}
 
{{Compact election box end}}
 
{{Compact election box end}}
Line 192: Line 190:
 
<pre>
 
<pre>
 
{{Compact election box begin}}
 
{{Compact election box begin}}
{{Compact election box
+
{{Compact election box no change
 
  | election_title            =  
 
  | election_title            =  
 
  | election_note              =  
 
  | election_note              =  
Line 203: Line 201:
 
  | majority_votes            =  
 
  | majority_votes            =  
 
  | majority_percent          =  
 
  | majority_percent          =  
| majority_change            =
 
 
   
 
   
 
  | result                    =  
 
  | result                    =  
Line 218: Line 215:
 
  | winner_votes              =  
 
  | winner_votes              =  
 
  | winner_percent            =  
 
  | winner_percent            =  
| winner_change              =
 
 
   
 
   
 
  | candidate2                =  
 
  | candidate2                =  
Line 225: Line 221:
 
  | candidate2_votes          =  
 
  | candidate2_votes          =  
 
  | candidate2_percent        =  
 
  | candidate2_percent        =  
| candidate2_change          =
 
 
   
 
   
 
  | candidate3                =  
 
  | candidate3                =  
Line 232: Line 227:
 
  | candidate3_votes          =  
 
  | candidate3_votes          =  
 
  | candidate3_percent        =  
 
  | candidate3_percent        =  
| candidate3_change          =
 
 
   
 
   
 
  | candidate4                =  
 
  | candidate4                =  
Line 239: Line 233:
 
  | candidate4_votes          =  
 
  | candidate4_votes          =  
 
  | candidate4_percent        =  
 
  | candidate4_percent        =  
| candidate4_change          =
 
 
   
 
   
 
  | candidate5                =  
 
  | candidate5                =  
Line 246: Line 239:
 
  | candidate5_votes          =  
 
  | candidate5_votes          =  
 
  | candidate5_percent        =  
 
  | candidate5_percent        =  
| candidate5_change          =
 
 
   
 
   
 
  | candidate6                =  
 
  | candidate6                =  
Line 253: Line 245:
 
  | candidate6_votes          =  
 
  | candidate6_votes          =  
 
  | candidate6_percent        =  
 
  | candidate6_percent        =  
| candidate6_change          =
 
 
   
 
   
 
  | candidate7                =  
 
  | candidate7                =  
Line 260: Line 251:
 
  | candidate7_votes          =  
 
  | candidate7_votes          =  
 
  | candidate7_percent        =  
 
  | candidate7_percent        =  
| candidate7_change          =
 
 
   
 
   
 
  | candidate8                =  
 
  | candidate8                =  
Line 267: Line 257:
 
  | candidate8_votes          =  
 
  | candidate8_votes          =  
 
  | candidate8_percent        =  
 
  | candidate8_percent        =  
| candidate8_change          =
 
 
   
 
   
 
  | candidate9                =  
 
  | candidate9                =  
Line 274: Line 263:
 
  | candidate9_votes          =  
 
  | candidate9_votes          =  
 
  | candidate9_percent        =  
 
  | candidate9_percent        =  
| candidate9_change          =
 
 
   
 
   
 
  | candidate10                =  
 
  | candidate10                =  
Line 281: Line 269:
 
  | candidate10_votes          =  
 
  | candidate10_votes          =  
 
  | candidate10_percent        =  
 
  | candidate10_percent        =  
| candidate10_change        =
 
 
   
 
   
 
  | candidate11                =  
 
  | candidate11                =  
Line 288: Line 275:
 
  | candidate11_votes          =  
 
  | candidate11_votes          =  
 
  | candidate11_percent        =  
 
  | candidate11_percent        =  
| candidate11_change        =
 
 
   
 
   
 
  | candidate12                =  
 
  | candidate12                =  
Line 295: Line 281:
 
  | candidate12_votes          =  
 
  | candidate12_votes          =  
 
  | candidate12_percent        =  
 
  | candidate12_percent        =  
| candidate12_change        =
 
 
   
 
   
 
  | candidate13                =  
 
  | candidate13                =  
Line 302: Line 287:
 
  | candidate13_votes          =  
 
  | candidate13_votes          =  
 
  | candidate13_percent        =  
 
  | candidate13_percent        =  
| candidate13_change        =
 
 
   
 
   
 
  | candidate14                =  
 
  | candidate14                =  
Line 309: Line 293:
 
  | candidate14_votes          =  
 
  | candidate14_votes          =  
 
  | candidate14_percent        =  
 
  | candidate14_percent        =  
| candidate14_change        =
 
 
   
 
   
 
  | candidate15                =  
 
  | candidate15                =  
Line 316: Line 299:
 
  | candidate15_votes          =  
 
  | candidate15_votes          =  
 
  | candidate15_percent        =  
 
  | candidate15_percent        =  
| candidate15_change        =
 
 
   
 
   
 
  | candidate16                =  
 
  | candidate16                =  
Line 323: Line 305:
 
  | candidate16_votes          =  
 
  | candidate16_votes          =  
 
  | candidate16_percent        =  
 
  | candidate16_percent        =  
| candidate16_change        =
 
 
   
 
   
 
  | candidate17                =  
 
  | candidate17                =  
Line 330: Line 311:
 
  | candidate17_votes          =  
 
  | candidate17_votes          =  
 
  | candidate17_percent        =  
 
  | candidate17_percent        =  
| candidate17_change        =
 
 
   
 
   
 
  | candidate18                =  
 
  | candidate18                =  
Line 337: Line 317:
 
  | candidate18_votes          =  
 
  | candidate18_votes          =  
 
  | candidate18_percent        =  
 
  | candidate18_percent        =  
| candidate18_change        =
 
 
   
 
   
 
  | candidate19                =  
 
  | candidate19                =  
Line 344: Line 323:
 
  | candidate19_votes          =  
 
  | candidate19_votes          =  
 
  | candidate19_percent        =  
 
  | candidate19_percent        =  
| candidate19_change        =
 
 
   
 
   
 
  | candidate20                =  
 
  | candidate20                =  
Line 351: Line 329:
 
  | candidate20_votes          =  
 
  | candidate20_votes          =  
 
  | candidate20_percent        =  
 
  | candidate20_percent        =  
| candidate20_change        =
 
 
   
 
   
 
  | candidate21                =  
 
  | candidate21                =  
Line 358: Line 335:
 
  | candidate21_votes          =  
 
  | candidate21_votes          =  
 
  | candidate21_percent        =  
 
  | candidate21_percent        =  
| candidate21_change        =
 
 
   
 
   
 
  | candidate22                =  
 
  | candidate22                =  
Line 365: Line 341:
 
  | candidate22_votes          =  
 
  | candidate22_votes          =  
 
  | candidate22_percent        =  
 
  | candidate22_percent        =  
| candidate22_change        =
 
 
   
 
   
 
  | candidate23                =  
 
  | candidate23                =  
Line 372: Line 347:
 
  | candidate23_votes          =  
 
  | candidate23_votes          =  
 
  | candidate23_percent        =  
 
  | candidate23_percent        =  
| candidate23_change        =
 
 
   
 
   
 
  | candidate24                =  
 
  | candidate24                =  
Line 379: Line 353:
 
  | candidate24_votes          =  
 
  | candidate24_votes          =  
 
  | candidate24_percent        =  
 
  | candidate24_percent        =  
| candidate24_change        =
 
 
   
 
   
 
  | candidate25                =  
 
  | candidate25                =  
Line 386: Line 359:
 
  | candidate25_votes          =  
 
  | candidate25_votes          =  
 
  | candidate25_percent        =  
 
  | candidate25_percent        =  
| candidate25_change        =
 
 
}}
 
}}
 
{{Compact election box end}}
 
{{Compact election box end}}
Line 532: Line 504:
 
|Percentage of votes received by the candidate
 
|Percentage of votes received by the candidate
 
|50.5
 
|50.5
|-
 
|'''candidate''n''_change'''
 
|Change in that party's percentage share of votes
 
| +1.6
 
 
|}
 
|}
  

Revision as of 15:33, 19 September 2011

Template:Under-construction

Purpose

A set of templates to produce a table displaying the results of first-past-the-post elections in a more compact format than offered by {{Election box}}.

Example

These templates produce results like this:

Election Political result Candidate Party Votes % ±%
1953 by-election
death of Sir Bufton Tufton
Electorate: 57,901
Turnout: 31,432 (66.2%)
Conservative gain from [[Scottish National Party|Template:Scottish National Party/meta/shortname]]
Majority: 2,507 (12.5%)
Swing: 17.1% from [[Scottish National Party|Template:Scottish National Party/meta/shortname]] to Con
Jimmy SmithConservative26,24150.5
Dave Spart Labour10,71920.1
1955 general election
Electorate: 57,901
Conservative hold Jimmy SmithConservativeunopposed
1959 general election
Electorate: 57,901
Turnout: 31,432 (66.2%)
Conservative hold
Majority: 12,952 (19.5%)
Jimmy SmithConservative27,70954.5
Dave Spart Labour8,60416.2
Eric The Viking Vikings for Borsetshire6,90312.5
1964 general election
Electorate: 62,184
Turnout: 41,401 (69.8%) +3.6
Labour gain from Conservative
Majority: 2,011 (9.5%)
Dave SpartLabour20,59138.9
Jimmy Smith Conservative18,70933.4
Col. Theo Smithers Borsetshire Ratepayers1,9036.7
William Williamson Liberal1,8126.4
Verte Profonde Green1,5616.0
Egbert Monster [[Official Monster Raving Loony Party|Template:Official Monster Raving Loony Party/meta/shortname]]9123.1
A. N. Ulsterman [[Ulster Unionist Party|Template:Ulster Unionist Party/meta/shortname]]8742.7
A. Alba [[Scottish National Party|Template:Scottish National Party/meta/shortname]]5402.3
1966 general election
Electorate: 62,184
Turnout: 41,401 (69.8%)
Labour hold
Majority: 2,011 (9.5%) +1.4
Dave SpartLabour20,59139.9
Jimmy Smith Conservative18,70932.3
Col. Theo Smithers Borsetshire Ratepayers1,9036.7

Usage

{{Compact election box begin}}
{{Compact election box no change}}
{{Compact election box no change}}
{{Compact election box no change}}
...
{{Compact election box end}}

Simple usage

Blank example with basic parameters

{{Compact election box begin}}
{{Compact election box no change
 | election_title     =

 | winner             =
 | winner_party       =
 | winner_votes       =
 | winner_percent     =
 
 | candidate2         =
 | candidate2_party   =
 | candidate2_votes   =
 | candidate2_percent =
}}
{{Compact election box end}}

Full usage

Blank example with all parameters

{{Compact election box begin}}
{{Compact election box no change
 | election_title             = 
 | election_note              = 
 | election_ref               = 

 | electorate 	              = 
 | turnout_votes              = 
 | turnout_percent            = 
 | turnout_change             = 
 | majority_votes             = 
 | majority_percent           = 
 
 | result                     = 
 | loser_party                = 
 | loser_party_unlinked       = 
 
 | swing                      = 
 | swing_from                 = 
 | swing_to                   = 

 | winner                     = 
 | winner_party               = 
 | winner_party_unlinked      = 
 | winner_votes               = 
 | winner_percent             = 
 
 | candidate2                 = 
 | candidate2_party           = 
 | candidate2_party_unlinked  = 
 | candidate2_votes           = 
 | candidate2_percent         = 
 
 | candidate3                 = 
 | candidate3_party           = 
 | candidate3_party_unlinked  = 
 | candidate3_votes           = 
 | candidate3_percent         = 
 
 | candidate4                 = 
 | candidate4_party           = 
 | candidate4_party_unlinked  = 
 | candidate4_votes           = 
 | candidate4_percent         = 
 
 | candidate5                 = 
 | candidate5_party           = 
 | candidate5_party_unlinked  = 
 | candidate5_votes           = 
 | candidate5_percent         = 
 
 | candidate6                 = 
 | candidate6_party           = 
 | candidate6_party_unlinked  = 
 | candidate6_votes           = 
 | candidate6_percent         = 
 
 | candidate7                 = 
 | candidate7_party           = 
 | candidate7_party_unlinked  = 
 | candidate7_votes           = 
 | candidate7_percent         = 
 
 | candidate8                 = 
 | candidate8_party           = 
 | candidate8_party_unlinked  = 
 | candidate8_votes           = 
 | candidate8_percent         = 
 
 | candidate9                 = 
 | candidate9_party           = 
 | candidate9_party_unlinked  = 
 | candidate9_votes           = 
 | candidate9_percent         = 
 
 | candidate10                = 
 | candidate10_party          = 
 | candidate10_party_unlinked = 
 | candidate10_votes          = 
 | candidate10_percent        = 
 
 | candidate11                = 
 | candidate11_party          = 
 | candidate11_party_unlinked = 
 | candidate11_votes          = 
 | candidate11_percent        = 
 
 | candidate12                = 
 | candidate12_party          = 
 | candidate12_party_unlinked = 
 | candidate12_votes          = 
 | candidate12_percent        = 
 
 | candidate13                = 
 | candidate13_party          = 
 | candidate13_party_unlinked = 
 | candidate13_votes          = 
 | candidate13_percent        = 
 
 | candidate14                = 
 | candidate14_party          = 
 | candidate14_party_unlinked = 
 | candidate14_votes          = 
 | candidate14_percent        = 
 
 | candidate15                = 
 | candidate15_party          = 
 | candidate15_party_unlinked = 
 | candidate15_votes          = 
 | candidate15_percent        = 
 
 | candidate16                = 
 | candidate16_party          = 
 | candidate16_party_unlinked = 
 | candidate16_votes          = 
 | candidate16_percent        = 
 
 | candidate17                = 
 | candidate17_party          = 
 | candidate17_party_unlinked = 
 | candidate17_votes          = 
 | candidate17_percent        = 
 
 | candidate18                = 
 | candidate18_party          = 
 | candidate18_party_unlinked = 
 | candidate18_votes          = 
 | candidate18_percent        = 
 
 | candidate19                = 
 | candidate19_party          = 
 | candidate19_party_unlinked = 
 | candidate19_votes          = 
 | candidate19_percent        = 
 
 | candidate20                = 
 | candidate20_party          = 
 | candidate20_party_unlinked = 
 | candidate20_votes          = 
 | candidate20_percent        = 
 
 | candidate21                = 
 | candidate21_party          = 
 | candidate21_party_unlinked = 
 | candidate21_votes          = 
 | candidate21_percent        = 
 
 | candidate22                = 
 | candidate22_party          = 
 | candidate22_party_unlinked = 
 | candidate22_votes          = 
 | candidate22_percent        = 
 
 | candidate23                = 
 | candidate23_party          = 
 | candidate23_party_unlinked = 
 | candidate23_votes          = 
 | candidate23_percent        = 
 
 | candidate24                = 
 | candidate24_party          = 
 | candidate24_party_unlinked = 
 | candidate24_votes          = 
 | candidate24_percent        = 
 
 | candidate25                = 
 | candidate25_party          = 
 | candidate25_party_unlinked = 
 | candidate25_votes          = 
 | candidate25_percent        = 
}}
{{Compact election box end}}

Parameters

Header parameters

The parameters are used once

Parmeter Purpose Example1 Example2
Required parameters
election_title title of election, may be wikilinked [[Foobar South-Central by-election, 1953|1953 by-election]] [[United Kingdom election, 1951|1951]]
Optional parameters
election_ref reference, usually to the source of the results <ref>[http://www.foobar-politics-today.com Foobar South-Central by-election results], Politics Today</ref> <ref name="somesource" />
election_note very short note on the election. Probably best kept to a terse reason for a by-election death of [[Sir Bufton Tufton]] resignation of [[Jane Imefedup]]
electorate number of registered voters 57,901
turnout_votes Number of ballots cast 31,432
turnout_percent Turnout as a percentage of registered electors 20.5 8.76
turnout_change Change in turnout as a percentage of registered electors +1.2 −5.3
majority_votes majority of the winning candidate in number of votes 1,607
majority_percent Majority as a percentage of valid votes +6.1 −3.7
majority_change Change in turnout as a percentage of registered electors +1.2 −5.3
result whether the seat changed party hold, or gain (default=win)
loser_party name of the party which lost, to be wikilinked Social Democratic Party (UK) Labour Party (UK)
loser_party_unlinked name of the party which lost, will not be wikilinked Let's have a party all night Party
swing swing in percentage 4.3 −6.8
swing_from party which votes swung away from Labour Party (UK)
swing_to party which votes swung away from Conservative Party (UK)

Winner parameters

One set of these parameters for each candidate

Parmeter Purpose Example
winner Name of candidate (may be wikilinked) [[Jimmy Abdul Rudigger Smith (junior)|Jimmy Smith]]
winner_party name of article on party Conservative Party (UK)
winner_party_unlinked text of article on party Borsetshire Free Lunch Party
winner_votes Number of votes received by the candidate 26,241
winner_percent Percentage of votes received by the candidate 50.5
winner_change Change in that party's percentage share of votes −0.5

Candidate parameters

One set of these parameters for each candidate, starting candidate2. Maximum of 25.

Parmeter Purpose Example
candidaten Name of candidate (may be wikilinked) [[Jimmy Abdul Rudigger Smith (junior)|Jimmy Smith]]
candidaten_party name of article on party Conservative Party (UK)
candidaten_party_unlinked text of article on party Borsetshire Free Lunch Party
candidaten_votes Number of votes received by the candidate 26,241
candidaten_percent Percentage of votes received by the candidate 50.5

See also