get_cansim | R Documentation |
Retrieves a data table using an NDM catalogue number as a tidy data frame. Retrieved table data is cached for the duration of the current R session only by default.
get_cansim(
cansimTableNumber,
language = "english",
refresh = FALSE,
timeout = 200,
factors = TRUE,
default_month = "07",
default_day = "01"
)
cansimTableNumber |
the NDM table number to load |
language |
|
refresh |
(Optional) When set to |
timeout |
(Optional) Timeout in seconds for downloading cansim table to work around scenarios where StatCan servers drop the network connection. |
factors |
(Optional) Logical value indicating if dimensions should be converted to factors. (Default set to |
default_month |
The default month that should be used when creating Date objects for annual data (default set to "07") |
default_day |
The default day of the month that should be used when creating Date objects for monthly data (default set to "01")
Set to higher values for large tables and slow network connection. (Default is |
A tibble with StatCan Table data and added Date
column with inferred date objects and
added val_norm
column with normalized value from the VALUE
column.
## Not run:
get_cansim("34-10-0013")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.