get_cansim_cube_metadata: Retrieve table metadata from Statistics Canada API

get_cansim_cube_metadataR Documentation

Retrieve table metadata from Statistics Canada API

Description

Retrieves table metadata given an input table number or vector of table numbers using either the new or old table number format. Patience is suggested as the Statistics Canada API can be very slow. The 'list_cansim_tables()' function can be used as an alternative to retrieve a (cached) list of CANSIM tables with (more limited) metadata.

Usage

get_cansim_cube_metadata(cansimTableNumber, type = "overview", refresh = FALSE)

Arguments

cansimTableNumber

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

type

Which type of metadata to get, options are "overview", "members", "notes", or "corrections".

refresh

Refresh the data from the Statistics Canada API

Value

a tibble containing the table metadata. When several table numbers are given, the metadata for all tables is retrieved in a single API call and the results are stacked. Types other than "overview" carry no table identifier of their own, for those a 'cansimTableNumber' column is added to identify the table.

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

Examples


get_cansim_cube_metadata("34-10-0013")


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