36 lines
1.6 KiB
Markdown
36 lines
1.6 KiB
Markdown
# Countries table (ISO 3166 + names, populations, currencies, languages, flags)
|
|
|
|
**Lane:** Extract — data extraction and tables.
|
|
**Date:** 2026-11-03
|
|
|
|
## Artifact
|
|
- **countries.csv** — flat table, 250 rows + header, 14 columns.
|
|
- **extract_countries.py** — raw source JSON → countries.csv transform.
|
|
- **verify_extraction.py** — independent CSV-vs-source cross-check (evidence).
|
|
- **check_countries.py** — structural verifier; the CHECK gate (exit 0/1).
|
|
- **source_countriesV3.1.json** — raw source dataset (SHA-256 in provenance).
|
|
|
|
## Source
|
|
- Raw data: https://raw.githubusercontent.com/restcountries/restcountries/master/src/main/resources/countriesV3.1.json
|
|
- REST Countries repository file `src/main/resources/countriesV3.1.json`: an array of
|
|
250 country records. It is the exact dataset behind the (deprecated) `/v3.1` API.
|
|
|
|
## Method
|
|
- `extract_countries.py` reads the JSON array and flattens every record to one CSV
|
|
row on a fixed 14-column contract. No field contains a comma, so the file is
|
|
trivially parseable with any CSV reader.
|
|
|
|
## Verification
|
|
1. `verify_extraction.py` vs the raw source: PASS
|
|
(`rows=250 codes=250 source=250`).
|
|
2. `check_countries.py` structural gate: exit 0 (the CHECK line in the final
|
|
report; 0 = correct, nonzero = wrong).
|
|
|
|
## Columns (in order)
|
|
name_common | name_official | alpha2 | alpha3 | numeric | region |
|
|
subregion | capital | population | area_km2 | currencies | languages | tlds | flag
|
|
|
|
## Provenance
|
|
- SHA-256 of `source_countriesV3.1.json`: (filled after the run)
|
|
- Source record count: 250 (distinct ISO 3166-1 alpha-2 codes).
|