---
id: "hasc"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 80
url: "http://registry.apicrafter.io/datatype/hasc"
---

# HASC code (Hierarchical administrative subdivision code) (`hasc`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of a country subdivision in the Statoids system: the ISO 3166-1 alpha-2 country code followed by two-letter codes of the first and second level divisions, separated by dots.

- Personal data (PII): no
- Categories: Geographic identifiers (geo)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^[A-Z]{2}(?:\.[A-Z]{2}){0,2}$
```

## Examples

- `US.CA.LO` — Los Angeles County
- `FR.NC` — Hauts-de-France
- `FR.NC.NO` — Nord

## Mappings

- wikidata: `P8119`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Hierarchical_administrative_subdivision_codes>
- doc: <https://www.statoids.com/ihasc.html>
- wikidata: <https://www.wikidata.org/wiki/Property:P8119>

## Quality

Score 80/100. Missing: negative example, translation, detector coverage.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/hasc.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/hasc.yaml>
