Countries (ISO2 Codes) with Provinces

Many web forms involve addresses. Registering an account or entering shipping information. When dealing with international addresses you might run into problems with countries that have provinces instead of states, or zip codes or telephone numbers having different rules. I ran into the former at work recently.

We get an XML message from another service with addresses. Depending on what country code is in that message we look for either <State>NC</State> or <Province>XY</Province>. I wanted to fix the problem once and for all by using a list of all country codes with provinces. Surprisingly, my Googlefu was not good enough to find a satisfactory answer. I figured someone might want this nice consolidated list one day, if only myself, so I wrote a quick python script that will scrape the CIA World Factbook looking for information about the countries provinces. The script and details about it can be found in this post.

Without further ado, here is a consolidated lists of countries that have provinces instead of states (unverified by human hands):
Afghanistan(AF)
Algeria(DZ)
Angola(AO)
Argentina(AR)
Armenia(AM)
Belarus(BY)
Belgium(BE)
Bulgaria(BG)
Burkina Faso(BF)
Burundi(BI)
Cambodia(KH)
Cameroon(CM)
Canada(CA)
China(CN)
Congo, Democratic Republic of the(CD)
Costa Rica(CR)
Cuba(CU)
Dominican Republic(DO)
Ecuador(EC)
Equatorial Guinea(GQ)
Finland(FI)
Gabon(GA)
Indonesia(ID)
Iran(IR)
Kazakhstan(KZ)
Kenya(KE)
Korea, North(KP)
Korea, South(KR)
Kyrgyzstan(KG)
Laos(LA)
Madagascar(MG)
Mongolia(MN)
Mozambique(MZ)
Netherlands(NL)
New Caledonia(NC)
Pakistan(PK)
Panama(PA)
Papua New Guinea(PG)
Philippines(PH)
Poland(PL)
Rwanda(RW)
Sao Tome and Principe(ST)
Saudi Arabia(SA)
Serbia and Montenegro/Federal Republic of Yugoslavia(CS)
Sierra Leone(SL)
Solomon Islands(SB)
South Africa(ZA)
Sri Lanka(LK)
Syria(SY)
Tajikistan(TJ)
Thailand(TH)
Turkey(TR)
Turkmenistan(TM)
Ukraine(UA)
Uzbekistan(UZ)
Vanuatu(VU)
Vietnam(VN)
Zambia(ZM)
Zimbabwe(ZW)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>