User talk:Morgan Wick/runoffbox

A template for run-off primary elections using Morgan Wick's projection systems. Can support up to six 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 six contestants, but currently only works with no more than four. 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.
 * Proj1 (optional): Set to "1" to project that the leader will advance to the runoff.
 * Proj2 (optional): Set to "1" to project that the second-place candidate will advance to the runoff. Set to "-1" to project that the leader will get a majority and render a runoff unnecessary.
 * Candidate1, candidate2, etc: The names and parties of the candidates. Please list in descending order. "Candidate1" must be the current leader, "candidate2" must be in second place, and "candidate3" must be third. Otherwise the formulae for the automated projections don't work and "Proj" will project the wrong top two or majority 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. If there are only two candidates, use User:Morgan Wick/electionbox.
 * 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.