The set of codes listed in ISO 3166-1 for the representation of names of countries.
ISO 3166 is the standard behind the two-letter codes that turn up in domain names, passports and shipping forms. dcterms:ISO3166 is the DCMI term that lets a metadata record say “this value is one of those codes”. It is a syntax encoding scheme, declared as an rdfs:Datatype, and it applies to country codes listed in ISO 3166-1.
What the standard actually contains
ISO 3166 has three parts, and only the first is in scope for the DCMI term:
| Part | Content | Example |
|---|---|---|
| ISO 3166-1 | current countries and territories | PT, PRT, 620 |
| ISO 3166-2 | subdivisions (states, provinces, regions) | PT-11 |
| ISO 3166-3 | names withdrawn from part 1 | YUCS |
Part 1 itself gives three parallel forms for each entry: alpha-2, alpha-3 and a numeric code that matches the UN M49 numbering for countries. All three are “codes listed in ISO 3166-1”, so the DCMI definition does not by itself pick one. Application profiles do, and alpha-2 is by far the most common pick.
Typing a country code on dcterms:spatial
Country codes most often appear in dcterms:spatial, the property for the place a resource is about or was created in. Without a scheme, a value of “IN” is ambiguous (India, or the English preposition harvested from a badly split field). With ^^dcterms:ISO3166 in Turtle, rdf:datatype in RDF/XML or xsi:type="dcterms:ISO3166" in XML profiles, the meaning is fixed.
A country code is the coarsest useful place value. A record about a market in Ghent can carry BE for faceted browsing and still add the city by name or as a gazetteer URI in a second dcterms:spatial statement. If the extent matters, a dcterms:Box adds coordinates. A country code alone cannot say whether a photograph was taken on the mainland or on an overseas territory with its own code, such as Réunion (RE) next to France (FR).
The same codes are used in a different way inside language tags. In pt-BR the region subtag is the ISO 3166-1 alpha-2 code for Brazil, which is why country codes and dcterms:RFC5646 tags often appear together in a record. Format registries that record country of origin follow the same pattern, see the country code type.
Codes change
ISO 3166-1 is not frozen. Codes are added when a country is recognized and withdrawn when one dissolves. South Sudan received SS in 2011. Czechoslovakia’s CS was withdrawn in 1993 and later reused for Serbia and Montenegro before being withdrawn again, which shows why a bare two-letter string from an old record cannot always be resolved without a date. Names change as well: the entry for Turkey became Türkiye in 2022 while keeping the code TR.
For historical collections, two practical rules help. Record the place as it is meaningful for the resource and its era, and keep the code list version or the cataloging date in the record’s administrative metadata, so a later reader can tell which meaning of a reused code was intended.
Small errors that recur
Lowercase codes (de) are common in harvested data; ISO 3166-1 alpha-2 codes are written in capitals, and lowercase forms are a hint that someone copied a language code by mistake. UK is another frequent slip: it is reserved in ISO 3166-1 at the request of the United Kingdom, but the assigned code is GB. A collection that filters on GB will miss every record typed with UK. The same applies to EL for Greece, a form used inside the European Union, while ISO 3166-1 assigns GR.
Example in RDF
@prefix dcterms: <http://purl.org/dc/terms/> .
<https://example.org/photos/market-day-1972.jpg>
dcterms:title "Market day, Ghent" ;
dcterms:spatial "BE"^^dcterms:ISO3166 ;
dcterms:created "1972" .
Questions about dcterms:ISO3166
What is dcterms:ISO3166?
It is a DCMI syntax encoding scheme that marks a value as a country code from ISO 3166-1. Typed onto dcterms:spatial or dcterms:coverage, it tells software that 'FR' is the code for France and not an abbreviation of something else.
Should I use alpha-2 or alpha-3 codes?
The DCMI definition covers the codes of ISO 3166-1, which defines alpha-2, alpha-3 and numeric forms. Alpha-2 (DE, JP, BR) is the most widely used in metadata and the form expected inside language tags, so it is the usual choice unless a profile says otherwise.
Is ISO 3166 the same as ISO3166 in DCMI?
ISO 3166 is the international standard, maintained by the ISO 3166 Maintenance Agency. dcterms:ISO3166 is the DCMI term that refers to the country code part of that standard, so it can be cited as an encoding scheme in records.
How do I record a country that no longer exists?
ISO 3166-3 assigns four-letter codes to formerly used names, such as CSHH for Czechoslovakia. These are outside the DCMI definition, which covers ISO 3166-1, so record them untyped or with a separate scheme and state which part they come from.
Can ISO 3166 codes describe regions inside a country?
Subdivisions such as states and provinces have codes in ISO 3166-2, for example US-CA. The DCMI term refers to ISO 3166-1 only, so subdivision codes should be marked as a different scheme or replaced with a gazetteer URI.