[tor-commits] [metrics-web/master] Remove one country code, add four.

karsten at torproject.org karsten at torproject.org
Tue Jan 26 16:44:33 UTC 2016


commit 3d7480ea94b5d4fe7b0cfd47821d1029d9fd8265
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jan 26 17:41:12 2016 +0100

    Remove one country code, add four.
    
     - Remove FX (France, Metropolitan): Wikipedia says this country code
       was reserved on request of France, but it's neither used by MaxMind
       nor by little-t-tor.  We can safely drop this country code from
       Metrics.
     - Add BQ (Bonaire, Sint Eustatius and Saba): This country code was
       assigned in 2010, and Metrics is missing it.  We should add it.
     - Add CW (Curacao): See BQ, add it.
     - Add SX (Sint Maarten): See BQ, add it.
     - Add XK (Kosovo): Wikipedia says that XF is a user-assigned code
       that is being used by the European Commission, Switzerland, the
       Deutsche Bundesbank, SWIFT, and other organizations as a temporary
       country code for Kosovo.  MaxMind adds this country code in its
       GeoIP2 format, and there are actual Tor users from that country
       code.  We should add it to Metrics, too.
    
    Fixes #17786.
---
 modules/clients/country_info.py                              |    5 ++++-
 website/rserve/graphs.R                                      |    5 ++++-
 website/src/org/torproject/metrics/web/graphs/Countries.java |    6 +++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules/clients/country_info.py b/modules/clients/country_info.py
