{
  "id": "th_subdistrict_code",
  "kind": "datatype",
  "status": "draft",
  "name": "Thai subdistrict code (tambon, khwaeng)",
  "doc": "Six-digit code of a subdistrict of Thailand (tambon, or khwaeng in Bangkok): the four-digit district code (th_district_code) and two digits of the subdistrict, as in 100101 for Phra Borom Maha Ratchawang in the Phra Nakhon district of Bangkok. The open data of the Bangkok Metropolitan Administration carries it in a column named scode.",
  "is_pii": false,
  "categories": [
    "geo",
    "government"
  ],
  "country": [
    "TH"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^(?:1[0-9]|2[0-7]|[34][0-9]|5[0-8]|6[0-7]|7[0-7]|8[0-6]|9[0-6])\\d{4}$",
  "examples": [
    {
      "value": "100101",
      "description": "Phra Borom Maha Ratchawang, Phra Nakhon, Bangkok",
      "valid": true
    },
    {
      "value": "100501",
      "description": "Anusawari, Bang Khen, Bangkok",
      "valid": true
    },
    {
      "value": "290101",
      "description": "29 is not a province code",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Tambon"
    }
  ],
  "translations": {
    "th": {
      "name": "รหัสตำบล"
    },
    "ru": {
      "name": "Код подрайона Таиланда (тамбон, кхвэнг)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "thsubdistrictcodebyname",
        "type": "field",
        "match": "regex",
        "file": "th/th_codes.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/TH/geo/th_subdistrict_code.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/TH/geo/th_subdistrict_code.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/TH/geo/th_subdistrict_code.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/th_subdistrict_code",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/th_subdistrict_code.json"
  }
}