visionscarto/world-atlas

Add functional 2-letter and 3-letter codes

Fil opened this issue · 2 comments

Fil commented
countries.features
  .filter(d => d.properties.iso_a3 === "-99" || d.properties.iso_a2 === "-99")
  .map(d => [
    d.properties.admin,
    d.properties.iso_a2,
    d.properties.adm0_a3_is.slice(0, 2)
  ])

For 2-letter codes (iso_a2), issues with France, Norway, Somaliland, Northern Cyprus

For 3-letter codes (iso_a3), issues with France, Norway, Somaliland, Northern Cyprus & Kosovo

  0: Array(3) ["Norway", "-99", "NO"] // NO
  1: Array(3) ["France", "-99", "FR"] // FR
  2: Array(3) ["Northern Cyprus", "-99", "CY"] // same as Cyprus(!)
  3: Array(3) ["Somaliland", "-99", "SO"] // Same as Somalia
  4: Array(3) ["Kosovo", "XK", "KO"]  // ambiguous
Fil commented

fixed in 0.1.0