साँचा:Canadian election result/top

मुक्त ज्ञानकोश विकिपीडिया से
[[{{{1}}} चुनाव]]
दल उम्मीदवार मत % ∆% खर्च
परिचय का प्रतीक साँचा परिचय[देखें] [संपादन] [इतिहास] [पर्ज .]

The header for a table of the Canadian election results

साँचे के पैरामीटर्स[साँचा डेटा सम्पादित करें]

पैरामीटरविवरणप्रकारस्थिति
Jurisdiction1

The two-letter code for a province/territory, the three-letter code for a city, or CA for federal.

डिफ़ॉल्ट
पंक्तिआवश्यक
Election2

The four-digit year for a general election, or some other text (for example a full date) for a by-election.

डिफ़ॉल्ट
पंक्तिआवश्यक
Riding3

The full title of a Wikipedia article about a riding. For example: 'Barrie (electoral district)'

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Riding display4

The displayed text for the riding name, if different from the above. For example: 'Barrie'.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
By-electionby

Set to 'yes' for by-elections. When using this, give the full date of the by-election rather than just the year.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
By-election linkby-link

Pagename for by-election.

डिफ़ॉल्ट
पृष्ठ का नामवैकल्पिक
Reasonreason

Text describing reason for by-election, added on line below main title. For example: 'Resignation of [[Bugs Bunny]]'

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add percent columnpercent

Set to 'yes' to add a column with the heading '%'.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add change columnchange

Set to 'yes' to add a column with the heading '∆%'.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add expenditures columnexpenditures

Set to 'yes' to add a column with the heading 'Expenditures'.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add elected columnelected

Set to 'yes' for ridings that elect multiple members off of one ballot to add a column for with the heading 'Elected'.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add 1st ballot column1st

Set to 'yes' for ridings with multiple-rounds of voting to create a column for the first round of voting.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add final ballot columnfinal

Set to 'yes' for ridings with multiple-rounds of voting to create a column for the final round of voting.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Add second percent columnpercent2

Set to 'yes' for ridings with multiple-rounds of voting to add a column for percents for the final round.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
Mark as multi-ballot ridingballot

Set to A, B, or C for ridings that run multiple ballots each with a different slate of candidates during each election. It will only change the links in the heading.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
''Future'' election dateon

The date of an upcoming election “YYYY-MM-DD” (or other machine interpretable date) to add a coloured title line “The YYYY general/municipal election will be held on Month day.” or (if parameter by=yes) “The by-election will be held on Month day, year.”

डिफ़ॉल्ट
स्ट्रिंगवैकल्पिक
Note results ''Preliminary''prelim

Setting any value other than “no” adds the large title line “ ** Preliminary results — Not yet official ** ”

डिफ़ॉल्ट
पंक्तिवैकल्पिक
collapsedcollapsed

The table is by default collapsible. You can set the initial collapsedness to 'yes', 'auto', or 'no'. These correspond to initial states of 'collapsed', 'autocollapse', or 'none', respectively. For instance, if an article about a riding has a long list of election results from years past, you may want to have the first one display (for the most recent election) but keep the previous election years collapsed.

डिफ़ॉल्ट
पंक्तिवैकल्पिक
परिचय का प्रतीक साँचा परिचय[देखें] [संपादन] [इतिहास] [पर्ज .]

The template {{Canadian election result}} is intended to create tables showing the election or by-election results in one riding. It can be used on the pages of the ridings, of the candidates, or on template pages that are transcluded onto both. It works in conjunction with five other templates: {{Canadian election result/top}}, {{Canadian election result/total}}, {{Canadian election result/gain}}, {{Canadian election result/hold}}, and {{Canadian election result/source}}. This template can duplicate the functions of all of the 53 existing federal and provincial CanElec templates.

/top template[संपादित करें]

Begin each table with {{Canadian election result/top}}.

The first thing that needs to be specified is whether this is a federal election, or provincial or territorial.

Use the standard two-letter codes for postal abbreviations or second-level domains of the .ca country-code domain. A table is given at the bottom of this page.

General format[संपादित करें]

Basic form

Use {{Canadian election result/top|jurisdiction|election}}. The jurisdiction field should be the two-letter code and the election field should be the year.

For example, {{Canadian election result/top|MB|2011}} gives:

Manitoba general चुनाव, 2011
दल उम्मीदवार मत
With riding name

Use {{Canadian election result/top|jurisdiction|election|riding|riding display}}. The riding display field can be omitted when the riding's article name does not contain disambiguation.

For example, {{Canadian election result/top|CA|2008|Barrie (electoral district)|Barrie}} gives:

कनाडा के संघीय चुनाव, 2008: Barrie
दल उम्मीदवार मत
With extra data columns

Extra columns can be added to provide additional dato. For example, {{Canadian election result/top|CA|2006|Toronto—Danforth|percent=yes|change=yes|expenditures=yes}} gives:

कनाडा के संघीय चुनाव, 2011: Toronto—Danforth
दल उम्मीदवार मत % ∆% खर्च

General parameters[संपादित करें]

first unnamed parameter; or jurisdiction=
This is a two-letter code. Valid two-letter codes correspond to the standard postal abbreviations or second-level domains of .ca. Note that for Newfoundland and Labrador elections before 2001, the code is NF rather than NL.
second unnamed parameter or election=
This is the four-digit year for a general election, or some other text (for example a full date) for a by-election.
third unnamed parameter or riding=
This is the full title of a Wikipedia article about a riding. For example: Barrie (electoral district)
Note that Canadian federal ridings often use an em dash naming convention (for example: Brome—Missisquoi). Other jurisdictions may have different conventions; for instance, Quebec provincial ridings use an en dash instead, and only if hyphens already occur elsewhere in the name (eg, Drummond–Bois-Francs, but Brome-Missisquoi).
(optional) fourth unnamed parameter or riding_display=
This is the displayed text for the riding name, if different from the above. For example: Barrie

