---
id: "ca_cmauid"
kind: "datatype"
status: "draft"
is_pii: false
name: "Canadian census metropolitan area or census agglomeration code (CMAUID)"
regexp: "^\\d{3}$"
categories: ["geo", "government"]
country: ["CA"]
langs: ["en", "fr"]
quality: 90
url: "https://registry.apicrafter.io/datatype/ca_cmauid"
---

# Canadian census metropolitan area or census agglomeration code (CMAUID) (`ca_cmauid`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Three-digit code that Statistics Canada gives every census metropolitan area (CMA) and census agglomeration (CA); it is unique in Canada, and its first digit is the second digit of the code of the province where the area lies (535 Toronto in Ontario, 35). Census files name the field CMAUID or CMACA; public use microdata files of surveys carry it as CMA with 000, 996 or 999 for the rest of a province. The code is also the first three digits of a census tract identifier (ca_ctuid).

- Personal data (PII): no
- Categories: Geographic identifiers (geo), Government related (government)
- Countries: Canada (CA)
- Languages: English (en), French (fr)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\d{3}$
```

## Examples

- `535` — Toronto, census metropolitan area
- `527` — Cobourg, census agglomeration
- `825` — Calgary
- `205` — Halifax
- `5350` (invalid example) — four digits

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `cacmauidbyname` (field, `ca/ca_stats.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- fr: Code de région métropolitaine de recensement ou d'agglomération de recensement du Canada (RMRIDU)
- ru: Код переписной метрополии или агломерации Канады (CMAUID)

## Sources

- doc: <https://www150.statcan.gc.ca/n1/pub/92f0138m/92f0138m2019001-eng.htm>
- wikipedia: <https://en.wikipedia.org/wiki/Census_geographic_units_of_Canada>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/ca_cmauid.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/CA/geo/ca_cmauid.yaml>
