Package: cansim 0.3.17

Jens von Bergmann

cansim: Accessing Statistics Canada Data Table and Vectors

Searches for, accesses, and retrieves new-format and old-format Statistics Canada data tables, as well as individual vectors, as tidy data frames. This package 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. Optional caching features are provided.

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

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

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

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

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

3.52 score 1.7k downloads 33 exports 48 dependencies

Last updated 3 months agofrom:e8ac1473a7. Checks:1 OK, 1 NOTE. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKFeb 05 2025
R-4.5-linuxNOTEFeb 05 2025

Exports:add_provincial_abbreviationscansim_old_to_newcategories_for_levelcollect_and_normalizedisconnect_cansim_sqliteget_cansimget_cansim_changed_tablesget_cansim_code_setget_cansim_column_categoriesget_cansim_column_listget_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_cubeslist_cansim_sqlite_cached_tableslist_cansim_tablesnormalize_cansim_valuesremove_cansim_sqlite_cached_tablesearch_cansim_cubessearch_cansim_tablesview_cansim_webpage

Dependencies:askpassbitbit64blobcachemclicliprcpp11crayoncurlDBIdigestdplyrfansifastmapgenericsgluehmshttrjsonlitelifecyclemagrittrmemoisemimeopensslpillarpkgconfigplogrprettyunitsprogresspurrrR6readrrlangRSQLitervestselectrstringistringrsystibbletidyselecttzdbutf8vctrsvroomwithrxml2

Getting started with the cansim package

Rendered fromcansim.Rmdusingknitr::rmarkdownon Feb 05 2025.

Last update: 2021-07-29
Started: 2018-12-18

Working with large tables

Rendered fromworking_with_large_tables.Rmdusingknitr::rmarkdownon Feb 05 2025.

Last update: 2021-05-27
Started: 2021-05-08

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
Use metadata to extract categories for column of specific levelcategories_for_level
Collect data from connection 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 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 a Statistics Canada data table using NDM catalogue number as SQLite database connectionget_cansim_sqlite
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
Get overview list for all Statistics Canada data cubeslist_cansim_cubes
List cached cansim SQLite databaselist_cansim_sqlite_cached_tables
Normalize retrieved data table values to appropriate scalesnormalize_cansim_values
Remove cached cansim SQLite databaseremove_cansim_sqlite_cached_table
Search through Statistics Canada data cubessearch_cansim_cubes
View CANSIM table or vector information in browserview_cansim_webpage