get_cansim_table_template: Retrieve table template from Statistics Canada API

get_cansim_table_templateR Documentation

Retrieve table template from Statistics Canada API

Description

A table template consists of the dimensions and members and coordinates of a table that can be used to explore and filter table data before downloading subsets of the table. To add vector Ids to (a possibly filtered) template the 'add_cansim_vectors_to_template' function can be used.

Usage

get_cansim_table_template(
  cansimTableNumber,
  language = "english",
  refresh = FALSE
)

Arguments

cansimTableNumber

A new or old CANSIM/NDM table number or a vector of table numbers

language

"english" (the default) or "french". Short forms such as "en", "eng", "fr" or "fra" are accepted, as are the French names "anglais" and "francais"; case and accents are ignored

refresh

Refresh the data from the Statistics Canada API

Value

a tibble containing the table template, with a 'cansimTableNumber' column identifying the table. When several table numbers are given, the templates are stacked and columns for dimensions that only appear in some of the tables are filled with 'NA' for the other tables.

Returns NULL if the data could not be retrieved because StatCan is unavailable.

Examples


get_cansim_table_template("34-10-0013")


cansim documentation built on Aug. 20, 2026, 1:07 a.m.