Difference between revisions of "Template:CanadaCensus/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>J Hooper
(Show error for missing code)
imported>J Hooper
(Color for code)
 
Line 4: Line 4:
 
|title=National Household Survey (NHS) Profile, 2011
 
|title=National Household Survey (NHS) Profile, 2011
 
|access-date={{{access-date|{{{accessdate|}}} }}}
 
|access-date={{{access-date|{{{accessdate|}}} }}}
}}{{#if:{{{code|}}}||{{color|#CC0000| Missing or empty {{font|font=Courier|text=<nowiki>|code=</nowiki>}} ([[Template:CanadaCensus/doc|help]])}}}}</includeonly><noinclude>
+
}}{{#if:{{{code|}}}||{{color|#CC0000| Missing or empty {{font|font=Courier|color=#CC0000|text=<nowiki>|code=</nowiki>}} ([[Template:CanadaCensus/doc|help]])}}}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 05:57, 22 November 2016

Template documentation[view] [edit] [history] [purge]

This template provides a direct link to 2011 Statistics Canada Census data for a given city/village in Canada identified by a numeric code. It abstracts the complex URL that references a specific city's data on the Statistics Canada web site, replacing it with a single numeric parameter corresponding to the city's code in the site's database.

Usage

Required parameters

  • code: The unique code from the URL resulting from searching for the city using the web form (for example, the 3538030 in &Code1=3538030)

Optional parameters

  • access-date: The date the search results were last queried from the site by the editor. Alias: accessdate

Examples

{{CanadaCensus|code=3538030|access-date=17 November 2016}} gives:

"National Household Survey (NHS) Profile, 2011". Statistics Canada. Retrieved 17 November 2016.