Regenerate the card in the conventional dataset card order
Browse filesGenerated with build_card.py from 3char-pipeline; card_check.py passes. No Parquet file changed.
- CHANGELOG.md +1 -1
- README.md +114 -121
CHANGELOG.md
CHANGED
|
@@ -6,7 +6,7 @@ Documentation only. No Parquet file has changed since 0.1.1.
|
|
| 6 |
|
| 7 |
### Card
|
| 8 |
|
| 9 |
-
The card was restructured as the description of a scientific data resource. It now opens with a definition of the collection and the reason it exists, describes the five kinds of list it contains (assigned codes, symbols, vocabulary terms, community conventions and test vectors), and then covers uses, loading, construction, findings, licensing and limitations. The
|
| 10 |
|
| 11 |
A new section, with a figure, shows which lists describe the same entities, under the same codes or under different ones, and how many shared codes carry the same name in two systems.
|
| 12 |
|
|
|
|
| 6 |
|
| 7 |
### Card
|
| 8 |
|
| 9 |
+
The card was restructured as the description of a scientific data resource. It now opens with a definition of the collection and the reason it exists, describes the five kinds of list it contains (assigned codes, symbols, vocabulary terms, community conventions and test vectors), and then covers uses, loading, construction, findings, licensing and limitations. The card follows the usual order of a dataset card (contents, uses, structure, construction, analyses, limitations, licensing, related resources, citation) and ends with the full inventory of the 58 systems, listing each system's kind, authority, size and regular expression. System names are displayed with an initial capital, while the stored values are unchanged. The citation title now reads "58 code systems and controlled vocabularies" instead of "58 identifier systems".
|
| 10 |
|
| 11 |
A new section, with a figure, shows which lists describe the same entities, under the same codes or under different ones, and how many shared codes carry the same name in two systems.
|
| 12 |
|
README.md
CHANGED
|
@@ -258,13 +258,11 @@ configs:
|
|
| 258 |
---
|
| 259 |
# 3char
|
| 260 |
|
| 261 |
-
3char is a curated collection of code systems, identifiers, symbols and controlled vocabularies from documented reference sources. It
|
| 262 |
|
| 263 |
-
|
| 264 |
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
## What the collection contains
|
| 268 |
|
| 269 |
The 58 sources span ten domains, from biology and finance to language, transport and time. They are not all the same kind of list, and the difference matters when a record is read:
|
| 270 |
|
|
@@ -276,7 +274,7 @@ The 58 sources span ten domains, from biology and finance to language, transport
|
|
| 276 |
| Conventions maintained by a community | 2 | File extensions, FourCC codec identifiers |
|
| 277 |
| Test vectors | 1 | The reference test cases of the Open Location Code encoder |
|
| 278 |
|
| 279 |
-
Entries also differ in status within a list. The HTTP status code registry is included together with its unassigned values, one row per unassigned code (436 rows, marked `unassigned`), and five sources keep entries they mark as no longer in use (6,793 rows, marked `deprecated`).
|
| 280 |
|
| 281 |
The name comes from the three-character codes, such as airport, currency and country codes, with which the collection began. Codes in the collection range from one character to media types of 84.
|
| 282 |
|
|
@@ -284,12 +282,12 @@ The name comes from the three-character codes, such as airport, currency and cou
|
|
| 284 |
|
| 285 |
- **Validating and normalizing codes.** Each list and its regular expression show whether a string is an entry in the recorded edition of the list, and whether it has the form the source defines.
|
| 286 |
- **Grounding language models and search.** The lists can serve as lookup tables or retrieval corpora that map codes to names and back. [Retrieval](#retrieval) summarizes how the presentation of records affected retrieval in a controlled sample.
|
| 287 |
-
- **Studying
|
| 288 |
- **Linking tables.** Country codes stored in `extra`, such as `extra.country` in the airport systems and `extra.iso3` in `lng/ioc`, connect several systems to ISO 3166-1.
|
| 289 |
|
| 290 |
For operational work that depends on the latest edition of a list, such as billing with ICD-10-CM, compare `version` and `retrieved_at` with the source's current release.
|
| 291 |
|
| 292 |
-
##
|
| 293 |
|
| 294 |
```python
|
| 295 |
from datasets import load_dataset
|
|
@@ -338,7 +336,7 @@ Every system has the same Arrow schema, with one row per entry:
|
|
| 338 |
|
| 339 |
Across systems, a record is identified by `(system_id, code)`, or by `(system_id, extra.locode)` in `trp/unl`. A code without its system does not identify a record.
|
| 340 |
|
| 341 |
-
##
|
| 342 |
|
| 343 |
The data is produced by [3char-pipeline](https://github.com/brennercruvinel/3char-pipeline), which downloads each source, parses it into the common schema and checks the result. A source is included when four conditions hold, each checked by a column or a file in the pipeline:
|
| 344 |
|
|
@@ -357,9 +355,9 @@ Eight systems first taken from secondary copies (gists, unlicensed repositories,
|
|
| 357 |
|
| 358 |
Every build verifies each raw file against its recorded checksum and tests each entry against its system's regular expression; either check stops the build on a mismatch. Only systems whose `license_status` is `ok` or `check` are published (see [Licensing](#licensing)).
|
| 359 |
|
| 360 |
-
##
|
| 361 |
|
| 362 |
-
Every figure in this section is produced by a script in the pipeline (`census.py`, `keys.py`, `equivalences.py`, `crosscheck_wikidata.py`) and checked against this card by `card_check.py`.
|
| 363 |
|
| 364 |
### Codes shared between systems
|
| 365 |
|
|
@@ -373,7 +371,7 @@ Codes are compared after case folding, and a code is shared when the same folded
|
|
| 373 |
| In eleven systems, the maximum | 2 (`and`, `car`) |
|
| 374 |
| In two or more systems, counting the derived pair `lng/b47` and `lng/i63` once | 14,845 |
|
| 375 |
|
| 376 |
-
A shared string is not necessarily a shared meaning.
|
| 377 |
|
| 378 |
Every code in eight systems also occurs in at least one other system: `bio/aa1`, `bio/aa3`, `bio/cdn`, `lng/i31`, `lng/i39`, `lng/i63`, `lng/mdy` and `wrt/iau`. In `trp/iata`, `lng/ioc`, `lng/i15`, `trp/ica2` and `fin/i42`, more than 98% of codes do. Without case folding there are 632,457 distinct strings, of which 21,255 occur in more than one system. Within `trp/unl`, 18,748 codes repeat because the key is the country plus the code; these repetitions are not counted as sharing between systems.
|
| 379 |
|
|
@@ -426,30 +424,7 @@ In each divergence, the rejected codes appear in the source's current file and t
|
|
| 426 |
|
| 427 |
In a separate test, a bare code shared by several sampled systems retrieved a record of the intended system in 33.0% of 182 cases, the rate of a random choice among those systems; with the system name in both the chunk and the query, it did so in all cases. With 51 questions, one question is worth 1.96 points of recall, and the results describe this sample only.
|
| 428 |
|
| 429 |
-
##
|
| 430 |
-
|
| 431 |
-
The dataset has no single license. Each row of the `systems` configuration records `license` and `license_status`. The `license` column takes 27 distinct values: an SPDX identifier where one applies, and otherwise a short tag defined in `LICENSES.md`. Of the 58 published systems, 56 have the status `ok` and 2 have the status `check`.
|
| 432 |
-
|
| 433 |
-
- **No stated terms (`check`).** `fin/cfi` and `fin/i42` come from SIX Group, which publishes both lists free of charge but states no terms for redistribution, so their redistribution status is unconfirmed. They are included because the codes are plain facts in worldwide use; this is the curator's judgment, not a grant of rights. Anyone who redistributes them commercially should first obtain SIX Group's terms.
|
| 434 |
-
- **Copyleft and share-alike (seven systems).** `cmp/frc` (GPL-2.0-or-later) and `cmp/git` (GPL-2.0-only) are lists extracted from GPL source trees; `cmp/vim` is under the Vim license; `grf/sch` and `grf/sio` are under CC-BY-SA-3.0; `lng/i31` is under CC-BY-SA-4.0, the license of its mirror; and `trp/ica2` is under ODbL-1.0. Their attribution requirements apply to any redistribution, and the share-alike terms also apply to redistributed copies of the tables.
|
| 435 |
-
- **ISO code lists.** `lng/i31` and `lng/i39` have the status `ok` on the basis of their mirrors' licenses. ISO asserts copyright over its code lists, and a mirror's license does not change the upstream terms.
|
| 436 |
-
- **Excluded systems.** The WHO ATC index, the BISAC subject headings, the Dewey summaries, the CUSIP mapping, the ISO 10383 MIC list and the what3words API description are parsed but never published, because their terms do not permit redistribution. The SIL ISO 639-3 table was removed for the same reason; `lng/i63` is a different list, the three-letter subtags of the IANA registry.
|
| 437 |
-
|
| 438 |
-
Only Parquet files are published. Raw source files are downloaded by the pipeline and are not stored in either repository.
|
| 439 |
-
|
| 440 |
-
## Relation to existing resources
|
| 441 |
-
|
| 442 |
-
| Resource | Contents | Relation to 3char |
|
| 443 |
-
| --- | --- | --- |
|
| 444 |
-
| [Bioregistry](https://bioregistry.io) (2,936 prefixes, snapshot of 2026-10-13) | A registry of identifier systems, mostly biomedical, with prefixes, regular expressions and resolvers | Describes systems without redistributing their contents; 3char distributes the lists, across ten domains |
|
| 445 |
-
| [N2T](https://n2t.net) (511 prefix entries in the full list) | Resolver prefixes | As for the Bioregistry. Four 3char IDs (`elm`, `icd`, `mim`, `pdb`) are also N2T prefixes, and two of them denote other systems there |
|
| 446 |
-
| Wikidata external-identifier properties (9,846 with a format constraint, 2026-10-13) | One property per system, with a regular expression and identifiers attached to entities | Identifiers are statements about entities rather than the authority's list; the two are compared in [Agreement with Wikidata format constraints](#agreement-with-wikidata-format-constraints) |
|
| 447 |
-
| pycountry 26.2.16 | ISO 3166-1 (249), ISO 3166-2 (5,046), ISO 4217 (178), ISO 639 (7,923) and ISO 15924 (226), as a Python package built from the Debian iso-codes files | Covers five ISO standards; 3char takes ISO 3166-1, 4217, 639-1 and 15924 from other sources and includes 54 other systems |
|
| 448 |
-
| `datasets/country-codes`, OurAirports, OpenFlights, IANA registries | Source files for single domains | Sources of individual 3char systems, cited in `systems.url` |
|
| 449 |
-
|
| 450 |
-
A search of the Hugging Face Hub on 2026-10-14, with queries that included ISO 3166, ISO 4217, IATA, ICAO, ICD-10, HGNC, LOCODE, country codes, currency codes, identifiers, code systems, controlled vocabulary and three letter, returned 29 datasets, each covering a single system. No multi-domain collection of code lists with per-system license status was found. The search was not exhaustive, and this is not a claim of priority.
|
| 451 |
-
|
| 452 |
-
## Known limitations
|
| 453 |
|
| 454 |
Labels come from each source and are not reconciled across systems: the same airport is `São Paulo/Guarulhos–Governor André Franco Montoro International Airport` in `trp/iata` and `trp/icao`, and `Guarulhos Apt / São Paulo`, under `BRGRU`, in `trp/unl`. Airports have no city-name alias.
|
| 455 |
|
|
@@ -473,6 +448,29 @@ Labels come from each source and are not reconciled across systems: the same air
|
|
| 473 |
|
| 474 |
Coverage follows what sources publish under terms that permit redistribution. Standards bodies that publish in English and computing registries are well represented, while national schemes outside the United States and the UN system are not yet included. The collision census describes this collection, so adding a system changes it.
|
| 475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
## Versions and citation
|
| 477 |
|
| 478 |
Releases are numbered `MAJOR.MINOR.PATCH`. A change to the schema increments the major version, a change to any Parquet file increments the minor version, and a change limited to the card or the changelog increments the patch version. The changelog is maintained in the pipeline repository and copied here.
|
|
@@ -489,119 +487,114 @@ Release tags on the Hub and a Zenodo deposit are planned but have not been creat
|
|
| 489 |
}
|
| 490 |
```
|
| 491 |
|
| 492 |
-
##
|
| 493 |
|
| 494 |
-
Kinds are those described in [
|
| 495 |
-
|
| 496 |
-
<details>
|
| 497 |
-
<summary>Systems by domain</summary>
|
| 498 |
|
| 499 |
### Biology (`bio`)
|
| 500 |
|
| 501 |
-
| ID | System | Kind | Authority | Codes |
|
| 502 |
-
| --- | --- | --- | --- | ---: |
|
| 503 |
-
| `bio/aa1` | Amino acid 1-letter codes | Symbol | IUPAC-IUB JCBN | 20 |
|
| 504 |
-
| `bio/aa3` | Amino acid 3-letter codes | Symbol | IUPAC-IUB JCBN | 20 |
|
| 505 |
-
| `bio/cdn` | NCBI genetic codes (codons) | Symbol | NCBI | 64 |
|
| 506 |
-
| `bio/ec` | Enzyme commission numbers | Assigned code | IUBMB / ExPASy | 8,441 |
|
| 507 |
-
| `bio/gen` | HGNC gene symbols | Assigned code | HUGO Gene Nomenclature Committee | 44,997 |
|
| 508 |
-
| `bio/pdb` | PDB entry IDs | Assigned code | wwPDB / RCSB | 254,978 |
|
| 509 |
|
| 510 |
### Classification (`cls`)
|
| 511 |
|
| 512 |
-
| ID | System | Kind | Authority | Codes |
|
| 513 |
-
| --- | --- | --- | --- | ---: |
|
| 514 |
-
| `cls/elm` | Chemical element symbols | Symbol | IUPAC | 118 |
|
| 515 |
-
| `cls/icd` | ICD-10-CM | Assigned code | US CDC / NCHS | 98,403 |
|
| 516 |
-
| `cls/loc` | Library of Congress classification outline | Assigned code | Library of Congress | 234 |
|
| 517 |
|
| 518 |
### Computing (`cmp`)
|
| 519 |
|
| 520 |
-
| ID | System | Kind | Authority | Codes |
|
| 521 |
-
| --- | --- | --- | --- | ---: |
|
| 522 |
-
| `cmp/asm` | x86 instruction mnemonics | Vocabulary term | Intel / AMD | 1,309 |
|
| 523 |
-
| `cmp/css` | CSS functions | Vocabulary term | W3C CSSWG / MDN | 105 |
|
| 524 |
-
| `cmp/dns` | DNS resource record types | Assigned code | IANA | 97 |
|
| 525 |
-
| `cmp/ern` | POSIX errno names | Assigned code | IEEE / The Open Group | 77 |
|
| 526 |
-
| `cmp/ext` | File extensions | Community convention | Community | 286 |
|
| 527 |
-
| `cmp/frc` | FourCC codec identifiers | Community convention | Community / VLC | 672 |
|
| 528 |
-
| `cmp/git` | Git subcommands | Vocabulary term | Git project | 158 |
|
| 529 |
-
| `cmp/hex` | CSS named colors | Vocabulary term | W3C CSSWG | 148 |
|
| 530 |
-
| `cmp/htt` | HTTP methods | Assigned code | IANA | 41 |
|
| 531 |
-
| `cmp/mim` | Media types | Assigned code | IANA | 2,300 |
|
| 532 |
-
| `cmp/reg` | x86-64 register names | Vocabulary term | LLVM Project | 257 |
|
| 533 |
-
| `cmp/sts` | HTTP status codes | Assigned code | IANA | 500 |
|
| 534 |
-
| `cmp/vim` | Vim motion commands | Vocabulary term | Vim project | 289 |
|
| 535 |
|
| 536 |
### Communication (`com`)
|
| 537 |
|
| 538 |
-
| ID | System | Kind | Authority | Codes |
|
| 539 |
-
| --- | --- | --- | --- | ---: |
|
| 540 |
-
| `com/bau` | Baudot / ITA2 teleprinter codes | Symbol | ITU-T | 30 |
|
| 541 |
-
| `com/mor` | Morse code | Symbol | ITU-R | 48 |
|
| 542 |
-
| `com/tlg` | ABC universal commercial telegraphic code | Symbol | William Clauson-Thue (1901) | 7,359 |
|
| 543 |
|
| 544 |
### Finance (`fin`)
|
| 545 |
|
| 546 |
-
| ID | System | Kind | Authority | Codes |
|
| 547 |
-
| --- | --- | --- | --- | ---: |
|
| 548 |
-
| `fin/cfi` | ISO 10962 CFI codes | Assigned code | SIX Group / ISO | 1,216 |
|
| 549 |
-
| `fin/i42` | ISO 4217 currency codes | Assigned code | SIX Group / ISO | 178 |
|
| 550 |
-
| `fin/tck` | SEC company tickers | Assigned code | US SEC | 10,405 |
|
| 551 |
|
| 552 |
### Graph and vocabulary (`grf`)
|
| 553 |
|
| 554 |
-
| ID | System | Kind | Authority | Codes |
|
| 555 |
-
| --- | --- | --- | --- | ---: |
|
| 556 |
-
| `grf/act` | ActivityStreams 2.0 terms | Vocabulary term | W3C | 141 |
|
| 557 |
-
| `grf/foa` | FOAF vocabulary terms | Vocabulary term | FOAF project | 75 |
|
| 558 |
-
| `grf/gql` | openCypher keywords | Vocabulary term | openCypher / Neo4j | 63 |
|
| 559 |
-
| `grf/lpg` | Property graph schema terms | Vocabulary term | arXiv 2211.10962 | 34 |
|
| 560 |
-
| `grf/oid` | OpenID Connect discovery fields | Vocabulary term | OpenID Foundation | 17 |
|
| 561 |
-
| `grf/org` | W3C Organization ontology terms | Vocabulary term | W3C | 45 |
|
| 562 |
-
| `grf/rdf` | RDF Schema terms | Vocabulary term | W3C | 15 |
|
| 563 |
-
| `grf/sch` | schema.org types and properties | Vocabulary term | schema.org / W3C CG | 2,987 |
|
| 564 |
-
| `grf/shc` | SHACL vocabulary terms | Vocabulary term | W3C | 221 |
|
| 565 |
-
| `grf/sio` | SIOC vocabulary terms | Vocabulary term | SIOC Project / DERI | 99 |
|
| 566 |
-
| `grf/vcd` | vCard ontology terms | Vocabulary term | W3C | 146 |
|
| 567 |
|
| 568 |
### Language (`lng`)
|
| 569 |
|
| 570 |
-
| ID | System | Kind | Authority | Codes |
|
| 571 |
-
| --- | --- | --- | --- | ---: |
|
| 572 |
-
| `lng/b47` | BCP 47 language subtags | Assigned code | IANA | 9,295 |
|
| 573 |
-
| `lng/glt` | Glottolog languoid codes | Assigned code | MPI-EVA Leipzig | 27,177 |
|
| 574 |
-
| `lng/i15` | ISO 15924 script codes | Assigned code | Unicode Consortium (RA) | 226 |
|
| 575 |
-
| `lng/i31` | ISO 3166-1 country codes | Assigned code | ISO 3166/MA | 249 |
|
| 576 |
-
| `lng/i39` | ISO 639-1 language codes | Assigned code | ISO 639/RA | 183 |
|
| 577 |
-
| `lng/i63` | BCP 47 three-letter language subtags | Assigned code | IANA | 8,084 |
|
| 578 |
-
| `lng/ioc` | Country codes composite | Assigned code | Community / datasets.io | 226 |
|
| 579 |
-
| `lng/mdy` | Month names | Vocabulary term | Unicode CLDR | 12 |
|
| 580 |
|
| 581 |
### Lexical (`nte`)
|
| 582 |
|
| 583 |
-
| ID | System | Kind | Authority | Codes |
|
| 584 |
-
| --- | --- | --- | --- | ---: |
|
| 585 |
-
| `nte/wnt` | English WordNet 2024 synset IDs | Assigned code | Global WordNet Association | 120,630 |
|
| 586 |
|
| 587 |
### Transport and place (`trp`)
|
| 588 |
|
| 589 |
-
| ID | System | Kind | Authority | Codes |
|
| 590 |
-
| --- | --- | --- | --- | ---: |
|
| 591 |
-
| `trp/iata` | IATA airport codes | Assigned code | IATA | 9,056 |
|
| 592 |
-
| `trp/ica2` | IATA and ICAO airline codes | Assigned code | IATA / ICAO | 5,841 |
|
| 593 |
-
| `trp/icao` | ICAO airport codes | Assigned code | ICAO | 10,153 |
|
| 594 |
-
| `trp/olc` | Open Location Code (plus codes) | Test vector | Google | 292 |
|
| 595 |
-
| `trp/tld` | Top level domains | Assigned code | IANA | 1,437 |
|
| 596 |
-
| `trp/unl` | UN/LOCODE location codes | Assigned code | UNECE | 116,213 |
|
| 597 |
|
| 598 |
### Writing and time (`wrt`)
|
| 599 |
|
| 600 |
-
| ID | System | Kind | Authority | Codes |
|
| 601 |
-
| --- | --- | --- | --- | ---: |
|
| 602 |
-
| `wrt/abj` | Hebrew script characters | Symbol | Unicode / community | 84 |
|
| 603 |
-
| `wrt/iau` | IAU constellation abbreviations | Assigned code | International Astronomical Union | 88 |
|
| 604 |
-
| `wrt/tz` | tz database zone names and abbreviations | Assigned code | IANA / tzdb | 806 |
|
| 605 |
-
| `wrt/uni` | Unicode emoji sequences | Symbol | Unicode Consortium | 5,225 |
|
| 606 |
-
|
| 607 |
-
</details>
|
|
|
|
| 258 |
---
|
| 259 |
# 3char
|
| 260 |
|
| 261 |
+
3char is a curated collection of code systems, identifiers, symbols and controlled vocabularies from documented reference sources. It gathers 751,870 records from 58 sources into one Parquet schema: ISO country, currency and language codes, IATA and ICAO airport codes, UN/LOCODE, ICD-10-CM, HGNC gene symbols, chemical element symbols, IANA registries, W3C vocabularies and others. Every record keeps the namespace of its source, and every source is documented with its provenance, version, format constraint and license.
|
| 262 |
|
| 263 |
+
The collection is meant for work that needs these lists as data rather than as documentation: validating and normalizing codes, grounding language models and search systems in authoritative lists, and studying how codes and lists relate across sources. This card describes release 0.1.3; the data files are unchanged since release 0.1.1 (2026-09-12).
|
| 264 |
|
| 265 |
+
## Contents
|
|
|
|
|
|
|
| 266 |
|
| 267 |
The 58 sources span ten domains, from biology and finance to language, transport and time. They are not all the same kind of list, and the difference matters when a record is read:
|
| 268 |
|
|
|
|
| 274 |
| Conventions maintained by a community | 2 | File extensions, FourCC codec identifiers |
|
| 275 |
| Test vectors | 1 | The reference test cases of the Open Location Code encoder |
|
| 276 |
|
| 277 |
+
Entries also differ in status within a list. The HTTP status code registry is included together with its unassigned values, one row per unassigned code (436 rows, marked `unassigned`), and five sources keep entries they mark as no longer in use (6,793 rows, marked `deprecated`). Every system is listed, with its kind, authority, size and regular expression, in [All 58 systems](#all-58-systems) at the end of this card; the `systems` configuration holds the rest of its metadata.
|
| 278 |
|
| 279 |
The name comes from the three-character codes, such as airport, currency and country codes, with which the collection began. Codes in the collection range from one character to media types of 84.
|
| 280 |
|
|
|
|
| 282 |
|
| 283 |
- **Validating and normalizing codes.** Each list and its regular expression show whether a string is an entry in the recorded edition of the list, and whether it has the form the source defines.
|
| 284 |
- **Grounding language models and search.** The lists can serve as lookup tables or retrieval corpora that map codes to names and back. [Retrieval](#retrieval) summarizes how the presentation of records affected retrieval in a controlled sample.
|
| 285 |
+
- **Studying codes across lists.** The same string often occurs in several lists, sometimes for the same entity and sometimes not; [Analyses](#analyses) measures both. The closed study [poc-nsi](https://github.com/brennercruvinel/poc-nsi) used seven systems in this way to test whether language models confuse such codes.
|
| 286 |
- **Linking tables.** Country codes stored in `extra`, such as `extra.country` in the airport systems and `extra.iso3` in `lng/ioc`, connect several systems to ISO 3166-1.
|
| 287 |
|
| 288 |
For operational work that depends on the latest edition of a list, such as billing with ICD-10-CM, compare `version` and `retrieved_at` with the source's current release.
|
| 289 |
|
| 290 |
+
## Dataset structure
|
| 291 |
|
| 292 |
```python
|
| 293 |
from datasets import load_dataset
|
|
|
|
| 336 |
|
| 337 |
Across systems, a record is identified by `(system_id, code)`, or by `(system_id, extra.locode)` in `trp/unl`. A code without its system does not identify a record.
|
| 338 |
|
| 339 |
+
## Construction
|
| 340 |
|
| 341 |
The data is produced by [3char-pipeline](https://github.com/brennercruvinel/3char-pipeline), which downloads each source, parses it into the common schema and checks the result. A source is included when four conditions hold, each checked by a column or a file in the pipeline:
|
| 342 |
|
|
|
|
| 355 |
|
| 356 |
Every build verifies each raw file against its recorded checksum and tests each entry against its system's regular expression; either check stops the build on a mismatch. Only systems whose `license_status` is `ok` or `check` are published (see [Licensing](#licensing)).
|
| 357 |
|
| 358 |
+
## Analyses
|
| 359 |
|
| 360 |
+
These analyses use the published files. Every figure in this section is produced by a script in the pipeline (`census.py`, `keys.py`, `equivalences.py`, `crosscheck_wikidata.py`) and checked against this card by `card_check.py`.
|
| 361 |
|
| 362 |
### Codes shared between systems
|
| 363 |
|
|
|
|
| 371 |
| In eleven systems, the maximum | 2 (`and`, `car`) |
|
| 372 |
| In two or more systems, counting the derived pair `lng/b47` and `lng/i63` once | 14,845 |
|
| 373 |
|
| 374 |
+
A shared string is not necessarily a shared meaning. `BRA` is Brazil in both ISO 3166-1 and the IOC list, the Braj language in the IANA Language Subtag Registry, and an airport in the IATA list. The census counts shared strings; whether they refer to the same entity is examined in the next section.
|
| 375 |
|
| 376 |
Every code in eight systems also occurs in at least one other system: `bio/aa1`, `bio/aa3`, `bio/cdn`, `lng/i31`, `lng/i39`, `lng/i63`, `lng/mdy` and `wrt/iau`. In `trp/iata`, `lng/ioc`, `lng/i15`, `trp/ica2` and `fin/i42`, more than 98% of codes do. Without case folding there are 632,457 distinct strings, of which 21,255 occur in more than one system. Within `trp/unl`, 18,748 codes repeat because the key is the country plus the code; these repetitions are not counted as sharing between systems.
|
| 377 |
|
|
|
|
| 424 |
|
| 425 |
In a separate test, a bare code shared by several sampled systems retrieved a record of the intended system in 33.0% of 182 cases, the rate of a random choice among those systems; with the system name in both the chunk and the query, it did so in all cases. With 51 questions, one question is worth 1.96 points of recall, and the results describe this sample only.
|
| 426 |
|
| 427 |
+
## Limitations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 428 |
|
| 429 |
Labels come from each source and are not reconciled across systems: the same airport is `São Paulo/Guarulhos–Governor André Franco Montoro International Airport` in `trp/iata` and `trp/icao`, and `Guarulhos Apt / São Paulo`, under `BRGRU`, in `trp/unl`. Airports have no city-name alias.
|
| 430 |
|
|
|
|
| 448 |
|
| 449 |
Coverage follows what sources publish under terms that permit redistribution. Standards bodies that publish in English and computing registries are well represented, while national schemes outside the United States and the UN system are not yet included. The collision census describes this collection, so adding a system changes it.
|
| 450 |
|
| 451 |
+
## Licensing
|
| 452 |
+
|
| 453 |
+
The dataset has no single license. Each row of the `systems` configuration records `license` and `license_status`. The `license` column takes 27 distinct values: an SPDX identifier where one applies, and otherwise a short tag defined in `LICENSES.md`. Of the 58 published systems, 56 have the status `ok` and 2 have the status `check`.
|
| 454 |
+
|
| 455 |
+
- **No stated terms (`check`).** `fin/cfi` and `fin/i42` come from SIX Group, which publishes both lists free of charge but states no terms for redistribution, so their redistribution status is unconfirmed. They are included because the codes are plain facts in worldwide use; this is the curator's judgment, not a grant of rights. Anyone who redistributes them commercially should first obtain SIX Group's terms.
|
| 456 |
+
- **Copyleft and share-alike (seven systems).** `cmp/frc` (GPL-2.0-or-later) and `cmp/git` (GPL-2.0-only) are lists extracted from GPL source trees; `cmp/vim` is under the Vim license; `grf/sch` and `grf/sio` are under CC-BY-SA-3.0; `lng/i31` is under CC-BY-SA-4.0, the license of its mirror; and `trp/ica2` is under ODbL-1.0. Their attribution requirements apply to any redistribution, and the share-alike terms also apply to redistributed copies of the tables.
|
| 457 |
+
- **ISO code lists.** `lng/i31` and `lng/i39` have the status `ok` on the basis of their mirrors' licenses. ISO asserts copyright over its code lists, and a mirror's license does not change the upstream terms.
|
| 458 |
+
- **Excluded systems.** The WHO ATC index, the BISAC subject headings, the Dewey summaries, the CUSIP mapping, the ISO 10383 MIC list and the what3words API description are parsed but never published, because their terms do not permit redistribution. The SIL ISO 639-3 table was removed for the same reason; `lng/i63` is a different list, the three-letter subtags of the IANA registry.
|
| 459 |
+
|
| 460 |
+
Only Parquet files are published. Raw source files are downloaded by the pipeline and are not stored in either repository.
|
| 461 |
+
|
| 462 |
+
## Related resources
|
| 463 |
+
|
| 464 |
+
| Resource | Contents | Relation to 3char |
|
| 465 |
+
| --- | --- | --- |
|
| 466 |
+
| [Bioregistry](https://bioregistry.io) (2,936 prefixes, snapshot of 2026-10-13) | A registry of identifier systems, mostly biomedical, with prefixes, regular expressions and resolvers | Describes systems without redistributing their contents; 3char distributes the lists, across ten domains |
|
| 467 |
+
| [N2T](https://n2t.net) (511 prefix entries in the full list) | Resolver prefixes | As for the Bioregistry. Four 3char IDs (`elm`, `icd`, `mim`, `pdb`) are also N2T prefixes, and two of them denote other systems there |
|
| 468 |
+
| Wikidata external-identifier properties (9,846 with a format constraint, 2026-10-13) | One property per system, with a regular expression and identifiers attached to entities | Identifiers are statements about entities rather than the authority's list; the two are compared in [Agreement with Wikidata format constraints](#agreement-with-wikidata-format-constraints) |
|
| 469 |
+
| pycountry 26.2.16 | ISO 3166-1 (249), ISO 3166-2 (5,046), ISO 4217 (178), ISO 639 (7,923) and ISO 15924 (226), as a Python package built from the Debian iso-codes files | Covers five ISO standards; 3char takes ISO 3166-1, 4217, 639-1 and 15924 from other sources and includes 54 other systems |
|
| 470 |
+
| `datasets/country-codes`, OurAirports, OpenFlights, IANA registries | Source files for single domains | Sources of individual 3char systems, cited in `systems.url` |
|
| 471 |
+
|
| 472 |
+
A search of the Hugging Face Hub on 2026-10-14, with queries that included ISO 3166, ISO 4217, IATA, ICAO, ICD-10, HGNC, LOCODE, country codes, currency codes, identifiers, code systems, controlled vocabulary and three letter, returned 29 datasets, each covering a single system. No multi-domain collection of code lists with per-system license status was found. The search was not exhaustive, and this is not a claim of priority.
|
| 473 |
+
|
| 474 |
## Versions and citation
|
| 475 |
|
| 476 |
Releases are numbered `MAJOR.MINOR.PATCH`. A change to the schema increments the major version, a change to any Parquet file increments the minor version, and a change limited to the card or the changelog increments the patch version. The changelog is maintained in the pipeline repository and copied here.
|
|
|
|
| 487 |
}
|
| 488 |
```
|
| 489 |
|
| 490 |
+
## All 58 systems
|
| 491 |
|
| 492 |
+
Kinds are those described in [Contents](#contents). Licenses, versions, retrieval dates and curator notes are in the `systems` configuration.
|
|
|
|
|
|
|
|
|
|
| 493 |
|
| 494 |
### Biology (`bio`)
|
| 495 |
|
| 496 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 497 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 498 |
+
| `bio/aa1` | Amino acid 1-letter codes | Symbol | IUPAC-IUB JCBN | 20 | `^[A-Z]$` |
|
| 499 |
+
| `bio/aa3` | Amino acid 3-letter codes | Symbol | IUPAC-IUB JCBN | 20 | `^[A-Z][a-z]{2}$` |
|
| 500 |
+
| `bio/cdn` | NCBI genetic codes (codons) | Symbol | NCBI | 64 | `^[ACGTU]{3}$` |
|
| 501 |
+
| `bio/ec` | Enzyme commission numbers | Assigned code | IUBMB / ExPASy | 8,441 | `^\d+\.\d+\.\d+\.(n?\d+\|-)$` |
|
| 502 |
+
| `bio/gen` | HGNC gene symbols | Assigned code | HUGO Gene Nomenclature Committee | 44,997 | `^[A-Za-z0-9@#\-\._]+$` |
|
| 503 |
+
| `bio/pdb` | PDB entry IDs | Assigned code | wwPDB / RCSB | 254,978 | `^[1-9][A-Z0-9]{3}$` |
|
| 504 |
|
| 505 |
### Classification (`cls`)
|
| 506 |
|
| 507 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 508 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 509 |
+
| `cls/elm` | Chemical element symbols | Symbol | IUPAC | 118 | `^[A-Z][a-z]{0,2}$` |
|
| 510 |
+
| `cls/icd` | ICD-10-CM | Assigned code | US CDC / NCHS | 98,403 | `^[A-Z][A-Z0-9]{2,6}$` |
|
| 511 |
+
| `cls/loc` | Library of Congress classification outline | Assigned code | Library of Congress | 234 | `^[A-Z]{1,3}$` |
|
| 512 |
|
| 513 |
### Computing (`cmp`)
|
| 514 |
|
| 515 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 516 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 517 |
+
| `cmp/asm` | x86 instruction mnemonics | Vocabulary term | Intel / AMD | 1,309 | `^[A-Z][A-Za-z0-9]{1,15}$` |
|
| 518 |
+
| `cmp/css` | CSS functions | Vocabulary term | W3C CSSWG / MDN | 105 | `^[a-zA-Z][a-zA-Z0-9\-]*$` |
|
| 519 |
+
| `cmp/dns` | DNS resource record types | Assigned code | IANA | 97 | `^([A-Z][A-Z0-9\-]*\|\*)$` |
|
| 520 |
+
| `cmp/ern` | POSIX errno names | Assigned code | IEEE / The Open Group | 77 | `^E[A-Z0-9]+$` |
|
| 521 |
+
| `cmp/ext` | File extensions | Community convention | Community | 286 | `^[a-z0-9][a-z0-9.+\-]*$` |
|
| 522 |
+
| `cmp/frc` | FourCC codec identifiers | Community convention | Community / VLC | 672 | `^[A-Za-z0-9\-.:_]{2,4}$` |
|
| 523 |
+
| `cmp/git` | Git subcommands | Vocabulary term | Git project | 158 | `^[a-z][a-z0-9\-]{1,17}$` |
|
| 524 |
+
| `cmp/hex` | CSS named colors | Vocabulary term | W3C CSSWG | 148 | `^[a-z]{3,20}$` |
|
| 525 |
+
| `cmp/htt` | HTTP methods | Assigned code | IANA | 41 | `^([A-Z][A-Z\-]*\|\*)$` |
|
| 526 |
+
| `cmp/mim` | Media types | Assigned code | IANA | 2,300 | `^[a-z]+/[a-zA-Z0-9!#$&\-\^_\.\+]+$` |
|
| 527 |
+
| `cmp/reg` | x86-64 register names | Vocabulary term | LLVM Project | 257 | `^[a-z][a-z0-9.()]*$` |
|
| 528 |
+
| `cmp/sts` | HTTP status codes | Assigned code | IANA | 500 | `^\d{3}$` |
|
| 529 |
+
| `cmp/vim` | Vim motion commands | Vocabulary term | Vim project | 289 | `^\S{1,40}$` |
|
| 530 |
|
| 531 |
### Communication (`com`)
|
| 532 |
|
| 533 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 534 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 535 |
+
| `com/bau` | Baudot / ITA2 teleprinter codes | Symbol | ITU-T | 30 | `^[A-Z0-9\-]+$` |
|
| 536 |
+
| `com/mor` | Morse code | Symbol | ITU-R | 48 | `^([A-Z0-9\u00c9]\|[^\w\s]{1,2})$` |
|
| 537 |
+
| `com/tlg` | ABC universal commercial telegraphic code | Symbol | William Clauson-Thue (1901) | 7,359 | `^[A-Za-z]{4,22}$` |
|
| 538 |
|
| 539 |
### Finance (`fin`)
|
| 540 |
|
| 541 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 542 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 543 |
+
| `fin/cfi` | ISO 10962 CFI codes | Assigned code | SIX Group / ISO | 1,216 | `^[A-Z]{6}$` |
|
| 544 |
+
| `fin/i42` | ISO 4217 currency codes | Assigned code | SIX Group / ISO | 178 | `^[A-Z]{3}$` |
|
| 545 |
+
| `fin/tck` | SEC company tickers | Assigned code | US SEC | 10,405 | `^[A-Z][A-Z\-]{0,6}$` |
|
| 546 |
|
| 547 |
### Graph and vocabulary (`grf`)
|
| 548 |
|
| 549 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 550 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 551 |
+
| `grf/act` | ActivityStreams 2.0 terms | Vocabulary term | W3C | 141 | `^[A-Za-z][A-Za-z0-9]*$` |
|
| 552 |
+
| `grf/foa` | FOAF vocabulary terms | Vocabulary term | FOAF project | 75 | `^[A-Za-z][A-Za-z0-9_]*$` |
|
| 553 |
+
| `grf/gql` | openCypher keywords | Vocabulary term | openCypher / Neo4j | 63 | `^[A-Z][A-Z_]*$` |
|
| 554 |
+
| `grf/lpg` | Property graph schema terms | Vocabulary term | arXiv 2211.10962 | 34 | `^[A-Z]{3,9}$` |
|
| 555 |
+
| `grf/oid` | OpenID Connect discovery fields | Vocabulary term | OpenID Foundation | 17 | `^[a-z][a-z0-9_]*$` |
|
| 556 |
+
| `grf/org` | W3C Organization ontology terms | Vocabulary term | W3C | 45 | `^[a-zA-Z][A-Za-z0-9]*$` |
|
| 557 |
+
| `grf/rdf` | RDF Schema terms | Vocabulary term | W3C | 15 | `^[a-zA-Z][A-Za-z0-9]*$` |
|
| 558 |
+
| `grf/sch` | schema.org types and properties | Vocabulary term | schema.org / W3C CG | 2,987 | `^[A-Za-z0-9][A-Za-z0-9]*$` |
|
| 559 |
+
| `grf/shc` | SHACL vocabulary terms | Vocabulary term | W3C | 221 | `^[A-Za-z][A-Za-z0-9\-]*$` |
|
| 560 |
+
| `grf/sio` | SIOC vocabulary terms | Vocabulary term | SIOC Project / DERI | 99 | `^[A-Za-z][A-Za-z0-9_]*$` |
|
| 561 |
+
| `grf/vcd` | vCard ontology terms | Vocabulary term | W3C | 146 | `^[a-zA-Z][A-Za-z0-9\-]*$` |
|
| 562 |
|
| 563 |
### Language (`lng`)
|
| 564 |
|
| 565 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 566 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 567 |
+
| `lng/b47` | BCP 47 language subtags | Assigned code | IANA | 9,295 | `^[A-Za-z0-9\-]+(\.\.[A-Za-z0-9\-]+)?$` |
|
| 568 |
+
| `lng/glt` | Glottolog languoid codes | Assigned code | MPI-EVA Leipzig | 27,177 | `^[a-z0-9]{4}\d{4}$` |
|
| 569 |
+
| `lng/i15` | ISO 15924 script codes | Assigned code | Unicode Consortium (RA) | 226 | `^[A-Z][a-z]{3}$` |
|
| 570 |
+
| `lng/i31` | ISO 3166-1 country codes | Assigned code | ISO 3166/MA | 249 | `^[A-Z]{2,3}$` |
|
| 571 |
+
| `lng/i39` | ISO 639-1 language codes | Assigned code | ISO 639/RA | 183 | `^[a-z]{2}$` |
|
| 572 |
+
| `lng/i63` | BCP 47 three-letter language subtags | Assigned code | IANA | 8,084 | `^[a-z]{3}$` |
|
| 573 |
+
| `lng/ioc` | Country codes composite | Assigned code | Community / datasets.io | 226 | `^[A-Z]{2,3}$` |
|
| 574 |
+
| `lng/mdy` | Month names | Vocabulary term | Unicode CLDR | 12 | `^[A-Z][a-z]{2}$` |
|
| 575 |
|
| 576 |
### Lexical (`nte`)
|
| 577 |
|
| 578 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 579 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 580 |
+
| `nte/wnt` | English WordNet 2024 synset IDs | Assigned code | Global WordNet Association | 120,630 | `^oewn-\d{8}-[nvasr]$` |
|
| 581 |
|
| 582 |
### Transport and place (`trp`)
|
| 583 |
|
| 584 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 585 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 586 |
+
| `trp/iata` | IATA airport codes | Assigned code | IATA | 9,056 | `^[A-Z]{3}$` |
|
| 587 |
+
| `trp/ica2` | IATA and ICAO airline codes | Assigned code | IATA / ICAO | 5,841 | `^[A-Z0-9]{2,3}$` |
|
| 588 |
+
| `trp/icao` | ICAO airport codes | Assigned code | ICAO | 10,153 | `^[A-Z]{4}$` |
|
| 589 |
+
| `trp/olc` | Open Location Code (plus codes) | Test vector | Google | 292 | `^[023456789CFGHJMPQRVWX]{4,}\+[23456789CFGHJMPQRVWX]*$` |
|
| 590 |
+
| `trp/tld` | Top level domains | Assigned code | IANA | 1,437 | `^[A-Z0-9\-]+$` |
|
| 591 |
+
| `trp/unl` | UN/LOCODE location codes | Assigned code | UNECE | 116,213 | `^[A-Z0-9]{3}$` |
|
| 592 |
|
| 593 |
### Writing and time (`wrt`)
|
| 594 |
|
| 595 |
+
| ID | System | Kind | Authority | Codes | Pattern |
|
| 596 |
+
| --- | --- | --- | --- | ---: | --- |
|
| 597 |
+
| `wrt/abj` | Hebrew script characters | Symbol | Unicode / community | 84 | `^\S$` |
|
| 598 |
+
| `wrt/iau` | IAU constellation abbreviations | Assigned code | International Astronomical Union | 88 | `^[A-Z][A-Za-z]{2}$` |
|
| 599 |
+
| `wrt/tz` | tz database zone names and abbreviations | Assigned code | IANA / tzdb | 806 | `^[A-Za-z0-9+\-_/]{1,32}$` |
|
| 600 |
+
| `wrt/uni` | Unicode emoji sequences | Symbol | Unicode Consortium | 5,225 | `^[0-9A-F]{4,6}( [0-9A-F]{4,6})*$` |
|
|
|
|
|
|