get_cansim_data_for_table_coord_periods {cansim}R Documentation

Retrieve data for specified Statistics Canada data product for last N periods for specific coordinates

Description

Allows for the retrieval of data for a Statistics Canada data table with specific coordinates for the N most-recently released periods. Caution: coordinates are concatenations of table member ID values and require familiarity with the TableMetadata data structure. Coordinates have a maximum of ten dimensions.

Usage

get_cansim_data_for_table_coord_periods(
  cansimTableNumber,
  coordinate,
  periods = 1,
  refresh = FALSE,
  timeout = 200,
  factors = TRUE,
  default_month = "07",
  default_day = "01"
)

Arguments

cansimTableNumber

Statistics Canada data table number

coordinate

A string of table coordinates in the form "1.1.1.36.1.0.0.0.0.0"

periods

Numeric value for number of latest periods to retrieve data for

refresh

(Optional) When set to TRUE, forces a reload of data table (default is FALSE)

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 TRUE).

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")

Value

A tibble with data matching specified coordinate and period input arguments

Examples


get_cansim_data_for_table_coord_periods("35-10-0003",coordinate="1.12.0.0.0.0.0.0.0.0",periods=3)


[Package cansim version 0.3.8 Index]