Difference between revisions of "Template:Infobox census/doc"

From blackwiki
Jump to navigation Jump to search
imported>ItsPugle
(Expanding)
imported>ItsPugle
(Updating TemplateData)
Line 31: Line 31:
 
| most_populous
 
| most_populous
 
| least_populous
 
| least_populous
 +
| additional_label1
 +
| additional_data1
 +
| additional_label2
 +
| additional_data2
 +
| additional_label3
 +
| additional_data3
 +
| additional_label4
 +
| additional_data4
 +
| additional_label5
 +
| additional_data5
 
}}
 
}}
  
Line 60: Line 70:
 
| most_populous =  
 
| most_populous =  
 
| least_populous =  
 
| least_populous =  
 +
| additional_label1 =
 +
| additional_data1 =
 +
| additional_label2 =
 +
| additional_data2 =
 +
...
 +
| additional_label5
 +
| additional_data5
 
}}
 
}}
 
</pre>
 
</pre>
Line 65: Line 82:
 
=== TemplateData ===
 
=== TemplateData ===
 
{{Format TemplateData|
 
{{Format TemplateData|
| JSON = {
+
JSON = {
"description": "Infobox to be used for pages for censuses.",
+
  "description":"Infobox to be used for pages for censuses.",
"params": {
+
  "params":{
"name": {
+
    "name":{
"label": "Name of the census",
+
      "label":"Name of the census",
"description": "The name of the census, although not necessarily the page name. For example, the 2021 United Kingdom census is called \"Census 2021\"",
+
      "description":"The name of the census, although not necessarily the page name. For example, the 2021 United Kingdom census is called \"Census 2021\"",
"example": "Census 2021",
+
      "example":"Census 2021",
"type": "string",
+
      "type":"string",
"required": true
+
      "required":true
},
+
    },
"logo": {
+
    "logo":{
"label": "Logo",
+
      "label":"Logo",
"type": "wiki-file-name",
+
      "type":"wiki-file-name",
"suggested": true
+
      "suggested":true
},
+
    },
"logo_size": {
+
    "logo_size":{
"label": "Logo size",
+
      "label":"Logo size",
"description": "Please use either \"em\" or \"rem\".",
+
      "type":"string"
"type": "string"
+
    },
},
+
    "logo_caption":{
"logo_caption": {
+
      "label":"Logo caption",
"label": "Logo caption",
+
      "type":"string"
"type": "string"
+
    },
},
+
    "image":{
"image": {
+
      "label":"Image",
"label": "Image",
+
      "type":"wiki-file-name"
"type": "wiki-file-name"
+
    },
},
+
    "image_size":{
"image_size": {
+
      "label":"Image size",
"label": "Image size",
+
      "type":"string"
"description": "Please use either \"em\" or \"rem\".",
+
    },
"type": "string"
+
    "image_caption":{
},
+
      "label":"Image caption",
"image_caption": {
+
      "type":"string"
"label": "Image caption",
+
    },
"type": "string"
+
    "previous_census":{
},
+
      "label":"Previous census page",
"previous_census": {
+
      "description":"Page name for the previous census.",
"label": "Previous census page",
+
      "example":"2016 Australian census",
"description": "Page name for the previous census.",
+
      "type":"wiki-page-name"
"type": "wiki-page-name"
+
    },
},
+
    "previous_year":{
"previous_year": {
+
      "label":"Previous census year",
"label": "Previous census year",
+
      "description":"Year of the previous census.",
"description": "Year of the previous census.",
+
      "example":"2016",
"type": "number"
+
      "type":"number"
},
+
    },
"next_census": {
+
    "next_census":{
"label": "Next census page",
+
      "label":"Next census page",
"description": "Page name for the next census.",
+
      "description":"Page name for the next census.",
"type": "wiki-page-name"
+
      "example":"2025 Australian census",
},
+
      "type":"wiki-page-name"
"next_year": {
+
    },
"label": "Next census year",
+
    "next_year":{
"description": "Year of the next census.",
+
      "label":"Next census year",
"type": "number"
+
      "description":"Year of the next census.",
},
+
      "example":"2025",
"country": {
+
      "type":"number"
"label": "Country",
+
    },
"type": "string",
+
    "country":{
"suggested": true,
+
      "label":"Country",
"description": "Please only use this parameter if the census covers an entire country. If not, use region."
+
      "example":"Australia",
},
+
      "type":"string",
"date": {
+
      "suggested":true,
"label": "Census date",
+
      "description":"Please only use this parameter if the census covers an entire country. If not, use region."
"type": "date",
+
    },
"suggested": true
+
    "date":{
},
+
      "label":"Census date",
"population": {
+
      "type":"date",
"label": "Population recorded",
+
      "suggested":true
"description": "Population value recorded in the census.",
+
    },
"type": "number"
+
    "population":{
},
+
      "label":"Population recorded",
"percent_change": {
+
      "description":"Population value recorded in the census.",
"label": "Population percentage point change",
+
      "type":"number"
"description": "Change in percentage points versus the last census.",
+
    },
"type": "string"
+
    "percent_change":{
},
+
      "label":"Population percentage point change",
"region_type": {
+
      "description":"Change in percentage points versus the last census.",
"label": "Region type",
+
      "type":"string"
"type": "string"
+
    },
},
+
    "region_type":{
"most_populous": {
+
      "label":"Region type",
"label": "Most populous region",
+
      "example":"province",
"type": "wiki-page-name"
+
      "description":"This is for setting the type of region that most and least populous data is provided in (could be state etc, could be city etc). Generally, go for the highest-level, such as state, over something like suburb or city.",
},
+
      "type":"string"
"least_populous": {
+
    },
"label": "Least populous region",
+
    "most_populous":{
"type": "wiki-page-name"
+
      "label":"Most populous region",
},
+
      "type":"wiki-page-name"
"authority": {
+
    },
"label": "Census authority",
+
    "least_populous":{
"description": "Operating authority for the census.",
+
      "label":"Least populous region",
"example": "Office of National Statistics",
+
      "type":"wiki-page-name"
"type": "string"
+
    },
},
+
    "authority":{
"website": {
+
      "label":"Census authority",
"label": "Census website",
+
      "description":"Operating authority for the census.",
"type": "url"
+
      "example":"Office of National Statistics",
},
+
      "type":"string"
"trial_census": {
+
    },
"label": "Trial census date",
+
    "website":{
"description": "Data of a trial census, if run.",
+
      "label":"Census website",
"type": "date"
+
      "description":"Please use the URL template.",
},
+
      "type":"url"
"participation": {
+
    },
"label": "Census participation",
+
    "trial_census":{
"type": "string"
+
      "label":"Trial census date",
},
+
      "description":"Data of a trial census, if run.",
"topic1": {
+
      "type":"date"
"label": "First topic",
+
    },
"description": "You can add up to 10 different topics to be investigated in the census, such as \"housing\", \"employment\", \"education\" etc",
+
    "participation":{
"type": "string"
+
      "label":"Census participation",
},
+
      "type":"string"
"topic2": {
+
    },
"label": "Second topic",
+
    "topic1":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"First topic",
"type": "string"
+
      "description":"You can add up to 10 different topics to be investigated in the census, such as \"housing\", \"employment\", \"education\" etc",
},
+
      "type":"string"
"topic3": {
+
    },
"label": "Third topic",
+
    "topic2":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Second topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic4": {
+
    },
"label": "Fourth topic",
+
    "topic3":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Third topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic5": {
+
    },
"label": "Fifth topic",
+
    "topic4":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Fourth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic6": {
+
    },
"label": "Sixth topic",
+
    "topic5":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Fifth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic7": {
+
    },
"label": "Seventh topic",
+
    "topic6":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Sixth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic8": {
+
    },
"label": "Eighth topic",
+
    "topic7":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Seventh topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic9": {
+
    },
"label": "Ninth topic",
+
    "topic8":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Eighth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"topic10": {
+
    },
"label": "Tenth topic",
+
    "topic9":{
"description": "Requires topic1 to not be empty to display.",
+
      "label":"Ninth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"region": {
+
    },
"label": "Region for the census",
+
    "topic10":{
"description": "This parameter is used when the census doesn't span an entire country, for example, only a state or territory.",
+
      "label":"Tenth topic",
"type": "string"
+
      "description":"Requires topic1 to not be empty to display.",
},
+
      "type":"string"
"annual_percent_change": {
+
    },
"deprecated": "Please use percent_change"
+
    "region":{
}
+
      "label":"Region for the census",
},
+
      "example":"Queensland",
"paramOrder": [
+
      "description":"This parameter is used when the census doesn't span an entire country, for example, only a state or territory.",
"name",
+
      "type":"string"
"previous_year",
+
    },
"previous_census",
+
    "additional_label1":{
"date",
+
      "label":"Additional data label 1",
"next_year",
+
      "description":"Use this, paired with additional_data1, to add any additional results from the census",
"next_census",
+
      "type":"string"
"logo",
+
    },
"logo_size",
+
    "additional_data1":{
"image",
+
      "label":"Additional data 1",
"image_size",
+
      "description":"Use this, paired with additional_label1, to add any additional results from the census",
"logo_caption",
+
      "type":"string"
"image_caption",
+
    },
"region",
+
    "additional_label2":{
"country",
+
      "label":"Additional data label 2",
"topic1",
+
      "description":"Use this, paired with additional_data2, to add any additional results from the census",
"topic2",
+
      "type":"string"
"topic3",
+
    },
"topic4",
+
    "additional_data2":{
"topic5",
+
      "label":"Additional data 2",
"topic6",
+
      "description":"Use this, paired with additional_label2, to add any additional results from the census",
"topic7",
+
      "type":"string"
"topic8",
+
    },
"topic9",
+
    "additional_label3":{
"topic10",
+
      "label":"Additional data label 3",
"trial_census",
+
      "description":"Use this, paired with additional_data3, to add any additional results from the census",
"authority",
+
      "type":"string"
"website",
+
    },
"participation",
+
    "additional_data3":{
"population",
+
      "label":"Additional data 3",
"percent_change",
+
      "description":"Use this, paired with additional_label3, to add any additional results from the census",
"region_type",
+
      "type":"string"
"most_populous",
+
    },
"least_populous",
+
    "additional_label4":{
"annual_percent_change"
+
      "label":"Additional data label 4",
],
+
      "description":"Use this, paired with additional_data4, to add any additional results from the census",
"format": "block"
+
      "type":"string"
 +
    },
 +
    "additional_data4":{
 +
      "label":"Additional data 4",
 +
      "description":"Use this, paired with additional_label4, to add any additional results from the census",
 +
      "type":"string"
 +
    },
 +
    "additional_label5":{
 +
      "label":"Additional data label 5",
 +
      "description":"Use this, paired with additional_data5, to add any additional results from the census",
 +
      "type":"string"
 +
    },
 +
    "additional_data5":{
 +
      "label":"Additional data 5",
 +
      "description":"Use this, paired with additional_label5, to add any additional results from the census",
 +
      "type":"string"
 +
    },
 +
    "annual_percent_change":{
 +
      "deprecated":"Please use percent_change"
 +
    }
 +
  },
 +
  "paramOrder":[
 +
    "name",
 +
    "previous_year",
 +
    "previous_census",
 +
    "date",
 +
    "next_year",
 +
    "next_census",
 +
    "logo",
 +
    "logo_size",
 +
    "image",
 +
    "image_size",
 +
    "logo_caption",
 +
    "image_caption",
 +
    "region",
 +
    "country",
 +
    "topic1",
 +
    "topic2",
 +
    "topic3",
 +
    "topic4",
 +
    "topic5",
 +
    "topic6",
 +
    "topic7",
 +
    "topic8",
 +
    "topic9",
 +
    "topic10",
 +
    "trial_census",
 +
    "authority",
 +
    "website",
 +
    "participation",
 +
    "population",
 +
    "percent_change",
 +
    "region_type",
 +
    "most_populous",
 +
    "least_populous",
 +
    "additional_label1",
 +
    "additional_data1",
 +
    "additional_label2",
 +
    "additional_data2",
 +
    "additional_label3",
 +
    "additional_data3",
 +
    "additional_label4",
 +
    "additional_data4",
 +
    "additional_label5",
 +
    "additional_data5",
 +
    "annual_percent_change"
 +
  ],
 +
  "format":"block"
 
}
 
}
 
}}
 
}}

