census_get_data_one: Get 2016 Census Profile data for a geography of interest.

View source: R/census.R

census_get_data_oneR Documentation

Get 2016 Census Profile data for a geography of interest.

Description

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:

Usage

census_get_data_one(dguid = NA, topic = 0, notes = 0, stat = 0, lang = "E")

Arguments

dguid

For more details, please see Dissemination Geography Unique Identifier: Definition and Structure

topic

Which subset of census data should be returned? The following values are accepted;

  • 0 = All topics (default)

  • 1 = Aboriginal peoples

  • 2 = Education

  • 3 = Ethnic origin

  • 4 = Families, households and marital status

  • 5 = Housing

  • 6 = Immigration and citizenship

  • 7 = Income

  • 8 = Journey to work

  • 9 = Labour

  • 10 = Language

  • 11 = Language of work

  • 12 = Mobility

  • 13 = Population

  • 14 = Visible minority

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!)

Value

data

Examples

## Not run: 
# get mobility data for Ottawa, Census Division 3506
onsr::census_make_dguid(data = "3506",
                       geouid_type = "CDUID",
                       vintage_year = 2016) %>%
onsr:::census_get_data_one(topic = 12)

## End(Not run)

Ottawa-Neighbourhood-Study/onsr documentation built on June 19, 2022, 11:46 a.m.