{
  "id": "ca_cmauid",
  "kind": "datatype",
  "status": "draft",
  "name": "Canadian census metropolitan area or census agglomeration code (CMAUID)",
  "doc": "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).",
  "is_pii": false,
  "categories": [
    "geo",
    "government"
  ],
  "country": [
    "CA"
  ],
  "langs": [
    "en",
    "fr"
  ],
  "classification": "identifier",
  "regexp": "^\\d{3}$",
  "examples": [
    {
      "value": "535",
      "description": "Toronto, census metropolitan area",
      "valid": true
    },
    {
      "value": "527",
      "description": "Cobourg, census agglomeration",
      "valid": true
    },
    {
      "value": "825",
      "description": "Calgary",
      "valid": true
    },
    {
      "value": "205",
      "description": "Halifax",
      "valid": true
    },
    {
      "value": "5350",
      "description": "four digits",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www150.statcan.gc.ca/n1/pub/92f0138m/92f0138m2019001-eng.htm"
    },
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Census_geographic_units_of_Canada"
    }
  ],
  "translations": {
    "fr": {
      "name": "Code de région métropolitaine de recensement ou d'agglomération de recensement du Canada (RMRIDU)"
    },
    "ru": {
      "name": "Код переписной метрополии или агломерации Канады (CMAUID)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "cacmauidbyname",
        "type": "field",
        "match": "regex",
        "file": "ca/ca_stats.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/CA/geo/ca_cmauid.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/CA/geo/ca_cmauid.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/CA/geo/ca_cmauid.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/ca_cmauid",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/ca_cmauid.json"
  }
}