Opened 8 years ago

Closed 8 years ago

#4809 closed defect (fixed)

use less political country names on metrics pages

Reported by: arma Owned by: karsten
Priority: Medium Milestone:
Component: Metrics/Website Version:
Severity: Keywords:
Cc: ioerror Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Some of the country names we use on the metrics pages make us sound very political.

Top examples include "Islamic Republic of Iran", "Democratic Republic of the Congo", "Democratic People's Republic of Korea".

We should replace these names with the simpler names that many people expect, in the case of Iran.

I'm not sure if "North Korea" is less political though, so there are still some landmines to navigate here.

Child Tickets

Change History (9)

comment:1 Changed 8 years ago by Sebastian

Can't we just use whatever the UN uses and be done?

comment:2 Changed 8 years ago by karsten

We're using Maxmind's country list and only changed "Libyan Arab Jamahiriya" to "Libya." Can you give me a diff with further changes you'd like to be made?

comment:3 Changed 8 years ago by arma

--- graphs.R    2012-01-05 08:14:30.000000000 -0500
+++ graphs.R.new        2012-01-05 08:20:42.000000000 -0500
@@ -106,7 +106,7 @@
   "in" = "India",
   "io" = "the British Indian Ocean Territory",
   "iq" = "Iraq",
-  "ir" = "the Islamic Republic of Iran",
+  "ir" = "Iran",
   "is" = "Iceland",
   "it" = "Italy",
   "je" = "Jersey",

Jake, do you have any more?

comment:4 in reply to:  2 Changed 8 years ago by arma

Replying to karsten:

We're using Maxmind's country list and only changed "Libyan Arab Jamahiriya" to "Libya." Can you give me a diff with further changes you'd like to be made?

For completeness: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Looks like Maxmind's list isn't even being kept up to date.

comment:5 Changed 8 years ago by rransom

Can we just use plain country codes?

comment:6 Changed 8 years ago by hellais

I propose to get the official entry name of the country inside of wikipedia.

For example:
"Democratic People's Republic of Korea" page title is "North Korea".

This is a bash one-liner to automate this:

for i in cat countries.txt;do curl -kis "http://en.wikipedia.org/wiki/${i}" | grep -m1 "<title>" | cut -d '-' -f1 | sed s/\<title\>g;done

comment:7 Changed 8 years ago by karsten

Here are the changes when we use country names that Wikipedia tells us:

diff --git a/rserve/graphs.R b/rserve/graphs.R
index 886fabf..2900c02 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -27,7 +27,7 @@ countrylist <- list(
   "bj" = "Benin",
   "bl" = "Saint Bartelemey",
   "bm" = "Bermuda",
-  "bn" = "Brunei Darussalam",
+  "bn" = "Brunei",
   "bo" = "Bolivia",
   "br" = "Brazil",
   "bs" = "the Bahamas",
@@ -42,7 +42,7 @@ countrylist <- list(
   "cf" = "Central African Republic",
   "cg" = "Congo",
   "ch" = "Switzerland",
-  "ci" = "Cote d'Ivoire",
+  "ci" = "Côte d'Ivoire",
   "ck" = "the Cook Islands",
   "cl" = "Chile",
   "cm" = "Cameroon",
@@ -106,7 +106,7 @@ countrylist <- list(
   "in" = "India",
   "io" = "the British Indian Ocean Territory",
   "iq" = "Iraq",
-  "ir" = "the Islamic Republic of Iran",
+  "ir" = "Iran",
   "is" = "Iceland",
   "it" = "Italy",
   "je" = "Jersey",
@@ -119,12 +119,12 @@ countrylist <- list(
   "ki" = "Kiribati",
   "km" = "Comoros",
   "kn" = "Saint Kitts and Nevis",
-  "kp" = "the Democratic People's Republic of Korea",
+  "kp" = "North Korea",
   "kr" = "the Republic of Korea",
   "kw" = "Kuwait",
   "ky" = "the Cayman Islands",
   "kz" = "Kazakhstan",
-  "la" = "Lao People's Democratic Republic",
+  "la" = "Laos",
   "lb" = "Lebanon",
   "lc" = "Saint Lucia",
   "li" = "Liechtenstein",
@@ -144,9 +144,9 @@ countrylist <- list(
   "mh" = "the Marshall Islands",
   "mk" = "Macedonia",
   "ml" = "Mali",
-  "mm" = "Myanmar",
+  "mm" = "Burma",
   "mn" = "Mongolia",
-  "mo" = "Macao",
+  "mo" = "Macau",
   "mp" = "the Northern Mariana Islands",
   "mq" = "Martinique",
   "mr" = "Mauritania",
@@ -179,7 +179,7 @@ countrylist <- list(
   "pk" = "Pakistan",
   "pl" = "Poland",
   "pm" = "Saint Pierre and Miquelon",
-  "pn" = "Pitcairn",
+  "pn" = "the Pitcairn Islands",
   "pr" = "Puerto Rico",
   "ps" = "the Palestinian Territory",
   "pt" = "Portugal",
@@ -189,7 +189,7 @@ countrylist <- list(
   "re" = "Reunion",
   "ro" = "Romania",
   "rs" = "Serbia",
-  "ru" = "the Russian Federation",
+  "ru" = "Russia",
   "rw" = "Rwanda",
   "sa" = "Saudi Arabia",
   "sb" = "the Solomon Islands",
@@ -206,7 +206,7 @@ countrylist <- list(
   "sn" = "Senegal",
   "so" = "Somalia",
   "sr" = "Suriname",
-  "st" = "Sao Tome and Principe",
+  "st" = "São Tomé and Príncipe",
   "sv" = "El Salvador",
   "sy" = "the Syrian Arab Republic",
   "sz" = "Swaziland",
@@ -217,7 +217,7 @@ countrylist <- list(
   "th" = "Thailand",
   "tj" = "Tajikistan",
   "tk" = "Tokelau",
-  "tl" = "Timor-Leste",
+  "tl" = "East Timor",
   "tm" = "Turkmenistan",
   "tn" = "Tunisia",
   "to" = "Tonga",
@@ -232,7 +232,7 @@ countrylist <- list(
   "us" = "the United States",
   "uy" = "Uruguay",
   "uz" = "Uzbekistan",
-  "va" = "Vatican City State",
+  "va" = "Vatican City",
   "vc" = "Saint Vincent and the Grenadines",
   "ve" = "Venezuela",
   "vg" = "the British Virgin Islands",

comment:8 Changed 8 years ago by arma

I'm fine with all of those changes.

comment:9 Changed 8 years ago by karsten

Resolution: fixed
Status: newclosed

Great! Committed and deployed. Closing.

Note: See TracTickets for help on using tickets.