Template:Gallagher index/doc

Usage
Creates a Gallagher index table that automatically calculates the Gallagher index based on provided vote and seat percentages.

Example
Example result for the 2015 Canadian Federal Election

Template Data
{	"params": { "side": { "label": "Float side", "description": "Side for the table to float on, left or right. If none, the table will be left aligned with text wrap, like a normal wikitable", "example": "left", "type": "string", "suggestedvalues": [ "left", "right", "none" ],			"autovalue": "", "required": true },		"election": { "label": "Election name", "description": "The name of the election, formatted as a wikilink", "example": "2015 Canadian federal election", "type": "wiki-page-name", "required": true },		"votes1": { "label": "Party 1 votes (%)", "description": "Vote percentage received by party 1", "example": "10.90", "type": "number" },		"seats1": { "label": "Party 1 seats (%)", "description": "Seat percentage received by party 1", "example": "10.90", "type": "number" },		"color1": { "label": "Party 1 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party1": { "label": "Party 1 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes2": { "label": "Party 2 votes (%)", "description": "Vote percentage received by party 2", "example": "10.90", "type": "number" },		"seats2": { "label": "Party 2 seats (%)", "description": "Seat percentage received by party 2", "example": "10.90", "type": "number" },		"color2": { "label": "Party 2 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party2": { "label": "Part 2 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes3": { "label": "Party 3 votes (%)", "description": "Vote percentage received by party 3", "example": "10.90", "type": "number" },		"seats3": { "label": "Party 3 seats (%)", "description": "Seat percentage received by party 3", "example": "10.90", "type": "number" },		"color3": { "label": "Party 3 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party3": { "label": "Party 3 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes4": { "label": "Party 4 votes (%)", "description": "Vote percentage received by party 4", "example": "10.90", "type": "number" },		"seats4": { "label": "Party 4 seats (%)", "description": "Seat percentage received by party 4", "example": "10.90", "type": "number" },		"color4": { "label": "Party 4 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party4": { "label": "Party 4 name", "description": "The name of party 1, formatted as a wikilink", "example": "Australian Greens" },		"votes5": { "label": "Party 5 votes (%)", "description": "Vote percentage received by party 5", "example": "10.90", "type": "number" },		"seats5": { "label": "Party 5 seats (%)", "description": "Seat percentage received by party 5", "example": "10.90", "type": "number" },		"color5": { "label": "Party 5 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party5": { "label": "Party 5 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes6": { "label": "Party 6 votes (%)", "description": "Vote percentage received by party 6", "example": "10.90", "type": "number" },		"seats6": { "label": "Party 6 seats (%)", "description": "Seat percentage received by party 6", "example": "10.90", "type": "number" },		"color6": { "label": "Part 6 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party6": { "label": "Party 6 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes7": { "label": "Party 7 votes (%)", "description": "Vote percentage received by party 7", "example": "10.90", "type": "number" },		"seats7": { "label": "Party 7 seats (%)", "description": "Seat percentage received by party 7", "example": "10.90", "type": "number" },		"color7": { "label": "Party 7 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party7": { "label": "Party 7 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes8": { "label": "Party 8 votes (%)", "description": "Vote percentage received by party 8", "example": "10.90", "type": "number" },		"seats8": { "label": "Party 8 seats (%)", "description": "Seat percentage received by party 8", "example": "10.90", "type": "number" },		"color8": { "label": "Party 8 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party8": { "label": "Party 8 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes9": { "label": "Party 9 votes (%)", "description": "Vote percentage received by party 9", "example": "10.90", "type": "number" },		"seats9": { "label": "Party 9 seats (%)", "description": "Seat percentage received by party 9", "example": "10.90", "type": "number" },		"color9": { "label": "Party 9 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party9": { "label": "Party 9 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"votes10": { "label": "Party 10 votes (%)", "description": "Vote percentage received by party 10", "example": "10.90", "type": "number" },		"seats10": { "label": "Party 10 seats (%)", "description": "Seat percentage received by party 10", "example": "10.90", "type": "number" },		"color10": { "label": "Party 10 color", "description": "Party color, as a hex value. Hex outputting templates accepted", "example": "#00FF00" },		"party10": { "label": "Party 10 name", "description": "The name of party 1, formatted as a wikilink", "example": "Greens" },		"size": { "label": "Table size", "description": "Scales the table, input is from 0-100 percent (no % sign), scales based on text size", "example": "70", "type": "number", "default": "100", "suggestedvalues": [ "70",				"100"			]		},		"explanation": { "label": "Explanation toggle", "description": "Toggles the explanatory paragraph at the bottom. Default enabled, \"no\" disables it.", "example": "no", "suggestedvalues": [ "yes", "no" ],			"default": "yes", "autovalue": "yes", "suggested": true }	},	"description": "Creates a Gallagher index table using provided seat and vote percentages.", "format": "block", "paramOrder": [ "side", "election", "size", "explanation", "votes1", "seats1", "color1", "party1", "votes2", "seats2", "color2", "party2", "votes3", "seats3", "color3", "party3", "votes4", "seats4", "color4", "party4", "votes5", "seats5", "color5", "party5", "votes6", "seats6", "color6", "party6", "votes7", "seats7", "color7", "party7", "votes8", "seats8", "color8", "party8", "votes9", "seats9", "color9", "party9", "votes10", "seats10", "color10", "party10" ] }