{
  "id": "pt_bgri_code",
  "kind": "datatype",
  "status": "draft",
  "name": "Portuguese census subsection code (BGRI)",
  "doc": "Eleven-digit code of a statistical subsection in the Base Geográfica de Referenciação de Informação (BGRI) of Statistics Portugal, the smallest area of the census: the six-digit parish code (pt_dicofre), three digits of the statistical section and two of the subsection, as in 17032100111. Census layers of 2011 carry it in columns named BGRI11 or GEO_COD, with the parts in DTMN11, FR11, SEC11 and SS11.",
  "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{9}$",
  "examples": [
    {
      "value": "17032100111",
      "description": "a subsection in Chaves",
      "valid": true
    },
    {
      "value": "17090200112",
      "description": "a subsection in Ribeira de Pena",
      "valid": true
    },
    {
      "value": "170321001",
      "description": "without the subsection",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://mapas.ine.pt/"
    }
  ],
  "translations": {
    "pt": {
      "name": "Código da subsecção estatística (BGRI)"
    },
    "ru": {
      "name": "Код статистической подсекции переписи Португалии (BGRI)"
    }
  },
  "detected_by": {
    "tools": [
      "metacrafter"
    ],
    "metacrafter_rules": [
      {
        "rule": "ptbgribyname",
        "type": "field",
        "match": "regex",
        "file": "pt/pt_codes.yaml"
      }
    ]
  },
  "quality": {
    "score": 90,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)"
    ]
  },
  "source": {
    "path": "data/datatypes/PT/geo/pt_bgri_code.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/PT/geo/pt_bgri_code.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/PT/geo/pt_bgri_code.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/pt_bgri_code",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/pt_bgri_code.json"
  }
}