Learn R Programming

cancensus (version 0.5.7)

get_statcan_geographies: Read the geosuite data

Description

Reads the original unprocessed geographic boundary files from Statistics Canada

Usage

get_statcan_geographies(
  census_year,
  level,
  type = "cartographic",
  cache_path = NULL,
  timeout = 1000,
  refresh = FALSE,
  quiet = FALSE
)

Value

a spatial dataframe with the geographic data

Arguments

census_year

census year to get the data for, right now only 2021 is supported

level

geographic level to return the data for, valid choices are "PR","CD","CMACA","CSD","CT","ADA","DA","ER","FED","DPL","POPCNTR", "FSA"

type

type of geographic data, valid choices area "cartographic" or "digital"

cache_path

optional path to cache the data. If the cancensus cache path is set the geographic data gets cached in the "geographies" subdirectory of the cancensus cache path.

timeout

optional timeout parameter, adjust as needed if the data download times out when using slow connections

refresh

(logical) refresh the cache if true

quiet

(logical) suppress messages if `TRUE`

Examples

Run this code
# get the digital geographic boundaries for provinces and territories
if (FALSE) {
get_statcan_geographies(census_year="2021",level="PR",type="digital")
}

Run the code above in your browser using DataLab