Skip to content

Instantly share code, notes, and snippets.

@fewaltix
Last active May 18, 2022 18:36
Show Gist options
  • Save fewaltix/3c8a21dd960da0849a3dcb0705e01868 to your computer and use it in GitHub Desktop.
Save fewaltix/3c8a21dd960da0849a3dcb0705e01868 to your computer and use it in GitHub Desktop.
Python dict for Gleditsch & Ward (G&W) country codes & ISO3166-3 (ISO3) codes - missing values are countries that did not exist in 1974 or after and thus have no ISO3 code
GWcodes = {
711: np.nan,
511: np.nan,
817: 'VNM',
680: 'YEM',
265: 'DDR',
315: 'CZE',
345: 'YUG',
396: np.nan,
700: 'AFG',
540: 'AGO',
339: 'ALB',
232: 'AND',
696: 'ARE',
160: 'ARG',
371: 'ARM',
58: 'ATG',
900: 'AUS',
305: 'AUT',
373: 'AZE',
516: 'BDI',
211: 'BEL',
434: 'BEN',
439: 'BFA',
771: 'BGD',
355: 'BGR',
692: 'BHR',
31: 'BHS',
346: 'BIH',
370: 'BLR',
80: 'BLZ',
145: 'BOL',
140: 'BRA',
53: 'BRB',
835: 'BRN',
760: 'BTN',
571: 'BWA',
482: 'CAF',
20: 'CAN',
225: 'CHE',
155: 'CHL',
710: 'CHN',
437: 'CIV',
471: 'CMR',
490: 'COD',
484: 'COG',
100: 'COL',
581: 'COM',
402: 'CPV',
94: 'CRI',
40: 'CUB',
352: 'CYP',
316: 'CZE',
522: 'DJI',
54: 'DMA',
390: 'DNK',
42: 'DOM',
615: 'DZA',
130: 'ECU',
651: 'EGY',
531: 'ERI',
230: 'ESP',
366: 'EST',
530: 'ETH',
375: 'FIN',
950: 'FJI',
220: 'FRA',
987: 'FSM',
481: 'GAB',
200: 'GBR',
372: 'GEO',
260: 'DEU',
452: 'GHA',
438: 'GIN',
420: 'GMB',
404: 'GNB',
411: 'GNQ',
350: 'GRC',
55: 'GRD',
90: 'GTM',
110: 'GUY',
91: 'HND',
344: 'HRV',
41: 'HTI',
310: 'HUN',
850: 'IDN',
750: 'IND',
205: 'IRL',
630: 'IRN',
645: 'IRQ',
395: 'ISL',
666: 'ISR',
325: 'ITA',
51: 'JAM',
663: 'JOR',
740: 'JPN',
705: 'KAZ',
501: 'KEN',
703: 'KGZ',
811: 'KHM',
970: 'KIR',
60: 'KNA',
732: 'KOR',
690: 'KWT',
812: 'LAO',
660: 'LBN',
450: 'LBR',
620: 'LBY',
56: 'LCA',
223: 'LIE',
780: 'LKA',
570: 'LSO',
368: 'LTU',
212: 'LUX',
367: 'LVA',
600: 'MAR',
221: 'MCO',
359: 'MDA',
580: 'MDG',
781: 'MDV',
70: 'MEX',
983: 'MHL',
343: 'MKD',
432: 'MLI',
338: 'MLT',
775: 'MMR',
341: 'MNE',
712: 'MNG',
541: 'MOZ',
435: 'MRT',
590: 'MUS',
553: 'MWI',
820: 'MYS',
565: 'NAM',
436: 'NER',
475: 'NGA',
93: 'NIC',
210: 'NLD',
385: 'NOR',
790: 'NPL',
971: 'NRU',
920: 'NZL',
698: 'OMN',
770: 'PAK',
95: 'PAN',
135: 'PER',
840: 'PHL',
986: 'PLW',
910: 'PNG',
290: 'POL',
731: 'PRK',
235: 'PRT',
150: 'PRY',
694: 'QAT',
360: 'ROU',
365: 'RUS',
517: 'RWA',
670: 'SAU',
625: 'SDN',
433: 'SEN',
830: 'SGP',
940: 'SLB',
451: 'SLE',
92: 'SLV',
331: 'SMR',
520: 'SOM',
397: np.nan,
340: 'SRB',
626: 'SSD',
403: 'STP',
115: 'SUR',
317: 'SVK',
349: 'SVN',
380: 'SWE',
572: 'SWZ',
591: 'SYC',
652: 'SYR',
483: 'TCD',
461: 'TGO',
800: 'THA',
702: 'TJK',
701: 'TKM',
860: 'TLS',
972: 'TON',
52: 'TTO',
616: 'TUN',
640: 'TUR',
973: 'TUV',
713: 'TWN',
510: 'TZA',
500: 'UGA',
369: 'UKR',
165: 'URY',
2: 'USA',
704: 'UZB',
57: 'VCT',
101: 'VEN',
816: 'VNM',
935: 'VUT',
990: 'WSM',
347: 'XKX',
678: 'YEM',
560: 'ZAF',
551: 'ZMB',
552: 'ZWE'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment