User talk:Morgan Wick/electionbox

A template for elections using Morgan Wick's projection systems. Can support up to five contestants. NOT intended to be used in articles, but similar syntax can be used for a template that can be used in articles. Call me!

NOTE: The code is supposed to work for up to five contestants, but currently only works with no more than three. I need someone versed in ParserFunctions who can tell me how to create entire rows (multi-line sections of code) whose existence depends on whether certain parameters exist.

Usage
Parameter Meaning:
 * Race: The name of the race, displayed at the top of the box.
 * Precinct: Percentage of precincts reporting. Do NOT express as a decimal (in other words, use 1 instead of .01 to reflect 1%). Do NOT put anything but a number here. Otherwise the formulae for the automated projections don't work.
 * Proj (optional): Set to "1" to project the winner.
 * Candidate1, candidate2, etc: The names and parties of the candidates. Please list in descending order. "Candidate1" must be the current leader, and "candidate2" must be in second place. Otherwise the formulae for the automated projections don't work and "Proj" will project the wrong winner. This template is NOT designed to project a winner that's not in the lead, so it could never have been used to project Al Gore winning Florida when Bush consistently had the lead.
 * Percent1, percent2, etc: The percentages for the candidates. Do NOT express as a decimal. Do NOT put anything but a number here. Otherwise the formulae for the automated projections don't work. This template does not currently support the input of numbers of votes.