Get census region data at the Canadian level in a tidy format.

get_region_data(dataset, query_vector, region_level = "CMA")

Arguments

dataset

character vector of the data set name (e.g., "CA16")

query_vector

character vector of vector from which to retrieve the data (e.g., "v_CA16_815")

region_level

character vector of which region to aggregate by. Default is "CMA" for Census Metropolitan Area.

Value

a tidy data frame of region data at the Canadian level

Examples

if (FALSE) { library(canlang) options(cancensus.api_key = "your_api_key") get_region_data("CA16", "v_CA16_563") }