A country, in MeaningGraph, is a country or territory identified by an ISO 3166-1 code. It is a shared value that datasets can point at even when they use different names or spellings.

“United States,” “USA,” and “US” can refer to the same country. Three spellings should not accidentally become three rows in a sales ranking.

One identity, several representations

A shared country value holds its readable name, aliases, and codes. These representations have distinct roles:

  • Alpha-2: two letters, such as US. Useful for compact keys and many joins.
  • Alpha-3: three letters, such as USA. A different code representation of the same place.
  • Numeric: three digits, such as 840. Keep leading zeroes when a code has them.

Country code describes the identifying code. The code is not the country itself, just as a filename is not the document. A dataset's text column is a representation that must be matched to the shared identity.

Aliases rescue ordinary data

Chinook stores country names on invoices, including “USA” and “Czech Republic.” The shared value set can match those spellings to United States and Czechia through labels and aliases.

Aliases are explicit mappings, not permission to guess. An ambiguous or unrecognised label should be checked. Inventing a match makes a join look successful while quietly changing the geography.

Code systems also have versions and change over time. For a historical dataset, confirm that the codes and boundaries mean what the observation meant then. A present-day label is not a time machine.

The place is shared; its role is not

Billing country, shipping country, birthplace, and customer-address country can all use the same country value set. They still describe different facts.

An invoice billed to Ireland and an order shipped to Germany use two country values in two roles. Naming both columns “country” hides that distinction. The billing-country guide follows this example.

The same care applies to cities: a city belongs to a country, but its identity is not interchangeable with the country's identity.

Join meanings before joining numbers

To compare revenue with population, both sides must resolve to the same country. A sales table keyed by “USA” and a population table keyed by “US” need a shared country identity before division is meaningful.

The Countries reference graph demonstrates this through a country row's iso2 identity, iso3 representation, aliases linked through country_iso2, and population accompanied by population_year.

A country currency is a different attribute: ISO 4217 identifies a currency, while ISO 3166 identifies a country or territory. “USD” should not be invited to the country-code join, however well it knows “US.”

Put the identity to work

The population map attaches a dated resident count to a place. The per-capita guide turns a total and that count into a comparison. The Chinook example connects invoice spellings, shared countries, population, and a sales ratio.

The reusable idea is simple: keep identity, representation, and role separate. That is how differently worded datasets can still answer the same question.