forked from openeventdata/CountryInfo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPITF_to_ISO3166.txt
29 lines (24 loc) · 2.11 KB
/
PITF_to_ISO3166.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
This is a Python dictionary that should get you most of the way to translating between the Political Instability Task Force
country codes (SFTGCODE) to the ISO-3166-alpha3 codes used in ICEWS, Phoenix and pretty much everywhere else. This was
done for a specific project and may not have all of the codes but should have most of them.
The PITF2ISO dictionary key is the PITF code; the value is the ISO code. Only the codes that are different between the two
system are included, so you will want something like the following in your code:
if natcode in PITF2ISO.keys():
natcode = PITF2ISO[natcode]
PITF codes are apparently fairly similar to COW codes so this will probably also be useful for that purpose. For a complete
list, use the CountryInfo file in this repo.
PITF2ISO = {
'ALG': 'DZA', 'ANG': 'AGO', 'AUL': 'AUS', 'BAH': 'BHR', 'BFO': 'BFA', 'BHU': 'BTN', 'BNG': 'BGD', 'BOS': 'BIH',
'BOT': 'BWA', 'BUI': 'BDI', 'BUL': 'BGR', 'CAM': 'KHM', 'CAO': 'CMR', 'CAP': 'CPV', 'CEN': 'CAF', 'CHA': 'TCD',
'CON': 'COG', 'COS': 'CRI', 'CRO': 'HRV', 'CZR': 'CZE', 'DEN': 'DNK', 'EQG': 'GNQ', 'ETI': 'ETH',
'FRN': 'FRA', 'GAM': 'GMB', 'GER': 'DEU', 'GRG': 'GEO', 'GUA': 'GTM', 'GUI': 'GIN', 'HAI': 'HTI', 'HON': 'HND',
'INS': 'IND', 'IRE': 'IRL', 'IVO': 'CIV', 'KUW': 'KWT', 'KYR': 'KGZ', 'KZK': 'KAZ', 'LAT': 'LVA', 'LEB': 'LBN',
'LES': 'LSO', 'LIB': 'LBY', 'LIT': 'LTU', 'MAA': 'MRT', 'MAC': 'MKD', 'MAG': 'MDG', 'MAL': 'MLI', 'MAS': 'MUS',
'MAW': 'MWI', 'MLD': 'MDA', 'MON': 'MNG', 'MOR': 'MAR', 'MYA': 'MMR', 'MZM': 'MOZ', 'NEP': 'NPL', 'NEW': 'NZL',
'NIG': 'NGA', 'NIR': 'NER', 'NTH': 'NLD', 'OMA': 'OMN', 'PAR': 'PRY', 'PHI': 'PHL', 'POR': 'PRT', 'ROK': 'KOR',
'RUM': 'ROU', 'SAF': 'ZAF', 'SAL': 'SLV', 'SIE': 'SLE', 'SIN': 'SGP', 'SLO': 'SVK', 'SLV': 'SVN', 'SOL': 'SLB',
'SPN': 'ESP', 'SRI': 'LKA', 'SUD': 'SDN', 'SWA': 'SWZ', 'SWD': 'SWE', 'TAJ': 'TJK', 'TAW': 'TWN', 'TAZ': 'TZA',
'THI': 'THA', 'TOG': 'TGO', 'TRI': 'TTO', 'UAE': 'ARE', 'URU': 'URY', 'VIE': 'VNM', 'YGS': 'SER', 'ZAI': 'COD',
'ZAM': 'ZMB', 'ZIM': 'ZWE'
}
Source: https://github.com/philip-schrodt/CountryInfo-1