Learn R Programming

cansim (version 0.4.2)

add_cansim_vectors_to_template: Retrieve series info for given table id and coordinates

Description

Retrieves vector information for given table and coordinates. This can be used to query data by vectors, it only returns vector information on coordinates which are present in the data table, so it gives an effective way to filter coordinates. Vector information is not available for census data tables.

Usage

add_cansim_vectors_to_template(template, refresh = FALSE)

Value

a tibble containing the table template with added vector information

Arguments

template

A (possibly filtered) cansim table template as returned by `get_cansim_table_template`

refresh

Refresh the data from the Statistics Canada API

Examples

Run this code
if (FALSE) {
template <- get_cansim_table_template("34-10-0013")
template |> filter(Geography=="Canada") |>
  add_cansim_vectors_to_template()
}

Run the code above in your browser using DataLab