---
id: "iso3166code_compact"
kind: "pattern"
status: "draft"
is_pii: false
categories: ["geo"]
langs: ["common"]
quality: 75
url: "https://registry.apicrafter.io/datatype/iso3166code_compact"
---

# ISO 3166-2 subdivision code without a separator (`iso3166code_compact`)

> **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 from ISO 3166-2 written without the hyphen between the two-letter country code and the subdivision part, as in UYAR for Artigas, Uruguay (UY-AR). Uruguayan open data writes department codes this way. Any short upper-case code has the same shape, so the form alone does not identify the type; the column name and the country do.

- Pattern of: `iso3166code`
- 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-Z0-9]{1,3}$
```

## Examples

- `UYAR` — Artigas, Uruguay (ISO 3166-2 UY-AR)
- `UYMO` — Montevideo, Uruguay (ISO 3166-2 UY-MO)
- `UY-AR` (invalid example) — The hyphenated form, covered by iso3166code

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/ISO_3166-2:UY>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

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