MountainMath
  • About
  • Blog

cansim

R package for accessing Statistics Canada CANSIM/NDM data tables.

cansim is an R package for accessing Statistics Canada’s CANSIM/NDM data tables. It handles table downloads, local caching, and normalization of the metadata hierarchy, making it straightforward to pull any Statistics Canada time series directly into R with a single function call.

The package covers the full range of CANSIM tables — GDP, labour force, housing starts, CPI, and thousands more — and returns tidy data frames or a connection to a cached parquet database compatible with the tidyverse. Cached data avoids redundant downloads across sessions.

View cansim Documentation