Revision as of 22:46, 7 November 2020

This infobox is for use on any census pages. You can list up to ten different census topics, specific the type of subdivision (state/territory etc) that the results are given in, link to the previous and next census, and change the scope of the census.

If |region= is not blank, it will use a "Region" label for the scope of the census, otherwise it will default to a "Country" label. By scope, we're referring to the geographical area completing the census.

Usage

Template:Parameter names example

{{Infobox census
| name = 
| logo = 
| logo_size = 
| image = 
| image_size = 
| previous_year = 
| previous_census = 
| date =
| next_year = 
| next_census = 
| region = 
| region_type = 
| country = 
| topic1 = 
| topic2 = 
| topic3 = 
...
| topic10 = 
| authority = 
| website = 
| participation = 
| population = 
| percent_change = 
| most_populous = 
| least_populous = 
| additional_label1 = 
| additional_data1 =
| additional_label2 = 
| additional_data2 = 
... 
| additional_label5
| additional_data5
}}

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Infobox census

Infobox to be used for pages for censuses.
ParameterDescriptionTypeStatus
Name of the censusname
The name of the census, although not necessarily the page name. For example, the 2021 United Kingdom census is called "Census 2021"
Example
Census 2021
Stringrequired
Logo sizelogo_sizeStringoptional
Logo captionlogo_captionStringoptional
ImageimageFileoptional
Image sizeimage_sizeStringoptional
Image captionimage_captionStringoptional
Previous census pageprevious_census
Page name for the previous census.
Example
2016 Australian census
Pageoptional
Previous census yearprevious_year
Year of the previous census.
Example
2016
Numberoptional
Next census pagenext_census
Page name for the next census.
Example
2025 Australian census
Pageoptional
Next census yearnext_year
Year of the next census.
Example
2025
Numberoptional
Countrycountry
Please only use this parameter if the census covers an entire country. If not, use region.
Example
Australia
Stringsuggested
Census datedateDatesuggested
Population recordedpopulation
Population value recorded in the census.
Numberoptional
Population percentage point changepercent_change
Change in percentage points versus the last census.
Stringoptional
Region typeregion_type
This is for setting the type of region that most and least populous data is provided in (could be state etc, could be city etc). Generally, go for the highest-level, such as state, over something like suburb or city.
Example
province
Stringoptional
Most populous regionmost_populousPageoptional
Least populous regionleast_populousPageoptional
Census authorityauthority
Operating authority for the census.
Example
Office of National Statistics
Stringoptional
Census websitewebsite
Please use the URL template.
URLoptional
Trial census datetrial_census
Data of a trial census, if run.
Dateoptional
Census participationparticipationStringoptional
First topictopic1
You can add up to 10 different topics to be investigated in the census, such as "housing", "employment", "education" etc
Stringoptional
Second topictopic2
Requires topic1 to not be empty to display.
Stringoptional
Third topictopic3
Requires topic1 to not be empty to display.
Stringoptional
Fourth topictopic4
Requires topic1 to not be empty to display.
Stringoptional
Fifth topictopic5
Requires topic1 to not be empty to display.
Stringoptional
Sixth topictopic6
Requires topic1 to not be empty to display.
Stringoptional
Seventh topictopic7
Requires topic1 to not be empty to display.
Stringoptional
Eighth topictopic8
Requires topic1 to not be empty to display.
Stringoptional
Ninth topictopic9
Requires topic1 to not be empty to display.
Stringoptional
Tenth topictopic10
Requires topic1 to not be empty to display.
Stringoptional
Region for the censusregion
This parameter is used when the census doesn't span an entire country, for example, only a state or territory.
Example
Queensland
Stringoptional
Additional data label 1additional_label1
Use this, paired with additional_data1, to add any additional results from the census
Stringoptional
Additional data 1additional_data1
Use this, paired with additional_label1, to add any additional results from the census
Stringoptional
Additional data label 2additional_label2
Use this, paired with additional_data2, to add any additional results from the census
Stringoptional
Additional data 2additional_data2
Use this, paired with additional_label2, to add any additional results from the census
Stringoptional
Additional data label 3additional_label3
Use this, paired with additional_data3, to add any additional results from the census
Stringoptional
Additional data 3additional_data3
Use this, paired with additional_label3, to add any additional results from the census
Stringoptional
Additional data label 4additional_label4
Use this, paired with additional_data4, to add any additional results from the census
Stringoptional
Additional data 4additional_data4
Use this, paired with additional_label4, to add any additional results from the census
Stringoptional
Additional data label 5additional_label5
Use this, paired with additional_data5, to add any additional results from the census
Stringoptional
Additional data 5additional_data5
Use this, paired with additional_label5, to add any additional results from the census
Stringoptional
annual_percent_changeannual_percent_changeUnknowndeprecated
Please use percent_change

Format: block