Skip to content

pycensus.census.countries.canada.toronto.build_schema

Generate schema/toronto_schema.json from the City of Toronto "Neighbourhood Profiles 2021" workbook (one row per characteristic, one column per neighbourhood). Run once after downloading the workbook; the loader then maps every feature to its workbook row.

python -m pycensus.census.countries.canada.toronto.build_schema path/to/nbhd_2021_census_profile_full_158model.xlsx

camel(text)

CamelCase feature name from a census characteristic label (units and sample notes removed, at most 70 characters).

Parameters:

Name Type Description Default
text str

Characteristic label.

required

Returns:

Type Description
str

The name.

build(xlsx)

Schema features of the Toronto neighbourhood profile spreadsheet, one per characteristic row.

Parameters:

Name Type Description Default
xlsx str

Path of the profile spreadsheet.

required

Returns:

Type Description
list

List of feature dicts.

global_features()

Schema features of the global columns taken from the Toronto profile.

Returns:

Type Description
list

List of feature dicts.