Optional parameters[संपादित करें]

by=yes
Use for by-elections. When using this, give the full date of the by-election rather than just the year.
reason=
Explain the reason for the by-election. For example, reason=upon the resignation of Jon Doe.
percent=yes
Use this parameter to add a column with the heading "%".
change=yes
Use this parameter to add a column with the heading "∆%".
expenditures=yes
Use this parameter to add a column with the heading "Expenditures".
elected=yes
Use for multi-member ridings that elect multiple members off of one ballot to add a column with the heading "Elected".
1st=yes|percent=yes|final=yes|percent2=yes
Use these parameters to create columns for multi-round elections.
ballot=A or ballot=B or ballot=C
Use one of these parameters for multi-member ridings that run multiple ballots each with a different slate of candidates during each election. It will only change the links in the heading.
collapsed=
The table is by default collapsible. You can set the initial collapsedness as follows: yes, auto, or no. These correspond to initial states of "collapsed", "autocollapse", or none, as documented at Help:Collapsing. For instance, if an article about a riding has a long list of election results from years past, you may want to have the first one display (for the most recent election) but keep the previous election years collapsed.

Main template[संपादित करें]

Use a copy of this template, {{Canadian election result}}, for each row. The basic version of template is {{Canadian election result |jurisdiction |party |candidate |votes}}. The jurisdiction must be the two-letter provincial code or "CA" for federal elections. The party name must match the format of party names in the "input text" column of the master list of parties. The candidate name can be wikilinked if the article exists. The full version of this template is {{Canadian election result |jurisdiction |party |candidate |votes |4th column |5th column |6th column}}. The last three fields are optional, and what should be put in them depends on what headers were used. For multi-member ridings, use elected=yes to add a checkmark in the "Elected" column.

/total template[संपादित करें]

Use a copy of this template, {{Canadian election result/total}}, for each total row (for example, Total valid votes, Total rejected ballots, Total turnout). The full version of this template is {{Canadian election result/total |heading |votes column |4th column |5th column |6th column}}. The last three fields are optional.

See Canadian election result/total documentation for instructions on how to find the data and complete the various total rows.

/gain and /hold templates[संपादित करें]

These templates can be used to identify gains and holds for the winning party, together with the swing calculated for the result compared to the previous election. The basic version of template is {{Canadian election result/gain |jurisdiction |gaining party |losing party |swing}} and {{Canadian election result/hold |jurisdiction |party |swing}}, with the jurisdiction and party input in the same way as in {{Canadian election result}}. The /gain template may additionally add the party that the seat was taken from in the third parameter.

For example, {{CANelec/gain |AB |Liberal |PC |+11.20%}} produces:

Liberal gain from प्रोग्रेसिव कंज़र्वेटिव Swing +11.20%

/source and /note templates[संपादित करें]

These templates can be used to add a row to the bottom of the table. For example: {{Canadian election result/source|All data comes from elections Canada.}}. If the line of text contains an equals sign, as many government links do, name the field source=.

end template[संपादित करें]

Finish election boxes with the {{end}} template.

Example[संपादित करें]

Here is an example using the federal riding of Ottawa Centre in the 2011 federal election. The code:

{{Canadian election result/top|CA|2011|Ottawa Centre|percent=yes|change=yes}}
{{CANelec|CA|NDP|[[Paul Dewar]]|33,805|52.11|+12.37}}
{{CANelec|CA|Conservative|Damian Konstantinakos|14,063|21.68|-1.89}}
{{CANelec|CA|Liberal|Scott Bradley|13,049|20.12|-5.90}}
{{CANelec|CA|Green|Jen Hunter|3,262|5.03|-4.89}}
{{CANelec|CA|Marijuana|John Andrew Akpata|326|0.50|-0.09}}
{{CANelec|CA|Independent|Romeo Bellai|210|0.32|–}}
{{CANelec|CA|Communist|Stuart Ryan|109|0.17|–}}
{{CANelec|CA|Marxist-Leninist|Pierre Soublière|44|0.07|-0.08}}
{{Canadian election result/total|Total valid votes/Expense limit|64,868|100.00|–}}
{{Canadian election result/total|Total rejected ballots|267|0.41|0.00}}
{{Canadian election result/total|Turnout|65,135|74.96|+5.85}}
{{Canadian election result/total|Eligible voters|86,898}}
{{CANelec/hold |CA |NDP |+9.14%}}
{{end}}

will produce:

कनाडा के संघीय चुनाव, 2011: Ottawa Centre
दल उम्मीदवार मत % ∆%
न्यू डेमोक्रेटिक पॉल देवार 33,805 52.11 +12.37
कंज़र्वेटिव Damian Konstantinakos 14,063 21.68 -1.89
लिबरल स्कॉट ब्रैडली 13,049 20.12 -5.90
ग्रीन जेन हंटर 3,262 5.03 -4.89
Marijuana John Andrew Akpata 326 0.50 -0.09
Independent रोमियो बेल्लई 210 0.32
Communist स्टुअर्ट रायन 109 0.17
मार्क्सवादी–लेनिनवादी Pierre Soublière 44 0.07 -0.08
Total valid votes/Expense limit 64,868 100.00
Total rejected ballots 267 0.41 0.00
Turnout 65,135 74.96 +5.85
Eligible voters 86,898
न्यू डेमोक्रेटिक hold Swing +9.14%

TemplateData (main template)[संपादित करें]

साँचा चक्र मिला: साँचा:Canadian election result/doc

See also[संपादित करें]

साँचा:Canadian election result/testcases