{
  "id": "iso3166code_compact",
  "kind": "pattern",
  "status": "draft",
  "name": "ISO 3166-2 subdivision code without a separator",
  "doc": "Code of a country subdivision from ISO 3166-2 written without the hyphen between the two-letter country code and the subdivision part, as in UYAR for Artigas, Uruguay (UY-AR). Uruguayan open data writes department codes this way. Any short upper-case code has the same shape, so the form alone does not identify the type; the column name and the country do.",
  "semantic_type": "iso3166code",
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "^[A-Z]{2}[A-Z0-9]{1,3}$",
  "examples": [
    {
      "value": "UYAR",
      "description": "Artigas, Uruguay (ISO 3166-2 UY-AR)",
      "valid": true
    },
    {
      "value": "UYMO",
      "description": "Montevideo, Uruguay (ISO 3166-2 UY-MO)",
      "valid": true
    },
    {
      "value": "UY-AR",
      "description": "The hyphenated form, covered by iso3166code",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/ISO_3166-2:UY"
    }
  ],
  "quality": {
    "score": 75,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "translation",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/geo/iso3166code_compact.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/geo/iso3166code_compact.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/iso3166code_compact.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/iso3166code_compact",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/iso3166code_compact.json"
  }
}