Template:Infobox Canada electoral district
From Wikipedia, the free encyclopedia
[[Image:Flag of {{{province}}}.svg|40px]] {{{province}}} electoral district | ||
---|---|---|
|
||
Warning: province or territory has been specified incorrectly; please define province with a valid value. | ||
Warning: neither a federal nor provincial electoral district has been specified in the template; please define one or both of prov-status and fed-status.
|
This template is used to provide an infobox for all electoral districts in Canada, including federal, provincial or territorial, and those with multiple jurisdictions.
Contents |
[edit] Usage
This template contains complex conditional operations that allow for flexible definitions. Not all districts require all fields. A complete specification is:
{{Infobox Canada electoral district | name = | province = | image = | caption = | fed-status = | fed-district-number = | fed-created = | fed-abolished = | fed-election-first = | fed-election-last = | fed-rep = | fed-rep-link = | fed-rep-party = | fed-rep-party-link = | prov-status = | prov-created = | prov-abolished = | prov-election-first = | prov-election-last = | prov-rep = | prov-rep-link = | prov-rep-party = | prov-rep-party-link = | demo-census-date = | demo-pop = | demo-electors = | demo-electors-date = | demo-area = | demo-cd = | demo-csd = }}
[edit] Mandatory parameters
The only required field is province. Despite its name, it also handles territories. At least one of fed-status or prov-status must be present. These indicate that either a federal electoral district (using fed-status), or provincial or territorial electoral district (using prov-status) is being defined, and further the current status of that district in that jurisdiction.
Additionally, although both federal and provincial parameters are optional, at least one of the federal or provincial sections must be specified.
-
- province
- The jurisdiction in which the electoral district is located. This parameter is critical to determining the composition of other elements of the infobox. Valid entries are: Alberta, British Columbia, Manitoba, New Brunswick, Newfoundland and Labrador, Northwest Territories, Nova Scotia, Nunavut, Ontario, Prince Edward Island, Quebec, Saskatchewan, and Yukon.
- Note: The template also accepts Province of Canada for pre-Confederation districts which existed between 1841 and 1867; such districts must define the prov- fields, not the fed- fields.
-
- fed-status, prov-status, or both
- Define fed-status if this is a federal electoral district. Define prov-status if this is a provincial or territorial electoral district. Define both if this district exists both federally and provincially or territorially. Valid entries are: active, defunct.
[edit] Optional parameters
These parameters provide additional information or flexibility to the infobox.
-
- name
- The name of the electoral district. This overrides the default value automatically determined by the template, which uses the article title. It is useful in cases for which the article title contains extraneous information; for example, the infobox for Yukon (electoral district) should include "name=Yukon".
-
- image
- This generally contains a map of the electoral district with respect to its region. If this parameter is not present, a generic placeholder is used instead.
-
- caption
- A short description of the image included, or other text as applicable (for example, when no image is provided).
[edit] Federal electoral district parameters
These parameters are required to define a federal electoral district. All must be present for active districts, except fed-abolished and fed-rep-link.
-
- fed-status
- Required to display all subsequent federal electoral district information. See Mandatory parameters above. If this parameter is set, the template provides a link to the legislature (House of Commons).
-
- fed-district-number
- Provides links to the Elections Canada electoral district profile and map. This should be a five-digit number; for example, 48006 represents Calgary Centre.
-
- fed-created
- The year in which the electoral district was created federally.
-
- fed-abolished
- The year in which the electoral district was abolished federally. This must have a value greater than that for fed-created.
-
- fed-election-first
- The year in which the first federal election was contested for this electoral district. A link to the election article for this year will be created automatically.
-
- fed-election-last
- The most recent year in which a federal election was contested, if the electoral district is still active; the date of the last contested election for a defunct electoral district. A link to the election article for this year will be created automatically.
-
- fed-rep
- The name of the current representative for this electoral district in the House of Commons. This should not be included for defunct electoral districts. A value of vacant should be used for a seat with no current representative.
-
- fed-rep-link
- The name of the article for the representative. It is used in cases for which the article with title fed-rep is not the article for the representative (eg - it is a disambiguation page). This should not be included for defunct electoral districts.
-
- fed-rep-party
- The party to which the representative belongs. This is the label for visible links on the template, for example Rhinoceros Party. This should not be included for defunct electoral districts.
-
- fed-rep-party-link
- The name of the article for the respective party. For example, Rhinoceros Party of Canada. This should not be included for defunct electoral districts. This will form a piped link [[Rhinoceros Party of Canada|Rhinoceros Party]], which displays as Rhinoceros Party.
[edit] Provincial or territorial electoral district parameters
These parameters are required to define a provincial or territorial electoral district. All must be present for active districts, except fed-abolished and prov-rep-link. For territorial districts in Nunavut or the Northwest Territories, the fields prov-rep-party and prov-rep-party-link should not be defined.
-
- prov-status
- Required to display all subsequent provincial electoral district information. See Mandatory parameters above. If this parameter is set, the template provides a link to the appropriate legislature (for example, Legislative Assembly of New Brunswick).
-
- prov-created
- The year in which the electoral district was created provincially or territorially.
-
- prov-abolished
- The year in which the electoral district was abolished provincially or territorially. This must have a value greater than that for prov-created.
-
- prov-election-first
- The year in which the first provincial or territorial election was contested for this electoral district. A link to the election article for this year will be created automatically.
-
- prov-election-last
- The most recent year in which a provincial or territorial election was contested, if the electoral district is still active; the date of the last contested election for a defunct electoral district. A link to the election article for this year will be created automatically.
-
- prov-rep
- The name of the current representative for this electoral district in the legislature. This should not be included for defunct electoral districts. A value of vacant should be used for a seat with no current representative.
-
- prov-rep-link
- The name of the article for the representative, per fed-rep-link above. This should not be included for defunct electoral districts.
-
- prov-rep-party
- The party to which the representative belongs, per fed-rep-party above. This should not be included for defunct electoral districts. This field is ignored when province is set to Nunavut or Northwest Territories, since those territories use a consensus government instead of political parties.
-
- prov-rep-party-link
- The name of the article for the respective party, per fed-rep-party-link above. This should not be included for defunct electoral districts. This field is ignored when province is set to Nunavut or Northwest Territories, since those territories use a consensus government instead of party affiliation.
[edit] Demographic information parameters
Demographic information about the electoral district.
-
- demo-census-date
- The census year on which the data below is based.
-
- demo-pop
- Population of the electoral district as of demo-census-date. The figure should not contain spaces, commas or periods, or the template will issue a warning. It is automatically formatted, respecting the user's localization settings (for example, thousands separator is "," for North America and "." for Europe.
-
- demo-electors
- Number of electors in the electoral district as of demo-census-date. The figure should not contain spaces, commas or periods, and should be less than demo-pop, or the template will issue a warning. It is automatically formatted, respecting the user's localization settings.
-
- demo-electors-date
- Date for which demo-electors has been most recently updated. This should 'not be the date on which the template was updated, rather the date on which government entities update this figure based on census data and electorate databases.
-
- demo-area
- The area, in square kilometres, of the electoral district as of demo-census-date. The figure should not contain spaces, commas or periods, or the template will issue a warning. It is automatically formatted, respecting the user's localization settings
-
- demo-cd
- The census division or divisions which are fully or partially included in the electoral district as of demo-census-date. See Category:Census divisions of Canada.
-
- demo-csd
- The census subdivisions which are fully or partially included in the electoral district as of demo-census-date. A complete listing is available at the Statistics Canada Standard Geographical Classification database.
If both demo-pop and demo-area are properly defined, the template will automatically include a population density field, rounded to one decimal place. Only demo-cd, demo-csd and demo-area will be displayed for defunct ridings.
[edit] Errors
This template employs numerous checks for erroneous definitions. To ensure that all template fields have been correctly defined, click the "Show Preview" button before saving the new entry. If an error exists, a warning will display in red lettering in the template. Some mis-specified fields may result in more than one error.
-
- province is undefined
- Warning issued: no province or territory has been specified; please define province with a valid value
- How to resolve: ensure the filed province is defined, and is set to an acceptable value; check for spelling errors
-
- province has been specified, but the value is incorrect
- Warning issued: province or territory has been specified incorrectly; please define province with a valid value
- Warning issued: province is mis-specified
- How to resolve: set province to an acceptable value; check for spelling errors
-
- no district has been specified
- Warning issued: neither a federal nor provincial electoral district has been specified in the template; please define one or both of prov-status and fed-status
- How to resolve: ensure that at least one of prov-status or fed-status is defined and set to a valid value
-
- a status field has been incorrectly specified
- Warning issued: fed-status must be set to active or defunct
- Warning issued: prov-status must be set to active or defunct
- How to resolve: set the specified field to one of the valid values; ensure there are no spelling errors
-
- fed-abolished date occurs before fed-created
- Warning issued: date value for fed-created is before that for fed-abolished; ensure values are not incorrectly declared
- Warning issued: missing declaration for fed-created, or spurious entry for fed-abolished
- How to resolve: ensure that the value of fed-abolished is a year occurring after the value for fed-created; check for typographical errors;
-
- prov-abolished date occurs before prov-created
- Warning issued: date value for prov-created is before that for prov-abolished; ensure values are not incorrectly declared
- Warning issued: missing declaration for prov-created, or spurious entry for prov-abolished
- How to resolve: ensure that the value of prov-abolished is a year occurring after the value for prov-created; check for typographical errors;
-
- at least one of demo-pop, demo-electors or demo-area is negative
- Warning issued: demo-pop and demo-area should be greater than zero
- Warning issued: negative value entered for electors or population; please verify demo-pop and demo-electors
- How to resolve: remove negation signs (-) from the affected field(s)
-
- demo-pop and demo-area are incorrectly defined
- Warning issued: demo-pop is undefined, or improperly defined
- Warning issued: demo-area is undefined, or improperly defined
- How to resolve: ensure that both demo-pop and demo-area are defined, and that they do not contain invalid characters. Commas, periods and spaces cause problems in calculations and should be omitted. (They will be automatically added by the template in the final display.)
- Miscellaneous: this error is only display for districts that have at least one of fed-status or prov-status set to active
-
- demo-electors is greater than demo-pop
- Warning issued: the number of electors exceeds the indicated population; please verify demo-pop and demo-electors
- How to resolve: ensure that the value for demo-electors is less than the total district population demo-pop
-
- an article defined by a representative link does not exist
- Warning issued: invalid declaration of fed-rep-link; that article does not exist
- Warning issued: invalid declaration of prov-rep-link; that article does not exist
- How to resolve: ensure that the appropriate field is defined as the title of the article page about the representative; exclude the opening and closing braces ([[ and ]]); note that, if the article exists, this condition does not determine whether it is the appropriate link for the subject
-
- an article defined by a party link does not exist
- Warning issued: invalid declaration of fed-rep-party-link; that article does not exist
- Warning issued: invalid declaration of prov-rep-party-link; that article does not exist
- How to resolve: ensure that the appropriate field is defined as the title of the article page about the political party; exclude the opening and closing braces ([[ and ]]); note that, if the article exists, this condition does not determine whether it is the appropriate link for the subject
[edit] Sample usage
The following would be used for the article on the electoral district of Oak Ridges—Markham, which is both a federal and provincial district. (Data is accurate as of November 2007.)
{{Infobox Canada electoral district | province = Ontario | image = Oak Ridges-Markham.png | fed-status = active | fed-created = 2003 | fed-election-first = 2004 | fed-election-last = 2006 | fed-rep = Lui Temelkovski | fed-rep-party = Liberal | fed-rep-party-link = Liberal Party of Canada | prov-status = active | prov-created = 2006 | prov-election-first = 2007 | prov-rep = Helena Jaczek | prov-rep-party = Liberal | prov-rep-party-link = Ontario Liberal Party | demo-census-date = 2006 | demo-pop = 169642 | demo-electors = 123138 | demo-electors-date = 2007 | demo-area = 718 | demo-cd = [[York Regional Municipality, Ontario|York]] | demo-csd = [[Markham, Ontario|Markham]], [[Richmond Hill, Ontario|Richmond Hill]], [[Whitchurch-Stouffville, Ontario|Whitchurch-Stouffville]], [[King, Ontario|King]] }}
For an electoral district in just one jurisdiction, some fields may be omitted. For example, in the defunct district of Neepawa, the infobox would be:
{{Infobox Canada electoral district | name = Neepawa | province = Manitoba | fed-status = defunct | fed-created = 1914 | fed-abolished = 1947 | fed-election-first = 1917 | fed-election-last = 1945 }}
For a territorial electoral district in Nunavut or the Northwest Territories, which operate under a consensus government, party affiliation (prov-rep-party and prov-rep-party-link) information is ignored, and should not be included. For example, for the district of Kugluktuk, we would have the following template:
{{Infobox Canada electoral district | name = Kugluktuk | province = Nunavut | image = | prov-status = active | prov-created = 1999 | prov-election-first = 1999 | prov-election-last = 2004 | prov-rep = Joe Allen Evyagotailak | demo-census-date = 2006 | demo-pop = 1302 | demo-electors = | demo-area = | demo-cd = [[Kitikmeot Region, Nunavut|Kitikmeot Region]] | demo-csd = [[Kugluktuk, Nunavut|Kugluktuk]] }}