{
  "id": "pt_dicofre",
  "kind": "datatype",
  "status": "draft",
  "name": "Portuguese DICOFRE code",
  "doc": "Code of an administrative unit of Portugal in the Carta Administrativa Oficial de Portugal (CAOP): two digits of the district or island (DI: 01 Aveiro to 18 Viseu, 31 and 32 Madeira, 41 to 49 the Azores), two of the municipality (CO) and two of the civil parish (FRE). The four-digit form (DICO, called DTMN in census files) names a municipality, as in 1703 for Chaves, and the six-digit form a parish, as in 170301. Municipal geoportals carry it in columns named DICOFRE, DTMN11 or COD_INE. The subsection code of the census (pt_bgri_code) starts with it.",
  "is_pii": false,
  "categories": [
    "geo",
    "government"
  ],
  "country": [
    "PT"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^(?:0[1-9]|1[0-8]|3[12]|4[1-9])\\d{2}(?:\\d{2})?$",
  "examples": [
    {
      "value": "170301",
      "description": "a parish of Chaves, district of Vila Real",
      "valid": true
    },
    {
      "value": "010121",
      "description": "a parish of Águeda, district of Aveiro",
      "valid": true
    },
    {
      "value": "1703",
      "description": "Chaves, the four-digit municipality code",
      "valid": true
    },
    {
      "value": "190101",
      "description": "19 is not a district",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www.dgterritorio.gov.pt/cartografia/cartografia-tematica/caop"
    }
  ],
  "translations": {
    "pt": {
      "name": "Código DICOFRE"
    },
    "ru": {
      "name": "Код DICOFRE (Португалия)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "ptdicofrebyname",
        "type": "field",
        "match": "regex",
        "file": "pt/pt_codes.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/PT/geo/pt_dicofre.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/PT/geo/pt_dicofre.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/PT/geo/pt_dicofre.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/pt_dicofre",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/pt_dicofre.json"
  }
}