View source: R/cansim_vectors.R
| get_cansim_data_for_table_coord_periods | R Documentation | 
Allows for the retrieval of data for a Statistics Canada data table with specific table and coordinates.
This allows partial targeted download of tables and can be effectively combined with the get_cansim_table_template
function to help pinpoint data series of interest.
The StatCan API can only process 300 coordinates at a time,
if more than 300 coordinates are specified the function will batch the requests to the API.
get_cansim_data_for_table_coord_periods(
  tableCoordinates,
  periods = NULL,
  language = "english",
  refresh = FALSE,
  timeout = 200,
  factors = TRUE,
  default_month = "07",
  default_day = "01"
)
| tableCoordinates | Either a list with vectors of coordinates by table number, or a
(filtered) data frame as returned by  | 
| periods | Optional numeric value for number of latest periods to retrieve data for, default is  | 
| language | 
 | 
| refresh | (Optional) When set to  | 
| timeout | (Optional) Timeout in seconds for downloading cansim table to work around scenarios where StatCan servers drop the network connection. | 
| factors | (Optional) Logical value indicating if dimensions should be converted to factors. (Default set to  | 
| default_month | The default month that should be used when creating Date objects for annual data (default set to "07") | 
| default_day | The default day of the month that should be used when creating Date objects for monthly data (default set to "01") | 
A tibble with data matching specified coordinate and period input arguments
## Not run: 
get_cansim_data_for_table_coord_periods(list("35-10-0003"=c("1.1","1.12")),periods=3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.