| get_cansim_sqlite | R Documentation |
This method is deprecated and will be removed in a future version, please use 'get_cansim_connection(..., format="sqlite")' instead. Retrieves a data table using an NDM catalogue number as an SQLite table. Retrieved table data is cached permanently if a cache path is supplied or for duration of the current R session. The function will check against the latest release data for the table and emit a warning message if the cached table is out of date.
get_cansim_sqlite(
cansimTableNumber,
language = "english",
refresh = FALSE,
auto_refresh = FALSE,
timeout = 1000,
cache_path = Sys.getenv("CANSIM_CACHE_PATH")
)
cansimTableNumber |
the NDM table number to load |
language |
|
refresh |
(Optional) When set to |
auto_refresh |
(Optional) When set to |
timeout |
(Optional) Number of seconds StatCan is allowed to go without sending data before the download is abandoned, to work around scenarios where StatCan servers drop the network connection. This does not limit how long a download may take overall, a transfer that keeps delivering data is left alone. StatCan prepares a whole response before sending any of it, which for large requests can take the better part of a minute, so values much below the default of 200 risk cutting off legitimate requests. |
cache_path |
(Optional) Path to where to cache the table permanently. By default, the data is cached in the path specified by ‘Sys.getenv(’CANSIM_CACHE_PATH')', if this is set. Otherwise it will use 'tempdir()'. |
A database connection to a local SQLite database with the StatCan Table data.
Returns NULL if the data could not be retrieved because StatCan is unavailable.
## Not run:
con <- get_cansim_connection("34-10-0013", format="sqlite")
# Work with the data connection
glimpse(con)
disconnect_cansim_connection(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.