Accessing Statistics Canada Data Table and Vectors
Overview
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.
Minor changes
- table downloads now warn about repaired member labels the same way they warn about repaired column names. A table whose column names are clean but whose labels carry a non-breaking space, for example the province names in 13-10-0383, was repaired silently because the metadata parser assumed the column name warning had already covered it. Every download path reports it once now, and the warning is silenced by the same
options(cansim.suppress_repair_warnings=TRUE)(#169) - the repair warnings, the warning about a cache built before the repair and the warning about vector requests that return no data are no longer hard-wrapped to the width R reports at the time they are raised. That width matched the window only by luck, so the text broke in the middle of sentences in RStudio panes, knitted documents and resized terminals. Each sentence now starts on its own line and the window wraps the rest at its actual width
- the vignettes on listing tables, retrieving vectors and working with hierarchies ship with the package again. They had been excluded from the CRAN build since 2018 and were only reachable on the pkgdown site
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 53 (14 internal)
- Examples that run
- 4%2 run in a plain check · 20 only when donttest examples are enabled (R CMD check --as-cran) · 24 never run
- Exported functions with examples
- 100%
- Documented parameters
- 99%
- Return-value docs
- 93%
- Help pages citing references
- 2%
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 70
- Median days to close, 50 most recently updated closed PRs
- 14
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
6 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/mountainmath/cansim on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-11-15Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claudePull request it wrote: opened by a project memberCommits: at least 49 crediting it in the message
- Claude Opus 527 commits · Aug 2026
- Claude Opus 4.511 commits · Jan 2026
- Claude Fable 5.18 commits · Sep 2026
- Claude Fable 53 commits · Aug 2026
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.5.1Latest
- 0.5.02026-08-19 · diff ↗ ·
added 4 exports
disconnect_cansim_connection, get_cansim_changed_series_data_for_coordinates, get_cansim_changed_series_data_for_vectors, get_cansim_changed_series_list - RR 4.6.0 released · 2026-04-24
- 0.4.4
- 0.4.32025-05-30 · diff ↗
- 0.4.22025-05-12 · diff ↗ ·
added 3 exports
add_cansim_vectors_to_template, get_cansim_series_info_cube_coord, get_cansim_table_template - RR 4.5.0 released · 2025-04-11
- 0.4.12025-03-15 · diff ↗
- 0.42025-02-24 · diff ↗ ·
added 4 exports
cansim_repartition_cached_table, get_cansim_connection, list_cansim_cached_tables, remove_cansim_cached_tables - 0.3.17
- RR 4.4.0 released · 2024-04-24
- 0.3.162024-03-12 · diff ↗
- 0.3.152023-10-11 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.3.142023-01-20 · diff ↗
- 0.3.132022-11-07 · diff ↗
Show 26 earlier eventsHide 26 earlier events
- 0.3.122022-07-12 · diff ↗
- 0.3.112022-05-10 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.3.102021-09-27 · diff ↗
- unarchivedReturned to CRAN2021-07-29
- 0.3.9
- archivedRemoved from CRAN2021-07-25repeated violation of the CRAN policy Internet access, again
- unarchivedReturned to CRAN2021-05-27
- 0.3.82021-05-27 · diff ↗ ·
removed 1 export
adjust_cansim_values_by_variableadded 1 export
get_cansim_table_last_release_date - archivedRemoved from CRAN2021-05-24policy violation on Internet access
- RR 4.1.0 released · 2021-05-18
- 0.3.72021-05-10 · diff ↗
- 0.3.62021-05-08 · diff ↗ ·
added 5 exports
collect_and_normalize, disconnect_cansim_sqlite, get_cansim_sqlite, list_cansim_sqlite_cached_tables, remove_cansim_sqlite_cached_table - RR 4.0.0 released · 2020-04-24
- unarchivedReturned to CRAN2020-03-13
- 0.3.52020-03-13 · diff ↗
- archivedRemoved from CRAN2020-03-09policy violation On Internet access, repeatedly
- 0.3.42020-03-05 · diff ↗ ·
added 4 exports
get_cansim_code_set, get_cansim_table_short_notes, list_cansim_cubes, search_cansim_cubes - 0.3.32019-10-16 · diff ↗
- 0.3.22019-08-26 · diff ↗
- 0.3.12019-08-19 · diff ↗
- 0.3.0
- RR 3.6.0 released · 2019-04-26
- 0.2.32019-01-07 · diff ↗
- 0.2.22018-12-18
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-12-18
- Total releases
- 27 / 8 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1
- Bundled data
- 17 KB / 1 file
- Download size
- 734 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("cansim")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.