Party | Candidate | FPv% | Count | |
---|---|---|---|---|
1 |
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 begin2 [ ]
TemplateData for STV Election box begin2
Parameter | Description | Type | Status | |
---|---|---|---|---|
Election title | title | The title of the election to display as a heading above the rest of the box. | String | required |
Number of ballot counting rounds | numcounts | The number of ballot counting rounds before the winning candidates were determined. This determines the number of columns in the table. | Number | required |
Counts header note | countsnote | Optional text displayed in the Counts column header immediately after the word Counts . | String | 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.