Template:STV Election box candidate2
Party | Candidate | FPv% | Count | |
---|---|---|---|---|
1 | ||||
{{{party}}} | {{{candidate}}} | {{{percentage}}} | {{{count1}}} | |
Quota: {{{quota}}} |
This template uses Lua: |
These election box templates are for displaying a list of candidates and their vote totals in each round of counting in a single transferable vote election. They produce tables like this (figures are just examples; they are not meant to work mathematically):
Party | Candidate | FPv% | Count | ||||
---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | ||||
Party 1 | Candidate 1 | 25.0 | 2,500 | ||||
Party 2 | Candidate 2 | 23.5 | 2,352 | 2,818 | 2,500 | ||
Party 3 | Candidate 3 | 19.2 | 1,927 | 2,293 | 2,493 | ||
Party 4 | Candidate 4 | 18.2 | 1,823 | 2,389 | 2,507 | 2,500 | |
Party 5 | Candidate 5 | 13.9 | 1,398 | ||||
Electorate: 12,000 Valid: 10,000 Spoilt: 57 (0.6%) Quota: 2,500 Turnout: 10,057 (83.8%) |
Usage and parameter list for STV Election box candidate2 [ ]
TemplateData for STV Election box candidate2
Parameter | Description | Type | Status | |
---|---|---|---|---|
Candidate name | candidate | The name of the candidate | String | required |
Party | party | The article name of the relevant party | Page name | required |
Unregistered party | unregistered | Adds a footnote to the candidate's party indicating that the party name did not appear on the ballot | Boolean | optional |
First preference votes percentage | percentage | The candidates first preference vote share on the first round of counting | Number | required |
Round 1 vote total | count1 | Number of votes in counting round 1 | Number | required |
Round 2 vote total | count2 | Number of votes in counting round 2 | Number | optional |
Round 3 vote total | count3 | Number of votes in counting round 3 | Number | optional |
Round 4 vote total | count4 | Number of votes in counting round 4 | Number | optional |
Round 5 vote total | count5 | Number of votes in counting round 5 | Number | optional |
Round 6 vote total | count6 | Number of votes in counting round 6 | Number | optional |
Round 7 vote total | count7 | Number of votes in counting round 7 | Number | optional |
Round 8 vote total | count8 | Number of votes in counting round 8 | Number | optional |
Round 9 vote total | count9 | Number of votes in counting round 9 | Number | optional |
Round 10 vote total | count10 | Number of votes in counting round 10 | Number | optional |
Round 11 vote total | count11 | Number of votes in counting round 11 | Number | optional |
Round 12 vote total | count12 | Number of votes in counting round 12 | Number | optional |
Round 13 vote total | count13 | Number of votes in counting round 13 | Number | optional |
Round 14 vote total | count14 | Number of votes in counting round 14 | Number | optional |
Round 15 vote total | count15 | Number of votes in counting round 15 | Number | optional |
Round 16 vote total | count16 | Number of votes in counting round 16 | Number | optional |
Round 17 vote total | count17 | Number of votes in counting round 17 | Number | optional |
Round 18 vote total | count18 | Number of votes in counting round 18 | Number | optional |
Round 19 vote total | count19 | Number of votes in counting round 19 | Number | optional |
Round 20 vote total | count20 | Number of votes in counting round 20 | Number | optional |
Round 21 vote total | count21 | Number of votes in counting round 21 | Number | optional |
Round 22 vote total | count22 | Number of votes in counting round 22 | Number | optional |
Round 23 vote total | count23 | Number of votes in counting round 23 | Number | optional |
Round 24 vote total | count24 | Number of votes in counting round 24 | Number | optional |
Round 25 vote total | count25 | Number of votes in counting round 25 | Number | optional |
Round 26 vote total | count26 | Number of votes in counting round 26 | Number | optional |
Round 27 vote total | count27 | Number of votes in counting round 27 | Number | optional |
Round 28 vote total | count28 | Number of votes in counting round 28 | Number | optional |
Round 29 vote total | count29 | Number of votes in counting round 29 | Number | optional |
Round 30 vote total | count30 | Number of votes in counting round 30 | Number | optional |
Round 31 vote total | count31 | Number of votes in counting round 31 | Number | optional |
Round 32 vote total | count32 | Number of votes in counting round 32 | Number | optional |
Usage
Basic
There are three basic templates:
The begin and end templates start and end a table with appropriate columns and formatting. The numcounts
parameter in the begin and end templates should match - this determines the number of columns for each round of ballot counting.
The candidate template is used once for each candidate and contributes a row to the table. Each candidate template should use the same number of countX
parameters, and these should match numcounts
in the begin and end templates. For example, if numcounts = 3
then all candidate templates should contain the count1
, count2
, and count3
parameters. The countX
parameters each contain the candidate's total votes after that round of counting.
The end template has a required quota
parameter which should contain the number of votes needed for a candidate to be elected.
For example, this:
{{STV Election box begin2 |title = Single Transferable Vote Example |numcounts = 4 }} {{STV Election box candidate2 |candidate = '''Candidate 1''' |party = Party 1 |percentage = 25.0 |count1 = '''2,500''' |count2 = |count3 = |count4 = }} {{STV Election box candidate2 |candidate = '''Candidate 2''' |party = Party 2 |percentage = 23.5 |count1 = 2,352 |count2 = 2,818 |count3 = '''2,500''' |count5 = }} {{STV Election box candidate2 |candidate = Candidate 3 |party = Party 3 |percentage = 19.2 |count1 = 1,927 |count2 = 2,293 |count3 = 2,493 |count4 = }} {{STV Election box candidate2 |candidate = '''Candidate 4''' |party = Party 4 |percentage = 18.2 |count1 = 1,823 |count2 = 2,389 |count3 = 2,507 |count4 = '''2,500''' }} {{STV Election box candidate2 |candidate = Candidate 5 |party = Party 5 |percentage = 13.9 |count1 = 1,398 |count2 = |count3 = |count4 = }} {{STV Election box end2 |numcounts = 4 |electorate = 12,000 |valid = 10,000 |spoilt = 57 (0.6%) |quota = 2,500 |turnout = 10,057 (83.8%) }}
Will create this:
Party | Candidate | FPv% | Count | ||||
---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | ||||
Party 1 | Candidate 1 | 25.0 | 2,500 | ||||
Party 2 | Candidate 2 | 23.5 | 2,352 | 2,818 | 2,500 | ||
Party 3 | Candidate 3 | 19.2 | 1,927 | 2,293 | 2,493 | ||
Party 4 | Candidate 4 | 18.2 | 1,823 | 2,389 | 2,507 | 2,500 | |
Party 5 | Candidate 5 | 13.9 | 1,398 | ||||
Electorate: 12,000 Valid: 10,000 Spoilt: 57 (0.6%) Quota: 2,500 Turnout: 10,057 (83.8%) |
Party links
Party links and colors are populated automatically by Module:Political party. If this does not work for a specific party see the module documentation for instructions to request its addition.
Turnout, spoilt ballots, etc
The end template has optional parameters to display the size of the electorate, turnout, number of spoilt ballots, and other data. See Template:STV Election box end2 for details.