From 4208a82067f3dd4a216bad164d164625df09fb8c Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Sat, 5 Oct 2024 13:45:56 +0200 Subject: [PATCH 1/2] Clean up Sark country code, add UN, remove some non-countries --- followthemoney/types/country.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/followthemoney/types/country.py b/followthemoney/types/country.py index 18f3f92be..c04c1643c 100644 --- a/followthemoney/types/country.py +++ b/followthemoney/types/country.py @@ -28,6 +28,7 @@ def _locale_names(self, locale: Locale) -> EnumValues: names = { "zz": gettext("Global"), "eu": gettext("European Union"), + "un": gettext("United Nations"), "zr": gettext("Zaire"), # Overwrite "Czechia" label: "cz": gettext("Czech Republic"), @@ -46,7 +47,7 @@ def _locale_names(self, locale: Locale) -> EnumValues: "cy-trnc": gettext("Northern Cyprus"), "az-nk": gettext("Nagorno-Karabakh"), "cn-xz": gettext("Tibet"), - "gg-srk": gettext("Sark"), + "cq": gettext("Sark"), "gb-wls": gettext("Wales"), "gb-sct": gettext("Scotland"), "gb-nir": gettext("Northern Ireland"), @@ -61,6 +62,12 @@ def _locale_names(self, locale: Locale) -> EnumValues: int(code) except ValueError: names[code] = label + # Remove some ISO-3611 codes that are not countries: + names.pop("xa", None) + names.pop("xb", None) + names.pop("qo", None) + names.pop("ea", None) + names.pop("ez", None) return names def clean_text( From f90c7b2ae6ac4472088ccadf0df281bed6a8c421 Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Sat, 5 Oct 2024 15:13:49 +0200 Subject: [PATCH 2/2] renegerate model --- js/src/defaultModel.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/js/src/defaultModel.json b/js/src/defaultModel.json index bfd502d02..61c693a48 100644 --- a/js/src/defaultModel.json +++ b/js/src/defaultModel.json @@ -7154,7 +7154,6 @@ "dm": "Dominica", "do": "Dominican Republic", "dz": "Algeria", - "ea": "Ceuta & Melilla", "ec": "Ecuador", "ee": "Estonia", "eg": "Egypt", @@ -7163,7 +7162,6 @@ "es": "Spain", "et": "Ethiopia", "eu": "European Union", - "ez": "Eurozone", "fi": "Finland", "fj": "Fiji", "fk": "Falkland Islands", @@ -7180,7 +7178,6 @@ "ge-ab": "Abkhazia (Occupied Georgia)", "gf": "French Guiana", "gg": "Guernsey", - "gg-srk": "Sark", "gh": "Ghana", "gi": "Gibraltar", "gl": "Greenland", @@ -7290,7 +7287,6 @@ "pw": "Palau", "py": "Paraguay", "qa": "Qatar", - "qo": "Outlying Oceania", "re": "RĂ©union", "ro": "Romania", "rs": "Serbia", @@ -7356,8 +7352,6 @@ "wf": "Wallis & Futuna", "ws": "Samoa", "x-so": "South Ossetia (Occupied Georgia)", - "xa": "Pseudo-Accents", - "xb": "Pseudo-Bidi", "xk": "Kosovo", "ye": "Yemen", "yt": "Mayotte",