ferrero-opentext/Python-Version/config/country_code_mappings.yaml
DJP 9acd3d3bbf Update GL country code mapping: GL is now GLOBAL (not Greenland)
- Updated comment on line 281 to clarify GL is officially GLOBAL
- Removed outdated reference suggesting GL was Greenland
- Mapping GL: GL # GLOBAL remains correct
2025-12-06 10:56:45 -05:00

337 lines
8.4 KiB
YAML

# Country Code Mappings: ISO 3166-1 Alpha-2 -> DAM Codes
#
# Source: Mapping.csv (201 entries from DAM export)
# Purpose: Maps standard ISO country codes (used in filenames) to DAM-specific codes
# Last Updated: November 5, 2025
#
# Special Values:
# - XX: Invalid entry (not a country, city, state, or region)
# - Codes marked with ✓ in source CSV are validated mappings
#
# IMPORTANT: Some DAM codes differ significantly from ISO standards!
# See "Problematic Mappings" section at bottom for details.
#
# Format: iso_code: dam_code
# ============================================================================
# Invalid/Non-Country Entries from DAM System
# ============================================================================
# These entries exist in the DAM but are NOT valid ISO country codes
# They represent cities, states, regions, or data entry errors
# All mapped to XX as placeholder
AA: XX # DFI/ASIA - Region, not a country
AP: XX # ANDHRA PRADESH - Indian state
BK: XX # BELSK - Invalid entry
CB: XX # DFI/CARIBBEAN - Region, not a country
CT: XX # COTTONTAIL - Invalid entry
DU: XX # DFIC DUBAI - Dubai is a city in UAE
HY: XX # HYDERABAD - City in India
II: XX # INTERNATIONAL - Not a country
IO: XX # DFI/ISOLE - Region, not a country
KA: XX # KERALA - Indian state
KK: XX # KARNATAKA - Indian state
MH: XX # MAHARASHTRA - Indian state
OS: XX # DFI/OVERSEA - Region, not a country
PC: XX # POCOS DE CALDAS - City in Brazil
# ============================================================================
# Valid Country Mappings (ISO Code -> DAM Code)
# ============================================================================
# A
AE: AE # UNITED ARAB EMIRATES
AF: AF # AFGHANISTAN
AL: AL # ALBANIA
AM: AM # ARMENIA
AN: AN # NETHERLANDS ANTILLES
AO: AO # ANGOLA
AR: AR # ARGENTINA
AT: AT # AUSTRIA
AU: AU # AUSTRALIA
AZ: AZ # AZERBAIJAN
# B
BA: BA # BOSNIA
BD: BG # BANGLADESH -> DAM code BG (⚠️ BG is Bulgaria's ISO code!)
BE: BE # BELGIUM
BF: BF # BURKINA FASO
BG: BU # BULGARIA -> DAM code BU (non-standard, real ISO is BG)
BH: BH # BAHRAIN
BI: BI # BURUNDI
BJ: BJ # BENIN
BN: BN # BRUNEI
BO: BO # BOLIVIA
BR: BR # BRAZIL
BT: BT # BHUTAN
BW: BW # BOTSWANA
BY: BY # BELARUS
BZ: BZ # BELIZE
# C
CA: CA # CANADA
CD: CD # CONGO DEM REP
CF: CF # CENTRAL AFRICAN REP
CG: CG # CONGO REPUBLIC
CH: CH # SWITZERLAND
CI: CI # COTE D'IVOIRE
CL: CL # CHILE
CM: CM # CAMEROON
CN: CN # CHINA
CO: CO # COLOMBIA
CR: CR # COSTA RICA
CU: CU # CUBA
CV: CV # CABO VERDE
CY: CY # CYPRUS
CZ: CZ # CZECH REPUBLIC
# D
DE: DE # GERMANY
DJ: DJ # DJIBOUTI
DK: DK # DENMARK
DZ: DZ # ALGERIA
# E
EC: EC # ECUADOR
EE: EE # ESTONIA
EG: EG # EGYPT
EH: EH # WEST SAHARA
ER: ER # ERITREA
ES: ES # SPAIN
ET: ET # ETHIOPIA
# F
FI: FI # FINLAND
FR: FR # FRANCE
# G
GA: GA # GABON
GB: GB # UK
GE: GE # GEORGIA
GF: GF # FRENCH GUYANA
GH: GH # GHANA
GL: GL # GLOBAL
GM: GM # GAMBIA
GN: GN # GUINEA
GP: GP # GUADELOUPE
GQ: GQ # EQUATORIAL GUINEA
GR: GR # GREECE
GT: GT # GUATEMALA
GW: GW # GUINEA BISSAU
GY: GY # GUYANA
# H
HK: HK # HONG KONG
HN: HN # HONDURAS
HR: HR # CROATIA
HU: HU # HUNGARY
# I
ID: IS # INDONESIA -> DAM code IS (⚠️ IS is Iceland's ISO code!)
IE: IE # IRELAND
IL: IL # ISRAEL
IN: ID # INDIA -> DAM code ID (⚠️ ID is Indonesia's ISO code!)
IQ: IQ # IRAQ
IR: IR # IRAN
IS: IC # ICELAND -> DAM code IC (non-standard)
IT: IT # ITALY
# J
JO: JO # JORDAN
JP: JP # JAPAN
# K
KE: KE # KENYA
KG: KG # KYRGYZSTAN
KH: KH # CAMBODIA
KM: KM # COMOROS
KP: KP # NORTH KOREA
KR: KR # SOUTH KOREA
KW: KW # KUWAIT
KZ: KZ # KAZAKHSTAN
# L
LA: LA # LAOS
LB: LB # LEBANON
LK: LK # SRI LANKA
LR: LR # LIBERIA
LS: LS # LESOTHO
LT: LT # LITHUANIA
LU: LU # LUXEMBOURG
LV: LV # LATVIA
LY: LY # LIBYA
# M
MA: MA # MOROCCO
MD: MD # MOLDOVA
ME: ME # MONTENEGRO
MF: MF # SAINT MARTIN
MG: MG # MADAGASCAR
MK: MK # MACEDONIA
ML: ML # MALI
MM: MM # MYANMAR
MN: MN # MONGOLIA
MO: MO # MACAO
MQ: MQ # MARTINIQUE
MR: MR # MAURITANIA
MT: MT # MALTA
MU: MU # MAURITIUS
MV: MV # MALDIVES
MW: MW # MALAWI
MX: MX # MEXICO
MY: MY # MALAYSIA
MZ: MZ # MOZAMBIQUE
# N
NA: NB # NAMIBIA -> DAM code NB (non-standard)
NC: NC # NEW CALEDONIA
NE: NE # NIGER (not in CSV but standard ISO)
NG: NA # NIGERIA -> DAM code NA (⚠️ NA is Namibia's ISO code!)
NI: NR # NICARAGUA -> DAM code NR (non-standard)
NL: NL # NETHERLANDS
NO: NO # NORWAY
NP: NE # NEPAL -> DAM code NE (⚠️ NE is Niger's ISO code!)
NZ: NZ # NEW ZEALAND
# O
OM: OM # OMAN
# P
PA: PA # PANAMA
PE: PE # PERU
PF: PF # FRENCH POLYNESIA
PG: PG # PAPUA NEW GUINEA
PH: PH # PHILIPPINES
PK: PK # PAKISTAN
PL: PL # POLAND
PR: PR # PUERTO RICO
PS: PS # PALESTINE
PT: PT # PORTUGAL
PY: PY # PARAGUAY
# Q
QA: QA # QATAR
# R
RE: RE # REUNION
RO: RO # ROMANIA
RS: RS # SERBIA
RU: RU # RUSSIA
RW: RW # RWANDA
# S
SA: SA # SAUDI ARABIA
SC: SC # SEYCHELLES
SD: SD # SUDAN
SE: SE # SWEDEN
SG: SG # SINGAPORE
SI: SI # SLOVENIA
SK: SK # SLOVAKIA
SL: SL # SIERRA LEONE
SN: SN # SENEGAL
SO: SO # SOMALIA
SR: SR # SURINAME
SV: SV # EL SALVADOR
SY: SY # SYRIA
SZ: SZ # SWAZILAND
# T
TD: TD # CHAD
TG: TG # TOGO
TH: TH # THAILAND
TJ: TJ # TAJIKISTAN
TL: TL # TIMOR
TM: TM # TURKMENISTAN
TN: TN # TUNISIA
TR: TR # TURKEY
TW: TW # TAIWAN
TZ: TZ # TANZANIA
# U
UA: UA # UKRAINE
UG: UG # UGANDA
US: US # USA
UY: UY # URUGUAY
UZ: UZ # UZBEKISTAN
# V
VE: VE # VENEZUELA
VN: VN # VIETNAM
# X
XK: XK # KOSOVO
# Y
YE: YE # YEMEN
YT: YT # MAYOTTE
# Z
ZA: ZA # SOUTH AFRICA
ZM: ZM # ZAMBIA
ZW: ZW # ZIMBABWE
# ============================================================================
# Invalid/Non-Country Entries in DAM System (not mapped)
# ============================================================================
#
# The following DAM codes exist but are NOT valid ISO country codes.
# They represent cities, states, regions, or invalid entries.
# These should NOT be used in filenames but are documented here for reference:
#
# - GL: GLOBAL (officially mapped above - not Greenland)
# - AP: ANDHRA PRADESH (Indian state)
# - BK: BELSK (invalid)
# - BD as "BRANTFORD" (city in Canada - conflicts with Bangladesh!)
# - CT: COTTONTAIL (invalid)
# - AA: DFI/ASIA (region)
# - CB: DFI/CARIBBEAN (region)
# - EU: DFI/EUROPE (region)
# - IO: DFI/ISOLE (region)
# - OS: DFI/OVERSEA (region)
# - DU: DFIC DUBAI (city in UAE)
# - HY: HYDERABAD (city in India)
# - II: INTERNATIONAL (not a country)
# - KK: KARNATAKA (Indian state)
# - KA: KERALA (Indian state)
# - MH: MAHARASHTRA (Indian state)
# - NP as "NASIK E PUNE" (cities in India - conflicts with Nepal!)
# - NI as "NIG" (ambiguous - conflicts with Nicaragua!)
# - PC: POCOS DE CALDAS (city in Brazil)
# - IN as "TAMIL NADU" (Indian state - conflicts with India!)
#
# ============================================================================
# Critical Problematic Mappings - Data Quality Issues
# ============================================================================
#
# The following mappings have serious data quality issues where DAM codes
# create conflicts with standard ISO codes. These are mapped as specified
# in the CSV but represent systemic problems in the DAM:
#
# 1. Bangladesh/Bulgaria Conflict:
# - BANGLADESH: ISO=BD -> DAM=BG ⚠️ (BG is Bulgaria's standard ISO code!)
# - BULGARIA: ISO=BG -> DAM=BU (non-standard to avoid conflict)
#
# 2. India/Indonesia/Iceland Triangle:
# - INDIA: ISO=IN -> DAM=ID ⚠️ (ID is Indonesia's standard ISO code!)
# - INDONESIA: ISO=ID -> DAM=IS ⚠️ (IS is Iceland's standard ISO code!)
# - ICELAND: ISO=IS -> DAM=IC (non-standard to avoid conflict)
#
# 3. Nigeria/Namibia Swap:
# - NIGERIA: ISO=NG -> DAM=NA ⚠️ (NA is Namibia's standard ISO code!)
# - NAMIBIA: ISO=NA -> DAM=NB (non-standard to avoid conflict)
#
# 4. Nicaragua/Nepal/Niger:
# - NICARAGUA: ISO=NI -> DAM=NR (non-standard)
# - NEPAL: ISO=NP -> DAM=NE ⚠️ (NE is Niger's standard ISO code!)
# - NIGER: ISO=NE -> ??? (not in DAM system)
#
# ============================================================================
# Usage Notes
# ============================================================================
#
# When using this mapping:
# 1. Filenames use ISO codes (BD, IN, ID, etc.)
# 2. Before DAM upload, ISO codes are converted to DAM codes
# 3. This file can be edited to update mappings without code changes
# 4. Invalid entries in DAM (cities, states) should not appear in filenames
# 5. When DAM system is fixed, simply update this file with correct mappings