Package: cansim 0.4

cansim: Accessing Statistics Canada Data Table and Vectors

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.

Authors:Jens von Bergmann [aut, cre], Dmitry Shkolnik [aut]

cansim_0.4.tar.gz
cansim_0.4.zip(r-4.5)cansim_0.4.zip(r-4.4)cansim_0.4.zip(r-4.3)
cansim_0.4.tgz(r-4.5-any)cansim_0.4.tgz(r-4.4-any)cansim_0.4.tgz(r-4.3-any)
cansim_0.4.tar.gz(r-4.5-noble)cansim_0.4.tar.gz(r-4.4-noble)
cansim_0.4.tgz(r-4.4-emscripten)cansim_0.4.tgz(r-4.3-emscripten)
cansim.pdf |cansim.html
cansim/json (API)
NEWS

# Install 'cansim' in R:
install.packages('cansim', repos = c('https://mountainmath.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mountainmath/cansim/issues

Pkgdown site:https://mountainmath.github.io

On CRAN:

Conda:

8.65 score 45 stars 446 scripts 1.9k downloads 37 exports 49 dependencies

Last updated 13 days agofrom:26bd89944d. Checks:8 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 24 2025
R-4.5-winOKFeb 24 2025
R-4.5-macOKFeb 24 2025
R-4.5-linuxOKFeb 24 2025
R-4.4-winOKFeb 24 2025
R-4.4-macOKFeb 24 2025
R-4.3-winOKFeb 24 2025
R-4.3-macOKFeb 24 2025

Exports:add_provincial_abbreviationscansim_old_to_newcansim_repartition_cached_tablecategories_for_levelcollect_and_normalizedisconnect_cansim_sqliteget_cansimget_cansim_changed_tablesget_cansim_code_setget_cansim_column_categoriesget_cansim_column_listget_cansim_connectionget_cansim_cube_metadataget_cansim_data_for_table_coord_periodsget_cansim_key_release_scheduleget_cansim_sqliteget_cansim_table_infoget_cansim_table_last_release_dateget_cansim_table_notesget_cansim_table_overviewget_cansim_table_short_notesget_cansim_table_subjectget_cansim_table_surveyget_cansim_table_urlget_cansim_vectorget_cansim_vector_for_latest_periodsget_cansim_vector_infolist_cansim_cached_tableslist_cansim_cubeslist_cansim_sqlite_cached_tableslist_cansim_tablesnormalize_cansim_valuesremove_cansim_cached_tablesremove_cansim_sqlite_cached_tablesearch_cansim_cubessearch_cansim_tablesview_cansim_webpage

Dependencies:arrowaskpassassertthatbitbit64blobcachemclicliprcpp11crayoncurlDBIdbplyrdigestdplyrfansifastmapgenericsgluehmshttrjsonlitelifecyclemagrittrmemoisemimeopensslpillarpkgconfigplogrprettyunitsprogresspurrrR6readrrlangRSQLitestringistringrsystibbletidyrtidyselecttzdbutf8vctrsvroomwithr

Getting started with the cansim package

Rendered fromcansim.Rmdusingknitr::rmarkdownon Feb 24 2025.

Last update: 2021-07-28
Started: 2018-09-28

Working with large tables

Rendered fromworking_with_large_tables.Rmdusingknitr::rmarkdownon Feb 24 2025.

Last update: 2025-02-24
Started: 2021-05-10

Readme and manuals

Help Manual

Help pageTopics
Add provincial abbreviations as factoradd_provincial_abbreviations
Translate deprecated CANSIM table number into new NDM-format table catalogue numbercansim_old_to_new
Repartitions a cached cansim table to a new partitioning schemecansim_repartition_cached_table
Use metadata to extract categories for column of specific levelcategories_for_level
Collect data from a parquet, feather or sqlite query and normalize cansim table outputcollect_and_normalize
Disconnect from a cansim database connectiondisconnect_cansim_sqlite
Retrieve a Statistics Canada data table using NDM catalogue numberget_cansim
Retrieve a list of modified tables since a given dateget_cansim_changed_tables
Get NDM code setsget_cansim_code_set
Retrieve Statistics Canada data table categories for a specific columnget_cansim_column_categories
Retrieve Statistics Canada data table column listget_cansim_column_list
Retrieve a Statistics Canada data table using NDM catalogue number as parquet, feather, or sqlite database connectionget_cansim_connection
Retrieve table metadata from Statistics Canada APIget_cansim_cube_metadata
Retrieve data for specified Statistics Canada data product for last N periods for specific coordinatesget_cansim_data_for_table_coord_periods
Major economic indicator release scheduleget_cansim_key_release_schedule
Retrieve Statistics Canada data table informationget_cansim_table_info
Get the latest release data for a StatCan table, if availableget_cansim_table_last_release_date
Retrieve Statistics Canada data table notes and column categoriesget_cansim_table_notes
Retrieve Statistics Canada data table overview textget_cansim_table_overview
Retrieve Statistics Canada data table short notesget_cansim_table_short_notes
Retrieve Statistics Canada data table subject detailget_cansim_table_subject
Retrieve Statistics Canada data table survey detailget_cansim_table_survey
Retrieve a Statistics Canada data table URL given a table numberget_cansim_table_url
Retrieve data for a Statistics Canada data vector released within a given time frameget_cansim_vector
Retrieve data for specified Statistics Canada data vector(s) for last N periodsget_cansim_vector_for_latest_periods
Retrieve metadata for specified Statistics Canada data vectorsget_cansim_vector_info
List cached cansim arrow and SQlite databaseslist_cansim_cached_tables
Get overview list for all Statistics Canada data cubeslist_cansim_cubes
Remove cached cansim SQLite and parquet databaseremove_cansim_cached_tables
Search through Statistics Canada data cubessearch_cansim_cubes
View CANSIM table or vector information in browserview_cansim_webpage