{
  "id": "es_ccaa_code",
  "kind": "datatype",
  "status": "draft",
  "name": "Spanish autonomous community code (INE)",
  "doc": "Two-digit code of an autonomous community or autonomous city of Spain in the list of the National Statistics Institute (INE), from 01 for Andalucía to 17 for La Rioja, 18 for Ceuta and 19 for Melilla; 13 is the Comunidad de Madrid and 10 the Comunitat Valenciana. Statistical and administrative tables give it in columns named cod_comunidad, codigo_de_ca, cod_ccaa or cod_autonomia, often without the leading zero.",
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "country": [
    "ES"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "^(?:0[1-9]|1[0-9])$",
  "examples": [
    {
      "value": "13",
      "description": "Madrid, Comunidad de",
      "valid": true
    },
    {
      "value": "07",
      "description": "Castilla y León",
      "valid": true
    },
    {
      "value": "19",
      "description": "Melilla",
      "valid": true
    },
    {
      "value": "20",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www.ine.es/daco/daco42/codmun/cod_ccaa.htm"
    }
  ],
  "translations": {
    "es": {
      "name": "Código de comunidad autónoma (INE)"
    },
    "ru": {
      "name": "Код автономного сообщества Испании (INE)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "esccaacodebyname",
        "type": "field",
        "match": "regex",
        "file": "es/es_codes.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/ES/geo/es_ccaa_code.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/ES/geo/es_ccaa_code.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/geo/es_ccaa_code.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/es_ccaa_code",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/es_ccaa_code.json"
  }
}