This project is to help social science research to standardize country code in multinational research. We follow ISO 3166-1 to standardize country identifiers. This list does not take any political or religious conflict into account.
The list is now cross-sectional and I would like to develop it into a panel.
Please feel free to contribute if you find any uncovered or wrong country name/number/code. You can either use pull request or send me email: wenzhi.ding@connect.hku.hk.
- CountryName: This dataset is the link table between country names and ISO 3166-1 Alpha-3 code.
- CountryNumber: This dataset is the link table between ISO 3166-1 Numeric code and ISO 3166-1 Alpha-3 code.
- CountryISO2: This dataset is the link table between ISO 3166-1 Alpha-2 code to ISO 3166-1 Alpha-3 code.
Please notice that I have some personal adjustments to keep the keys unique in each table. For example, Zaire and Congo share numeric code 180, but with different alpha code (ZR, ZAR and CD, COD). I only keep the present regime, which is (180, CD, COD).
In this way, you can always get the most updated version of country code link tables.
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/Wenzhi-Ding/StdCountryCode/main/CountryName.csv', encoding='utf-8') # Please use UTF-8 encoding.
import delimited "https://raw.githubusercontent.com/Wenzhi-Ding/StdCountryCode/main/CountryName.csv", clear
rename (Ctry_Name Ctry_ISO3) ([your country name] [your country code])
save "${some_path}CountryName.dta", replace