Two-letter vs Three-letter Country Abbreviations
The ISO 3166-1 standard defines three codes for each country: a 2-letter abbreviation, a 3-letter abbreviation, and a 3-digit code.
The 2-letter abbreviations may be familiar because it is very often (but not always [1]) also the country code top-level domain (ccTLD). For example, AU is the ISO abbreviation for Australia, and .au is the ccTLD.
I was curious about the relation between the two-letter and three-letter abbreviations. Sometimes the former is a prefix of the latter, such as US and USA. Sometimes the latter adds a letter in the middle, such as going from CN to CHN. How common are these two patterns?
I wrote a script using the iso3166 Python module to find out.
Turns out that the prefix pattern is most common, and occurs 63% of the time.
The infix pattern is the next most common, occurring 29% of the time.
Suffixes are rare. There are only for instances where the 2-letter name is the last two letters of the 3-letter name: ATF, MYT, SPM, and SGS.
The remaining possibilities are miscellaneous relations, such as IL and ISR for Israel.
Here's a table of countries and ISO codes in plain text (org-mode) format.
[1] There are four ccTLDs that are not ISO 3-166-1 alpha-2 names: uk, su, ac, and eu.
The post Two-letter vs Three-letter Country Abbreviations first appeared on John D. Cook.