cansim0.4.4 package

Accessing Statistics Canada Data Table and Vectors

add_cansim_vectors_to_template

Retrieve series info for given table id and coordinates

add_provincial_abbreviations

Add provincial abbreviations as factor

cansim_old_to_new

Translate deprecated CANSIM table number into new NDM-format table cat...

cansim_repartition_cached_table

Repartitions a cached cansim table to a new partitioning scheme

categories_for_level

Use metadata to extract categories for column of specific level

collect_and_normalize

Collect data from a parquet, feather or sqlite query and normalize can...

create_index

create database index

csv2arrow

convert csv to arrow

csv2sqlite

convert csv to sqlite adapted from https://rdrr.io/github/coolbutusele...

disconnect_cansim_sqlite

Disconnect from a cansim database connection

fold_in_metadata_for_columns

Fold in metadata and for selected columns

get_cansim_changed_tables

Retrieve a list of modified tables since a given date

get_cansim_code_set

Get NDM code sets

get_cansim_column_categories

Retrieve Statistics Canada data table categories for a specific column

get_cansim_column_list

Retrieve Statistics Canada data table column list

get_cansim_connection

Retrieve a Statistics Canada data table using NDM catalogue number as ...

get_cansim_cube_metadata

Retrieve table metadata from Statistics Canada API

get_cansim_data_for_table_coord_periods

Retrieve data for specified Statistics Canada data product for last N ...

get_cansim_key_release_schedule

Major economic indicator release schedule

get_cansim_series_info_cube_coord

Retrieve series info for given table id and coordinates

get_cansim_sqlite

Retrieve a Statistics Canada data table using NDM catalogue number as ...

get_cansim_table_info

Retrieve Statistics Canada data table information

get_cansim_table_last_release_date

Get the latest release data for a StatCan table, if available

get_cansim_table_notes

Retrieve Statistics Canada data table notes and column categories

get_cansim_table_overview

Retrieve Statistics Canada data table overview text

get_cansim_table_short_notes

Retrieve Statistics Canada data table short notes

get_cansim_table_subject

Retrieve Statistics Canada data table subject detail

get_cansim_table_survey

Retrieve Statistics Canada data table survey detail

get_cansim_table_template

Retrieve table template from Statistics Canada API

get_cansim_table_url

Retrieve a Statistics Canada data table URL given a table number

get_cansim_vector_for_latest_periods

Retrieve data for specified Statistics Canada data vector(s) for last ...

get_cansim_vector_info

Retrieve metadata for specified Statistics Canada data vectors

get_cansim_vector

Retrieve data for a Statistics Canada data vector released within a gi...

get_cansim

Retrieve a Statistics Canada data table using NDM catalogue number

get_deduped_column_level_data

Get column names de-duplicated and in the correct order

list_cansim_cached_tables

List cached cansim arrow and SQlite databases

list_cansim_cubes

Get overview list for all Statistics Canada data cubes

list_cansim_sqlite_cached_tables

List cached cansim SQLite database

list_cansim_tables

Get overview list for all Statistics Canada data tables (deprecated)

normalize_cansim_values

Normalize retrieved data table values to appropriate scales

parse_metadata

Parse metadata

remove_cansim_cached_tables

Remove cached cansim SQLite and parquet database

remove_cansim_sqlite_cached_table

Remove cached cansim SQLite database

search_cansim_cubes

Search through Statistics Canada data cubes

search_cansim_tables

Search through Statistics Canada data tables (deprecated)

view_cansim_webpage

View CANSIM table or vector information in browser

Searches for, accesses, and retrieves Statistics Canada data tables, as well as individual vectors, as tidy data frames. This package enriches the tables with metadata, deals with encoding issues, allows for bilingual English or French language data retrieval, and bundles convenience functions to make it easier to work with retrieved table data. For more efficient data access the package allows for caching data in a local database and database level filtering, data manipulation and summarizing.

  • Maintainer: Jens von Bergmann
  • License: MIT + file LICENSE
  • Last published: 2025-08-19