New editions of the State Legislative Tracker and The Policy Tracker available now!

Template:Primary election box 2013/doc

From Ballotpedia
Jump to: navigation, search

This is a usage page for the {{Primary election box}}.

The election box template is to be used for primary elections only. For the general election box, see {{Election box/doc}}

There are two main items that compute automatically:

  • Total votes
  • Vote %

If the parameters are appropriately filled in, then those pieces of information will be entered automatically by the template.


Here is the basic code to copy and fill in:

{{Primary election box YEAR
|winner1 =
|Inc1 = 
|candidate2 = 
|votes1 = 
|votes2 = 

There are as many as 30 candidates that can be added to an election box. Quite simply, there are two parameters needed per candidate:

  1. candidate1
  2. votes1

For each subsequent candidate, it would change to:

  1. candidate2
  2. votes2


  1. candidate3
  2. votes3


If the candidate is the winner, then substitute: winner3 for candidate3

Other important notes

  • The winner should always go first, with subsequent candidates in order based on number of votes.
  • If a candidate is an incumbent, simply type "Inc3=Y" and alter the "3" based on which candidate it is.
So if candidate5 is the incumbent, then "Inc5=Y"
  • If when you build the table you want to make it collapsed from the start, enter "Collapse=Yes"

Here is the code with explanations.

{{Primary election box YEAR
Chamber= The title of the election, such as "California State Assembly, District 6"
winner1 = Name of the winner
Inc1 = If the candidate is an incumbent, put "Y"
candidate2 = Name of a candidate
votes1 = Number of votes for candidate/winner 1. should be entered without commas, like "230424"
votes2 = Number of votes for candidate/winner 2. should be entered without commas, like "230424"

Here is an example implemented:

{{Primary election box 2013
|Chamber=Republic of the Moon, California
|winner1 = E Person 1
|votes1 = 800
|Inc1 = Y
|candidate2 = E Person 2
|votes2 = 600
Republic of the Moon, California Democratic Primary, 2013
Candidate Vote % Votes
Green check mark transparent.pngE Person 1 Incumbent 57.1% 800
E Person 2 42.9% 600
Total Votes 1,400

Here is the code for a box with four candidates.

{{Primary election box 2013
|Chamber=A District
|winner1 = C Person 1
|Inc3 = Y
|winner2= C Person 2
|candidate3 = C Person 3
|candidate4 = C Person 4
|votes1 = 1500
|votes2 = 1150
|votes3 = 900
|votes4 = 800
A District Republican Primary, 2013
Candidate Vote % Votes
Green check mark transparent.pngC Person 1 34.5% 1,500
Green check mark transparent.pngC Person 2 26.4% 1,150
C Person 3 Incumbent 20.7% 900
C Person 4 18.4% 800
Total Votes 4,350