{
  "id": "pe_ubigeo",
  "kind": "datatype",
  "status": "draft",
  "name": "Peruvian UBIGEO code",
  "doc": "Geographic location code of the Peruvian statistics institute (INEI): six digits, two each for the department (01 to 25), the province and the district, such as 150101 for the district of Lima. Two- and four-digit forms name a department or a province. Files that store it as a number lose the leading zero.",
  "is_pii": false,
  "categories": [
    "geo",
    "government"
  ],
  "country": [
    "PE"
  ],
  "langs": [
    "es"
  ],
  "classification": "identifier",
  "regexp": "^(?:0[1-9]|1\\d|2[0-5])(?:\\d{2}){0,2}$",
  "examples": [
    {
      "value": "150101",
      "description": "District of Lima",
      "valid": true
    },
    {
      "value": "010101",
      "description": "District of Chachapoyas, Amazonas",
      "valid": true
    },
    {
      "value": "0801",
      "description": "Province of Cusco",
      "valid": true
    },
    {
      "value": "260101",
      "description": "There are 25 department codes",
      "valid": false
    },
    {
      "value": "15010",
      "description": "Five digits",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/UBIGEO"
    }
  ],
  "translations": {
    "ru": {
      "name": "Код UBIGEO (Перу)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "peubigeobyname",
        "type": "field",
        "match": "regex",
        "file": "pe/pe_geo.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/PE/geo/pe_ubigeo.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/PE/geo/pe_ubigeo.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/PE/geo/pe_ubigeo.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/pe_ubigeo",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/pe_ubigeo.json"
  }
}