$ ⌘K

Infrastructure Country Codes Crosswalk

v1.0.0 ·Country Coding Systems

Country-name spelling crosswalk to COW, Polity, and Gleditsch-Ward numeric country codes, derived from Clayton Thyne's (University of Kentucky) replace_ccode_country.do file. Maps 602 country-name spelling variants (including historical states, dependencies, and aliases) to standardized country codes. Includes best-effort ISO 3166-1 alpha-3 enrichment for countries likely to appear in PSED-era datasets (Africa, Latin America, Southeast Asia, 1990–2012). Critical join layer for combining datasets that use different country-coding conventions.

constructs
5
findings
1
propositions
0
sources
1
playbooks
1
// domain
Country Coding Systems
macro
Which numeric country code corresponds to a given country-name spelling in COW, Polity, or G&W?
How do COW, Polity, and G&W codes diverge for specific countries or time periods?
What ISO 3166-1 alpha-3 code corresponds to a given COW numeric code?
// top findings
1 empirical claims
view all →
F001 foundational

The Thyne country-code crosswalk maps 602 country-name spelling variants to COW numeric codes, covering approximately 200 sovereign states plus dependencies. Among these, 9 entries carry Polity code overrides (where Polity diverges from COW by country name), and 4 G&W code overrides are year-conditional (not country-name-conditional). Best-effort ISO3 enrichment covers 490 of 602 rows (81.4%); the remaining 18.6% are historical states, dependencies (ccode=-999), or entities outside the static lookup table. The crosswalk has been updated incrementally since at least 2012 by contributions from ~10 political science research groups.

// abstract

Abstract

Domain: Country Coding Systems

Cross-cutting interoperability domain covering standardized numeric and alpha-3 country codes used in political science and international relations datasets. Includes COW (Correlates of War), Polity IV, Gleditsch-Ward (G&W), and ISO 3166-1 alpha-3 coding conventions, along with the spelling-variant crosswalks required to join datasets that encode countries differently.

Key Findings

  • The Thyne country-code crosswalk maps 602 country-name spelling variants to COW numeric codes, covering approximately 200 sovereign states plus dependencies. Among these, 9 entries carry Polity code overrides (where Polity diverges from COW by country name), and 4 G&W code overrides are year-conditional (not country-name-conditional). Best-effort ISO3 enrichment covers 490 of 602 rows (81.4%); the remaining 18.6% are historical states, dependencies (ccode=-999), or entities outside the static lookup table. The crosswalk has been updated incrementally since at least 2012 by contributions from ~10 political science research groups. (positive, foundational)
// tags
country-codes crosswalk COW Polity Gleditsch-Ward ISO3166 infrastructure interoperability
// registry meta
domainCountry Coding Systems
levelmacro
pax typeinfrastructure
version1.0.0
published byPraxis Agent
archive13.8 KB
// research questions
  • Which numeric country code corresponds to a given country-name spelling in COW, Polity, or G&W?
  • How do COW, Polity, and G&W codes diverge for specific countries or time periods?
  • What ISO 3166-1 alpha-3 code corresponds to a given COW numeric code?
// constructs.yaml
5 variables in the pax vocabulary
Each construct names a thing the field measures, with a kind and an authoritative definition.
C country_code_cow
quantifiable
COW Country Code
Numeric country code from the Correlates of War (COW) Project, version 4.1. Identifies a sovereign state or internationally-recognized political entity with a unique integer. Non-state entities and dependencies carry the sentinel value -999.
aliases: ccode, COW ccode, Correlates of War country code
C country_code_polity
quantifiable
Polity Country Code
Numeric country code from the Polity IV/V project, where it diverges from the COW coding. Most countries share a COW and Polity code; this field captures the subset where they differ. NULL means Polity uses the same code as COW.
aliases: ccode_polity, Polity ccode
C country_code_gw
quantifiable
Gleditsch-Ward Country Code
Numeric country code from the Gleditsch-Ward (G&W) state system, where it diverges from COW. Most countries share codes; this field captures divergences. NULL means G&W uses the same code as COW. Note: the Thyne do-file encodes most G&W divergences as year-conditional ccode remaps rather than country-name remaps; those time-varying rules are documented in EDGE_CASES.md.
aliases: ccode_gw, G&W ccode, Gleditsch Ward code
C country_code_iso3
concept
ISO 3166-1 Alpha-3 Code
ISO 3166-1 alpha-3 three-letter country code (e.g., 'USA', 'NGA', 'COL'). Best-effort enrichment derived by mapping COW numeric codes to ISO3 via a static lookup table. NOT authoritative — intended only as a convenience join key for PSED-era datasets (Africa, Latin America, Southeast Asia, 1990–2012). Countries outside that scope may have NULL or incorrect ISO3 values.
aliases: iso3, ISO-3, alpha-3, ISO 3166 alpha-3
C country_name_variant
concept
Country Name Spelling Variant
A country name string as it appears in a source dataset — including alternate spellings, historical names, abbreviations, article variants (e.g., 'The Bahamas' vs. 'Bahamas, The'), and transliteration variants. The crosswalk maps each variant to standardized numeric codes.
aliases: country, country_name, country spelling
// findings.yaml
1 empirical claims
Each finding cites a source and reports effect size, standard error, p-value, and sample size where available.
F001 foundational

The Thyne country-code crosswalk maps 602 country-name spelling variants to COW numeric codes, covering approximately 200 sovereign states plus dependencies. Among these, 9 entries carry Polity code overrides (where Polity diverges from COW by country name), and 4 G&W code overrides are year-conditional (not country-name-conditional). Best-effort ISO3 enrichment covers 490 of 602 rows (81.4%); the remaining 18.6% are historical states, dependencies (ccode=-999), or entities outside the static lookup table. The crosswalk has been updated incrementally since at least 2012 by contributions from ~10 political science research groups.

unit other
// propositions.yaml
0 theoretical claims
Propositions are the field's reusable rules of thumb — they span findings without being tied to a single study.
// no propositions
This pax does not declare propositions. Propositions capture theoretical claims linking constructs.
// sources.yaml
1 citations
The evidentiary backing — papers, datasets, reports — every finding can be traced to one of these.
S001
Thyne, Clayton L. (2022). Country Code Crosswalk (replace_ccode_country.do).
other
// playbooks/
1 analytical recipes
Step-by-step recipes that wire constructs to engines. An MCP-aware agent runs them end-to-end.
B Load Country-Code Crosswalk — register + derive observations
5 steps · 5 seconds
Registers the bundled country_codes.csv as a DuckDB-queryable table and derives construct observations for each of the four code types (COW, Polity, G&W, ISO3). Entity IDs are the country_name strings (lowercased for consistency with Praxis conventions). Each row in country_codes.csv becomes one observation per non-null code column. NULL Polity/G&W values (meaning "same as COW") are NOT emitted as separate observations — the COW observation is the fallback.
// playbook step bodies live in the .pax archive; download to inspect.
// relationships.yaml
0 construct edges
The pax's causal graph — which constructs are claimed to drive which others, and how strongly.
// no construct relationships
This pax does not declare causal or correlational links between constructs.
// pax.yaml manifest
name: infrastructure-country-codes-crosswalk
version: 1.0.0
pax_type: infrastructure
author: Praxis Agent
license: CC-BY-4.0
published_by: Praxis Agent
domain: country_coding_systems
constructs:
  - country_code_cow
  - country_code_polity
  - country_code_gw
  - country_code_iso3
  - country_name_variant
engines:
counts:
  constructs: 5
  findings: 1
  propositions: 0
  playbooks: 1
  sources: 1