Getting started
Internacia is reference data for countries (256 records) and international organizations / groups (“intblocks”, 1700+ records; 83 blocktypes). It is part of the Dateno open-source project. Data and documentation are licensed CC-BY-4.0; code is MIT.
Fastest path (spreadsheet)
Exports are not committed: download them from the
latest release, or run
python scripts/builder.py build in a clone to create them under data/datasets/.
- Decompress
countries-lite.csv.zst(zstd -d …) or opencountries-lite.parquet. - Filter
code_status=official_iso3166_1for the 249 current ISO countries. - For organizations, use
intblocks-lite.csv.zstor join memberships viamemberships.csv.zst(intblock_id↔country_code). Full flattened tables arecountries.csv.zst/intblocks.csv.zst.
See also the Frictionless index datapackage.json, which the build writes next to the
exports and every GitHub Release ships.
Lookups (DuckDB / Python)
# One-liner membership check
duckdb data/datasets/internacia.duckdb \
-c "SELECT country_code, status FROM memberships WHERE intblock_id='NATO' ORDER BY 1;"
import duckdb
con = duckdb.connect("data/datasets/internacia.duckdb")
con.execute("SELECT code, name FROM countries WHERE code = 'XK'").fetchall()
Lookups (internacia-python SDK)
internacia 0.2.x (the current PyPI release) predates data v3: it cannot download
current releases, search.fuzzy fails, and get_by_member also returns former
memberships. See SDK status for the SQL equivalents;
SDK 0.3.0 with v3 support is in progress. With internacia.duckdb downloaded from a
GitHub Release, basic
lookups still work:
pip install internacia
from pathlib import Path
from internacia import InternaciaClient
client = InternaciaClient(db_path=Path("internacia.duckdb"))
# Country lookup (ISO 3166-1 alpha-2)
country = client.countries.get_by_code("US")
print(country["name"])
Prefer DuckDB/Parquet over parsing YAML under data/countries/ or data/intblocks/.
Citation
Internacia Datasets (Dateno). CC-BY-4.0.
DOI: https://doi.org/10.5281/zenodo.20706176
https://github.com/datenoio/internacia-db
Version: read data/datasets/countries.manifest.json or
SELECT dataset, version, schema_hash FROM _meta; in DuckDB.
Next steps
| Goal | Doc |
|---|---|
| Join keys & gotchas | ai-consumers.md |
| Verified SQL recipes | query-examples.md |
| Verified Polars recipes | query-examples-polars.md |
| R / dplyr recipes | query-examples-r.md |
| Observable / Plot recipes | query-examples-observable.md |
| Edit YAML | CONTRIBUTING.md, agents/contribute.md |
| Find missing intblocks / improve records | discovery.md, agents/discover.md |
| Field reference | data-dictionary.md |
| Versioning / API posture | versioning-policy.md |
| Country / entity policy | country-code-policy.md, entity-classification-policy.md |
| Intblock inclusion | intblock-inclusion-policy.md |
| Intblock sources | intblock-sources.md |