{
  "id": "countrycode_alpha2",
  "kind": "pattern",
  "status": "stable",
  "name": "ISO 3166-1 Alpha2 country code",
  "doc": "ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO), to represent countries, dependent territories, and special areas of geographical interest.",
  "semantic_type": "country",
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "langs": [
    "common"
  ],
  "classification": "categorical",
  "regexp": "[A-Z]{2}",
  "examples": [
    {
      "value": "WF",
      "description": "Wallis and Futuna",
      "valid": true
    },
    {
      "value": "AI",
      "description": "Anguilla",
      "valid": true
    }
  ],
  "mappings": {
    "autotype": "countrycode",
    "bioregistry": "iso.3166-2",
    "fta": "COUNTRY.ISO-3166-2",
    "wikidata": "P297"
  },
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"
    },
    {
      "type": "wikidata",
      "url": "https://www.wikidata.org/wiki/Property:P297"
    }
  ],
  "detected_by": {
    "tools": [
      "autotype",
      "csvdetective",
      "fta",
      "greatexpectations",
      "ibmknowledgecatalog",
      "metacrafter",
      "metacrafterpro",
      "tableau",
      "talend",
      "woodwork"
    ],
    "metacrafter_rules": [
      {
        "rule": "iso3166-alpha2",
        "type": "data",
        "match": "text",
        "file": "common/intcodes.yaml"
      },
      {
        "rule": "iso3166-alpha2imprecise",
        "type": "data",
        "match": "text",
        "file": "common/intcodes.yaml"
      }
    ]
  },
  "quality": {
    "score": 80,
    "missing": [
      "anchored regexp",
      "negative example",
      "translation"
    ]
  },
  "source": {
    "path": "data/datatypes/any/geo/countrycode_alpha2.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/geo/countrycode_alpha2.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/countrycode_alpha2.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/countrycode_alpha2",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/countrycode_alpha2.json"
  }
}