census_get_data | R Documentation |
This function provides an interface to Statistics Canada's 2016 Census geographies Web Data Service (WDS) and returns some or all Census Profile data for a geography of interest. Data is returned for individual regions specified by Dissemination Geography Unique Identifiers (or DGUIDs), which can correspond to census regions like dissemination areas, political regions like provinces and territories, or economic regions.
NOTE: This function is under active development, and it is my intention to turn it into a properly "tidy" function.
For more details on the underlying API, please see StatsCan's documentation here:
census_get_data(dguids = NA, topic = 0, notes = 0, stat = 0, lang = "E")
dguids |
A character vector or one-column dataframe containing the DGUIDs to query. Note: in a future version this will be made "tidier." |
topic |
Which subset of census data should be returned? The following values are accepted;
|
notes |
Should footnotes be returned? 0 = no (default), 1 = yes. |
stat |
What statistic should be returned? 0 = counts (default), 1 = rates. |
lang |
Language "EN" or "FR" (FIXME confirm!) |
Note: This function is under active development. Please send suggestions or bug reports to christopher.a.belanger (at) gmail.com.
data
## Not run: # get mobility data for Ottawa and Leeds & Grenville, Census Divisions 3506 & 3507. onsr::census_make_dguid(data = c("3506", "3507"), geouid_type = "CDUID", vintage_year = 2016) %>% onsr:::census_get_data(topic = 12) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.