index e23728e..1a505d0 100644
--- a/modules/clients/country_info.py
+++ b/modules/clients/country_info.py
@@ -31,6 +31,7 @@ countries = {
     "bm" : "Bermuda",
     "bn" : "Brunei",
     "bo" : "Bolivia",
+    "bq" : "Bonaire, Sint Eustatius and Saba",
     "br" : "Brazil",
     "bs" : "the Bahamas",
     "bt" : "Bhutan",
@@ -53,6 +54,7 @@ countries = {
     "cr" : "Costa Rica",
     "cu" : "Cuba",
     "cv" : "Cape Verde",
+    "cw" : u"Curaçao",
     "cx" : "the Christmas Island",
     "cy" : "Cyprus",
     "cz" : "the Czech Republic",
@@ -75,7 +77,6 @@ countries = {
     "fm" : "the Federated States of Micronesia",
     "fo" : "the Faroe Islands",
     "fr" : "France",
-    "fx" : "Metropolitan France",
     "ga" : "Gabon",
     "gb" : "the United Kingdom",
     "gd" : "Grenada",
@@ -211,6 +212,7 @@ countries = {
     "ss" : "South Sudan",
     "st" : u"São Tomé and Príncipe",
     "sv" : "El Salvador",
+    "sx" : "Sint Maarten",
     "sy" : "the Syrian Arab Republic",
     "sz" : "Swaziland",
     "tc" : "Turks and Caicos Islands",
@@ -244,6 +246,7 @@ countries = {
     "vu" : "Vanuatu",
     "wf" : "Wallis and Futuna",
     "ws" : "Samoa",
+    "xk" : "Kosovo",
     "ye" : "Yemen",
     "yt" : "Mayotte",
     "za" : "South Africa",
diff --git a/website/rserve/graphs.R b/website/rserve/graphs.R
index bbb2561..87ac39a 100644
--- a/website/rserve/graphs.R
+++ b/website/rserve/graphs.R
@@ -29,6 +29,7 @@ countrylist <- list(
   "bm" = "Bermuda",
   "bn" = "Brunei",
   "bo" = "Bolivia",
+  "bq" = "Bonaire, Sint Eustatius and Saba",
   "br" = "Brazil",
   "bs" = "the Bahamas",
   "bt" = "Bhutan",
@@ -51,6 +52,7 @@ countrylist <- list(
   "cr" = "Costa Rica",
   "cu" = "Cuba",
   "cv" = "Cape Verde",
+  "cw" = "Curaçao",
   "cx" = "the Christmas Island",
   "cy" = "Cyprus",
   "cz" = "the Czech Republic",
@@ -73,7 +75,6 @@ countrylist <- list(
   "fm" = "the Federated States of Micronesia",
   "fo" = "the Faroe Islands",
   "fr" = "France",
-  "fx" = "Metropolitan France",
   "ga" = "Gabon",
   "gb" = "the United Kingdom",
   "gd" = "Grenada",
@@ -209,6 +210,7 @@ countrylist <- list(
   "ss" = "South Sudan",
   "st" = "São Tomé and Príncipe",
   "sv" = "El Salvador",
+  "sx" = "Sint Maarten",
   "sy" = "the Syrian Arab Republic",
   "sz" = "Swaziland",
   "tc" = "Turks and Caicos Islands",
@@ -242,6 +244,7 @@ countrylist <- list(
   "vu" = "Vanuatu",
   "wf" = "Wallis and Futuna",
   "ws" = "Samoa",
+  "xk" = "Kosovo",
   "ye" = "Yemen",
   "yt" = "Mayotte",
   "za" = "South Africa",
diff --git a/website/src/org/torproject/metrics/web/graphs/Countries.java b/website/src/org/torproject/metrics/web/graphs/Countries.java
index 7a99a46..7982a8f 100644
--- a/website/src/org/torproject/metrics/web/graphs/Countries.java
+++ b/website/src/org/torproject/metrics/web/graphs/Countries.java
@@ -46,6 +46,8 @@ public class Countries {
     this.knownCountries.add("bm;Bermuda".split(";"));
     this.knownCountries.add("bt;Bhutan".split(";"));
     this.knownCountries.add("bo;Bolivia".split(";"));
+    this.knownCountries.add("bq;Bonaire, Sint Eustatius and Saba".
+        split(";"));
     this.knownCountries.add("ba;Bosnia and Herzegovina".split(";"));
     this.knownCountries.add("bw;Botswana".split(";"));
     this.knownCountries.add("bv;Bouvet Island".split(";"));
@@ -78,6 +80,7 @@ public class Countries {
     this.knownCountries.add("ci:Côte d'Ivoire".split(":"));
     this.knownCountries.add("hr;Croatia".split(";"));
     this.knownCountries.add("cu;Cuba".split(";"));
+    this.knownCountries.add("cw;Curaçao".split(";"));
     this.knownCountries.add("cy;Cyprus".split(";"));
     this.knownCountries.add("cz;Czech Republic".split(";"));
     this.knownCountries.add("dk;Denmark".split(";"));
@@ -95,7 +98,6 @@ public class Countries {
     this.knownCountries.add("fo;Faroe Islands".split(";"));
     this.knownCountries.add("fj;Fiji".split(";"));
     this.knownCountries.add("fi;Finland".split(";"));
-    this.knownCountries.add("fx;France, Metropolitan".split(";"));
     this.knownCountries.add("fr;France".split(";"));
     this.knownCountries.add("gf;French Guiana".split(";"));
     this.knownCountries.add("pf;French Polynesia".split(";"));
@@ -141,6 +143,7 @@ public class Countries {
     this.knownCountries.add("ki;Kiribati".split(";"));
     this.knownCountries.add("kp;North Korea".split(";"));
     this.knownCountries.add("kr;Korea, Republic of".split(";"));
+    this.knownCountries.add("xk;Kosovo".split(";"));
     this.knownCountries.add("kw;Kuwait".split(";"));
     this.knownCountries.add("kg;Kyrgyzstan".split(";"));
     this.knownCountries.add("la;Laos".split(";"));
@@ -226,6 +229,7 @@ public class Countries {
     this.knownCountries.add("sc;Seychelles".split(";"));
     this.knownCountries.add("sl;Sierra Leone".split(";"));
     this.knownCountries.add("sg;Singapore".split(";"));
+    this.knownCountries.add("sx;Sint Maarten".split(";"));
     this.knownCountries.add("sk;Slovakia".split(";"));
     this.knownCountries.add("si;Slovenia".split(";"));
     this.knownCountries.add("sb;Solomon Islands".split(";"));



More information about the tor-commits mailing list