Skip to content

Instantly share code, notes, and snippets.

@epmoyer
Forked from dnprock/index.html
Last active November 22, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epmoyer/be227654fcf0025ea82e to your computer and use it in GitHub Desktop.
Save epmoyer/be227654fcf0025ea82e to your computer and use it in GitHub Desktop.
The Migrant Files: Deportations
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
#canvas {
}
#canvas-svg {
}
.land {
fill: #222;
}
.boundary {
fill: none;
stroke: #fff;
stroke-width: 1px;
}
#tooltip-container {
position: absolute;
background-color: #fff;
color: #000;
padding: 10px;
border: 1px solid;
display: none;
}
.tooltip_key {
font-weight: bold;
}
.tooltip_value {
margin-left: 20px;
float: right;
}
</style>
<div id="tooltip-container"></div>
<div id="canvas-svg"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.1.0/topojson.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
var valueHash = {};
//-------------------------
// Deportation Data
//-------------------------
var deportationData = {};
function toNumber(s) {
// convert strings with spaces instead of commas into numbers
var n = s.replace(/[w]/g, "") //remove any whitespace
.replace(/ /g, "") //utf8 space?
return +n; //convert to number
}
function process(d) {
var countryFullName = "";
countryCodeEntry = $.grep(countryCodeData, function(x){ return x.alpha2 == d.Country; });
if(countryCodeEntry.length >= 1){
countryFullName = countryCodeEntry[0].name;
}
else{
console.log("Country not found: " + d.Country);
}
var processed = {
country: d.Country,
countryFull: countryFullName,
year: +d.Year,
cost: toNumber(d["Estimate of costs in 2014 EUR"]),
forcedReturns: toNumber(d["Forced returns (1)"]),
//the low estimate seems to be the only populated estimate
deported: toNumber(d["Persons deported or who left following an order to leave (low estimate)"].replace(/\s/g, ''))
}
return processed;
}
var countryCodeData = {};
function processCountryCodeItem(d) {
var processed = {
name: d.name,
alpha2: d.alpha2
}
return processed;
}
d3.csv("slim-2.csv", function(err, ccData) {
//console.log("raw countrycode data:" + countyCodeData);
countryCodeData = ccData.map(processCountryCodeItem);
//console.log("cc data", countryCodeData);
d3.csv("http://enjalot.github.io/migrants/deportations-year-country.csv", function(err, rawdata) {
var deportationData = rawdata.map(process);
//console.log("data", deportationData);
for(var i=0; i<deportationData.length; i++){
var deportationEntry = deportationData[i];
if (true){
//if (deportationEntry.year == 2013){
var countryName = deportationEntry.countryFull
if(deportationEntry.deported){
if (!valueHash[countryName]){
valueHash[countryName] = 0;
}
valueHash[countryName] += deportationEntry.deported;
//console.log("found: " + deportationEntry.countryFull + deportationEntry.deported);
}
}
}
//console.log(valueHash);
//-------------------------
// Map
//-------------------------
d3.csv("population.csv", function(err, data) {
var config = {"data0":"Country (or dependent territory)","data1":"Population","label0":"label 0","label1":"label 1","color0":"#ff99cc","color1":"#A10050" ,"width":800,"height":400}
var width = 960,
height = 960;
var COLOR_COUNTS = 9;
function Interpolate(start, end, steps, count) {
var s = start,
e = end,
final = s + (((e - s) / steps) * count);
return Math.floor(final);
}
function Color(_r, _g, _b) {
var r, g, b;
var setColors = function(_r, _g, _b) {
r = _r;
g = _g;
b = _b;
};
setColors(_r, _g, _b);
this.getColors = function() {
var colors = {
r: r,
g: g,
b: b
};
return colors;
};
}
function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
function valueFormat(d) {
if (d > 1000000000) {
return Math.round(d / 1000000000 * 10) / 10 + "B";
} else if (d > 1000000) {
return Math.round(d / 1000000 * 10) / 10 + "M";
} else if (d > 1000) {
return Math.round(d / 1000 * 10) / 10 + "K";
} else {
return d;
}
}
var COLOR_FIRST = config.color0, COLOR_LAST = config.color1;
var rgb = hexToRgb(COLOR_FIRST);
var COLOR_START = new Color(rgb.r, rgb.g, rgb.b);
rgb = hexToRgb(COLOR_LAST);
var COLOR_END = new Color(rgb.r, rgb.g, rgb.b);
var startColors = COLOR_START.getColors(),
endColors = COLOR_END.getColors();
var colors = [];
for (var i = 0; i < COLOR_COUNTS; i++) {
var r = Interpolate(startColors.r, endColors.r, COLOR_COUNTS, i);
var g = Interpolate(startColors.g, endColors.g, COLOR_COUNTS, i);
var b = Interpolate(startColors.b, endColors.b, COLOR_COUNTS, i);
colors.push(new Color(r, g, b));
}
var MAP_KEY = config.data0;
var MAP_VALUE = config.data1;
var projection = d3.geo.mercator()
.scale((width + 1) / 2 / Math.PI)
.translate([width / 2, height / 2])
.precision(.1);
var path = d3.geo.path()
.projection(projection);
var graticule = d3.geo.graticule();
var svg = d3.select("#canvas-svg").append("svg")
.attr("width", width)
.attr("height", height);
svg.append("path")
.datum(graticule)
.attr("class", "graticule")
.attr("d", path);
function log10(val) {
return Math.log(val);
}
// data.forEach(function(d) {
// valueHash[d[MAP_KEY]] = +d[MAP_VALUE];
// //console.log('key:' + d[MAP_KEY]);
// });
var quantize = d3.scale.quantize()
.domain([0, 1.0])
.range(d3.range(COLOR_COUNTS).map(function(i) { return i }));
quantize.domain([d3.min(data, function(d){
return (+d[MAP_VALUE]) }),
d3.max(data, function(d){
return (+d[MAP_VALUE]) })]);
d3.json("https://s3-us-west-2.amazonaws.com/vida-public/geo/world-topo-min.json", function(error, world) {
var countries = topojson.feature(world, world.objects.countries).features;
svg.append("path")
.datum(graticule)
.attr("class", "choropleth")
.attr("d", path);
var g = svg.append("g");
g.append("path")
.datum({type: "LineString", coordinates: [[-180, 0], [-90, 0], [0, 0], [90, 0], [180, 0]]})
.attr("class", "equator")
.attr("d", path);
var country = g.selectAll(".country").data(countries);
country.enter().insert("path")
.attr("class", "country")
.attr("d", path)
.attr("id", function(d,i) { return d.id; })
.attr("title", function(d) { return d.properties.name; })
.style("fill", function(d) {
if (valueHash[d.properties.name]) {
var c = quantize((valueHash[d.properties.name]));
var color = colors[c].getColors();
return "rgb(" + color.r + "," + color.g +
"," + color.b + ")";
} else {
return "#ccc";
}
})
.on("mousemove", function(d) {
var html = "";
html += "<div class=\"tooltip_kv\">";
html += "<span class=\"tooltip_key\">";
html += d.properties.name;
html += "</span>";
html += "<span class=\"tooltip_value\">";
html += (valueHash[d.properties.name] ? valueFormat(valueHash[d.properties.name]) : "");
html += "";
html += "</span>";
html += "</div>";
$("#tooltip-container").html(html);
$(this).attr("fill-opacity", "0.8");
$("#tooltip-container").show();
var coordinates = d3.mouse(this);
var map_width = $('.choropleth')[0].getBoundingClientRect().width;
if (d3.event.pageX < map_width / 2) {
d3.select("#tooltip-container")
.style("top", (d3.event.layerY + 15) + "px")
.style("left", (d3.event.layerX + 15) + "px");
} else {
var tooltip_width = $("#tooltip-container").width();
d3.select("#tooltip-container")
.style("top", (d3.event.layerY + 15) + "px")
.style("left", (d3.event.layerX - tooltip_width - 30) + "px");
}
})
.on("mouseout", function() {
$(this).attr("fill-opacity", "1.0");
$("#tooltip-container").hide();
});
g.append("path")
.datum(topojson.mesh(world, world.objects.countries, function(a, b) { return a !== b; }))
.attr("class", "boundary")
.attr("d", path);
});
d3.select(self.frameElement).style("height", height + "px");
});
});
});
</script>
Rank Country (or dependent territory) Population Date % of world population Source
1 China 1367470000 10/24/2014 19% Official population clock
2 India 1261420000 10/24/2014 17.50% Population clock
3 United States 318964000 10/24/2014 4.43% Official population clock
4 Indonesia 252164800 7/1/2014 3.50% Official estimate
5 Brazil 203337000 10/24/2014 2.83% Official population clock
6 Pakistan 188020000 7/1/2014 2.61% Official annual projection
7 Nigeria 178517000 7/1/2014 2.48% UN projection[6]
8 Bangladesh 157193000 10/24/2014 2.18% Official population clock
9 Russian Federation 146149200 8/1/2014 2.03% Official estimate
10 Japan 127090000 10/1/2014 1.77% Monthly official estimate
11 Mexico 119713203 7/1/2014 1.66% Official projection
12 Philippines 100440100 10/24/2014 1.40% Official population clock
13 Viet Nam 89708900 7/1/2013 1.25% Official estimate
14 Ethiopia 87952991 7/1/2014 1.22% Official projection
15 Egypt 87371100 10/24/2014 1.21% Official population clock
16 Germany 80767000 12/31/2013 1.12% Official estimate
17 Iran 77838800 10/24/2014 1.08% Official population clock
18 Turkey 76667864 12/31/2013 1.07% Annual official estimate
19 Democratic Republic of Congo 69360000 7/1/2014 0.96% UN projection
20 France 66048000 10/1/2014 0.92% Monthly official estimate
21 Thailand 64871000 7/1/2014 0.90% Official estimate
22 United Kingdom 64105654 7/1/2013 0.89% Annual official estimate
23 Italy 60780377 4/30/2014 0.84% Monthly official estimate
24 South Africa 54002000 7/1/2014 0.75% Official estimate
25 Myanmar 51419420 3/29/2014 0.71% Preliminary 2014 census result
26 South Korea 50423955 7/1/2014 0.70% Official projection
27 Colombia 47832200 10/24/2014 0.67% Official population clock
28 Tanzania 47421786 7/1/2014 0.66% Official Projection
29 Spain 46507800 1/1/2014 0.63% Annual official estimate
30 Ukraine 42981850 8/1/2014 0.60% Monthly official estimate
31 Argentina 42669500 7/1/2014 0.59% Official annual projection
32 Kenya 41800000 7/1/2013 0.58% Annual official estimate
33 Algeria 38700000 1/1/2014 0.54% Official estimate
34 Poland 38496000 12/31/2013 0.53% Official estimate
35 Sudan 37289406 7/1/2014 0.52% Official annual projection
36 Uganda 36600000 7/1/2014 0.51% Annual official estimate
37 Iraq 36004552 7/1/2014 0.50% Official annual projection
38 Canada 35540419 7/1/2014 0.49% Official estimate
39 Morocco 33414900 10/24/2014 0.46% Official population clock
40 Peru 30814175 7/1/2014 0.43% Official annual projection
41 Saudi Arabia 30770375 7/1/2014 0.43% Official annual projection
42 Uzbekistan 30492800 1/1/2014 0.42% Official estimate
43 Malaysia 30378300 10/24/2014 0.42% Official population clock
44 Venezuela 30206307 6/30/2014 0.42% Official annual projection
45 Ghana 27043093 7/1/2014 0.38% Official annual projection
46 Nepal 26494504 6/22/2011 0.37% Final 2011 census result
47 Afghanistan 26023100 7/1/2013 0.36% Official estimate
48 Yemen 25956000 7/1/2014 0.36% Official estimate
49 Mozambique 25041922 7/1/2014 0.35% Annual official projection
50 North Korea 25027000 7/1/2014 0.35% UN projection
51 Angola 24383301 5/16/2014 0.34% Preliminary 2014 census result
52 Australia 23640800 10/24/2014 0.33% Official population clock
53 Taiwan 23410280 9/30/2014 0.33% Monthly official estimate
54 Côte d'Ivoire 23202000 7/1/2012 0.32% Official estimate
55 Syrian Arab Republic 21987000 7/1/2014 0.31% UN projection[13]
56 Madagascar 21263403 7/1/2012 0.30% Annual official estimate
57 Cameroon 20386799 7/1/2012 0.28% Official estimate
58 Sri Lanka 20277597 3/21/2012 0.28% Preliminary 2012 census result
59 Romania 19942642 1/1/2014 0.28% Annual official estimate
60 Chile 17819054 7/1/2014 0.25% Official annual projection
61 Kazakhstan 17330000 9/1/2014 0.24% Monthly official estimate
62 Burkina Faso 17322796 7/1/2013 0.24% Official estimate
63 Niger 17138707 12/10/2012 0.24% Preliminary 2012 census result
64 Netherlands 16873600 10/24/2014 0.23% Official population clock
65 Ecuador 15852800 10/24/2014 0.22% Official population clock
66 Guatemala 15806675 6/30/2014 0.22% Official estimate
67 Malawi 15805239 7/1/2014 0.22% Official annual projection
68 Mali 15768000 7/1/2014 0.22% UN projection
69 Cambodia 15184116 7/1/2014 0.21% Official annual projection
70 Zambia 15023315 7/1/2014 0.21% Official estimate
71 Senegal 13508715 11/19/2013 0.19% 2013 census result
72 Chad 13211000 7/1/2014 0.18% UN projection
73 Zimbabwe 13061239 8/17/2012 0.18% 2012 Census Result
74 South Sudan 11384393 7/1/2014 0.16% Official annual projection
75 Belgium 11215442 9/1/2014 0.16% Monthly official estimate
76 Cuba 11210064 12/31/2013 0.16% Annual official estimate
77 Rwanda 10996891 7/1/2014 0.15% Official annual projection
78 Greece 10992589 1/1/2014 0.15% Official estimate
79 Tunisia 10982754 4/23/2014 0.15% Preliminary 2014 census result
80 Somalia 10806000 7/1/2014 0.15% UN projection
81 Haiti 10745665 2014 0.15% Official projection
82 Guinea 10628972 4/2/2014 0.15% Preliminary 2014 census result
83 Czech Republic 10521600 6/30/2014 0.15% Official quarterly estimate
84 Portugal 10477800 12/31/2013 0.15% Annual official estimate
85 Dominican Republic 10378267 2014 0.14% Official estimate
86 Bolivia, Plurinational State of 10027254 11/21/2012 0.14% 2012 census result
87 Benin 9988068 7/1/2014 0.14% Official annual projection
88 Hungary 9879000 1/1/2014 0.14% Annual official estimate
89 Sweden 9716962 8/31/2014 0.14% Monthly official estimate
90 Azerbaijan 9540400 8/1/2014 0.13% Official estimate
91 Burundi 9530434 7/1/2014 0.13% Official annual projection
92 Belarus 9469200 7/1/2014 0.13% Quarterly official estimate
93 United Arab Emirates 9446000 7/1/2014 0.13% UN projection
94 Honduras 8725111 7/1/2014 0.12% Annual official estimate
95 Austria 8527230 4/1/2014 0.12% Official quarterly estimate
96 Israel 8238300 8/31/2014 0.11% Official Monthly Estimate
97 Switzerland 8183800 6/30/2014 0.11% Quarterly provisional figure
98 Tajikistan 8161000 1/1/2014 0.11% Official estimate
99 Papua New Guinea 7398500 7/1/2013 0.10% Annual official estimate
100 Bulgaria 7245677 12/31/2013 0.10% Official estimate
101 * Hong Kong* (China) 7234800 7/1/2014 0.10% Official estimate
102 Serbia 7146759 1/1/2014 0.10% Annual official estimate
103 Togo 6993000 7/1/2014 0.10% UN projection
104 Paraguay 6893727 2014 0.10% Official estimate
105 Lao People's Democratic Republic 6693300 7/1/2014 0.09% Annual official projection
106 Jordan 6646840 10/24/2014 0.09% Official population clock
107 Eritrea 6536000 7/1/2014 0.09% UN projection
108 El Salvador 6401240 2014 0.09% Official estimate
109 Libya 6253000 7/1/2014 0.09% UN projection
110 Sierra Leone 6205000 7/1/2014 0.09% UN projection
111 Nicaragua 6146400 2013 0.09% Official estimate
112 Turkmenistan 5824960 10/24/2014 0.08% Official population clock
113 Kyrgyzstan 5776570 2014 0.08% Official estimate
114 Denmark 5639719 7/1/2014 0.08% Quarterly official estimate
115 Singapore 5469700 7/1/2014 0.08% Official estimate
116 Finland 5468609 9/30/2014 0.08% Monthly official estimate
117 Slovakia 5415949 12/31/2013 0.08% Official estimate
118 Norway 5137679 7/1/2014 0.07% Quarterly official estimate
119 Central African Republic 4709000 7/1/2014 0.07% UN projection
120 Costa Rica 4667096 7/1/2013 0.07% Official estimate
121 Ireland 4609600 4/1/2014 0.06% Annual official estimate
122 Congo 4559000 7/1/2014 0.06% UN projection
123 * Palestine* 4550368 7/1/2014 0.06% Official estimate
124 New Zealand 4536140 10/24/2014 0.06% Official population clock
125 Georgia 4490500 1/1/2014 0.06% Annual official estimate
126 Liberia 4397000 7/1/2014 0.06% UN projection
127 Croatia 4267558 7/1/2012 0.06% Annual official estimate
128 Lebanon 4104000 7/1/2012 0.06% Official estimate
129 Oman 4071147 10/22/2014 0.06% Weekly official estimate
130 Bosnia and Herzegovina 3791622 10/15/2013 0.05% Preliminary 2013 census result
131 Panama 3713312 2014 0.05% Official estimate
132 * Puerto Rico* (USA) 3615086 7/1/2013 0.05% Official estimate
133 Moldova, Republic of 3557600 1/1/2014 0.05% Official estimate
134 Mauritania 3545620 7/1/2014 0.05% Annual official estimate
135 Uruguay 3404189 6/30/2014 0.05% Annual official estimate
136 Kuwait 3065850 7/1/2011 0.04% Official estimate
137 Armenia 3009800 6/30/2014 0.04% Monthly official estimate
138 Mongolia 2978997 10/24/2014 0.04% Official population clock
139 Lithuania 2927310 10/1/2014 0.04% Monthly official estimate
140 Albania 2895947 1/1/2014 0.04% Annual official estimate
141 Jamaica 2717991 12/31/2013 0.04% Annual official estimate
142 Qatar 2187326 9/30/2014 0.03% Monthly official estimate
143 Namibia 2113077 8/28/2011 0.03% Final 2011 census result
144 Lesotho 2098000 7/1/2014 0.03% UN projection
145 Macedonia, the former Yugoslav Republic of 2065769 12/31/2013 0.03% Official estimate
146 Slovenia 2064394 10/24/2014 0.03% Official population clock
147 Botswana 2024904 8/22/2011 0.03% Final 2011 census result
148 Latvia 1991800 10/1/2014 0.03% Monthly official estimate
149 Gambia 1882450 4/15/2013 0.03% Preliminary 2013 census result
150 Kosovo 1816891 2014 0.03% Official annual projection
151 Guinea-Bissau 1746000 7/1/2014 0.02% UN projection
152 Gabon 1711000 7/1/2014 0.02% UN projection
153 Equatorial Guinea 1430000 7/1/2013 0.02% Annual official estimate
154 Trinidad and Tobago 1328019 1/9/2011 0.02% 2011 census result
155 Bahrain 1316500 7/1/2014 0.02% Official annual projection
156 Estonia 1315819 1/1/2014 0.02% Official estimate
157 Mauritius 1261208 7/1/2014 0.02% Official estimate
158 Timor-Leste 1212107 7/1/2014 0.02% Official estimate
159 Swaziland 1106189 7/1/2014 0.02% Official projection
160 Djibouti 886000 7/1/2014 0.01% UN projection
161 Fiji 859178 7/1/2013 0.01% Annual official estimate
162 Cyprus 858000 1/1/2014 0.01% Official estimate
163 * Réunion* (France) 840974 1/1/2013 0.01% Official annual estimate
164 Guyana 784894 7/1/2010 0.01% Annual official estimate
165 Comoros 763952 7/1/2014 0.01% Official estimate
166 Bhutan 753160 10/24/2014 0.01% Official population clock
167 Montenegro 620029 4/1/2011 0.01% Final 2011 census result
168 * Macau* (China) 614500 3/31/2014 0.01% Official quaterly estimate
169 Western Sahara 586000 7/1/2014 0.01% UN projection
170 Solomon Islands 581344 7/1/2013 0.01% Annual official estimate
171 Luxembourg 549700 12/31/2013 0.01% Annual official estimate
172 Suriname 534189 8/13/2012 0.01% Preliminary 2012 census result
173 Cape Verde 518467 7/1/2014 0.01% Official annual projection
Transnistria 505153 1/1/2014 0.01% Official estimate
174 Malta 416055 11/20/2011 0.01% Preliminary 2011 census result
175 * Guadeloupe* (France) 405739 1/1/2013 0.01% Official annual estimate
176 Brunei 393372 6/20/2011 0.01% Preliminary 2011 census result
177 * Martinique* (France) 386486 1/1/2013 0.01% Official annual estimate
178 Bahamas 368390 7/1/2013 0.01% Annual official estimate
179 Belize 349728 7/1/2013 0.00% Official estimate
180 Maldives 341848 7/1/2014 0.00% Official estimate
181 Iceland 328170 10/1/2014 0.00% Official quaterly estimate
Northern Cyprus 294906 4/30/2006 0.00% Official census
182 Barbados 285000 7/1/2013 0.00% Official estimate
183 * French Polynesia* (France) 268270 8/22/2012 0.00% Preliminary 2012 census result
184 Vanuatu 264652 7/1/2013 0.00% Annual official estimate
185 * New Caledonia* (France) 258958 7/1/2013 0.00% Annual official estimate
Abkhazia 240705 2011 0.00% Official census
186 Franch Guyana 237549 1/1/2011 0.00% Official annual estimate
187 * Mayotte* (France) 212645 8/21/2012 0.00% 2012 census result
188 Samoa 187820 11/7/2011 0.00% Final 2011 census result
189 São Tomé and Príncipe 187356 5/13/2012 0.00% 2012 census result
190 Saint Lucia 184000 7/1/2014 0.00% UN projection
191 * Guam* (USA) 159358 4/1/2010 0.00% Final 2010 census result
192 * Curaçao* (Netherlands) 150563 3/26/2011 0.00% 2011 census result
193 Saint Vincent and the Grenadines 109000 7/1/2014 0.00% UN projection
194 Kiribati 106461 7/1/2013 0.00% Annual official estimate
195 * United States Virgin Islands* (USA) 106405 4/1/2010 0.00% Final 2010 census result
196 Grenada 103328 5/12/2011 0.00% 2011 census result
197 Tonga 103252 11/30/2011 0.00% 2011 census result
198 * Aruba* (Netherlands) 101484 9/29/2010 0.00% 2010 census result
199 Federated States of Micronesia 101351 7/1/2013 0.00% Annual official estimate
200 * Jersey* (UK) 99000 12/31/2012 0.00% Annual official estimate
201 Seychelles 89949 7/1/2013 0.00% Annual official estimate
202 Antigua and Barbuda 86295 5/27/2011 0.00% Preliminary 2011 census result
203 * Isle of Man* (UK) 84497 3/27/2011 0.00% 2011 census result
204 Andorra 76098 7/1/2013 0.00% Annual official estimate
205 Dominica 71293 5/14/2011 0.00% Preliminary 2011 census result
206 * Bermuda* (UK) 64237 5/20/2010 0.00% Final 2010 census result
207 * Guernsey* (UK) 63085 3/31/2012 0.00% Annual official estimate
208 Greenland 56295 7/1/2014 0.00% Annual official estimate
209 Marshall Islands 56086 7/1/2013 0.00% Annual official estimate
210 * American Samoa* (USA) 55519 4/1/2010 0.00% Final 2010 census result
211 * Cayman Islands* (UK) 55456 10/10/2010 0.00% Final 2010 census result
212 Saint Kitts and Nevis 55000 7/1/2014 0.00% UN projection
213 * Northern Mariana Islands* (USA) 53883 4/1/2010 0.00% Final 2010 census result
South Ossetia 51547 1/1/2013 0.00% Estimate
214 * Faroe Islands* (Denmark) 48723 8/1/2014 0.00% Monthly official estimate
215 * Sint Maarten* (Netherlands) 37429 1/1/2010 0.00% Official estimate
216 Liechtenstein 37132 12/31/2013 0.00% Semi annual official estimate
217 * Saint Martin* (France) 36979 1/1/2010 0.00% Official estimate
218 Monaco 36950 12/31/2013 0.00% Annual official estimate
219 San Marino 32727 8/31/2014 0.00% Monthly official estimate
220 * Turks and Caicos Islands* (UK) 31458 1/25/2012 0.00% 2012 census result
221 * Gibraltar* (UK) 30001 12/31/2012 0.00% Annual official estimate
222 * British Virgin Islands* (UK) 29537 7/1/2010 0.00% Annual official estimate
223 * Åland Islands* (Finland) 28875 9/30/2014 0.00% Official estimate
224 * Caribbean Netherlands* (Netherlands) 23296 1/1/2013 0.00% Official estimate
225 Palau 20901 7/1/2013 0.00% Annual official estimate
226 * Cook Islands* (NZ) 14974 12/1/2011 0.00% Final 2011 census result
227 * Anguilla* (UK) 13452 5/11/2011 0.00% Preliminary 2011 census result
228 * Wallis and Futuna* (France) 13135 7/1/2013 0.00% Annual official estimate
229 Tuvalu 11323 7/1/2013 0.00% Annual official estimate
230 Nauru 10084 10/30/2011 0.00% 2011 census result
231 * Saint Barthélemy* (France) 8938 1/1/2010 0.00% Official estimate
232 * Saint Pierre and Miquelon* (France) 6081 1/1/2010 0.00% Official estimate
233 * Montserrat* (UK) 4922 5/12/2011 0.00% 2011 census result
234 * Saint Helena, Ascension and Tristan da Cunha* (UK) 4000 7/1/2014 0.00% UN projection
235 * Falkland Islands* (UK) 3000 7/1/2014 0.00% UN projection
236 * Svalbard and Jan Mayen* (Norway) 2655 9/1/2012 0.00% Official estimate
237 * Norfolk Island* (Australia) 2302 8/9/2011 0.00% 2011 census result
238 * Christmas Island* (Australia) 2072 8/9/2011 0.00% 2011 census result
239 * Niue* (NZ) 1613 9/10/2011 0.00% Final 2011 census result
240 * Tokelau* (NZ) 1411 10/18/2011 0.00% Final 2011 census result
241 Vatican City 839 7/1/2012 0.00% Official estimate
242 * Cocos (Keeling) Islands* (Australia) 550 8/9/2011 0.00% 2011 census result
243 * Pitcairn Islands* (UK) 56 2013 0.00% Official estimate
name alpha2 countryCode
Afghanistan AF 004
Åland Islands AX 248
Albania AL 008
Algeria DZ 012
American Samoa AS 016
Andorra AD 020
Angola AO 024
Anguilla AI 660
Antarctica AQ 010
Antigua and Barbuda AG 028
Argentina AR 032
Armenia AM 051
Aruba AW 533
Australia AU 036
Austria AT 040
Azerbaijan AZ 031
Bahamas BS 044
Bahrain BH 048
Bangladesh BD 050
Barbados BB 052
Belarus BY 112
Belgium BE 056
Belize BZ 084
Benin BJ 204
Bermuda BM 060
Bhutan BT 064
Bolivia (Plurinational State of) BO 068
Bonaire, Sint Eustatius and Saba BQ 535
Bosnia and Herzegovina BA 070
Botswana BW 072
Bouvet Island BV 074
Brazil BR 076
British Indian Ocean Territory IO 086
Brunei Darussalam BN 096
Bulgaria BG 100
Burkina Faso BF 854
Burundi BI 108
Cambodia KH 116
Cameroon CM 120
Canada CA 124
Cabo Verde CV 132
Cayman Islands KY 136
Central African Republic CF 140
Chad TD 148
Chile CL 152
China CN 156
Christmas Island CX 162
Cocos (Keeling) Islands CC 166
Colombia CO 170
Comoros KM 174
Congo CG 178
Congo (Democratic Republic of the) CD 180
Cook Islands CK 184
Costa Rica CR 188
Côte d'Ivoire CI 384
Croatia HR 191
Cuba CU 192
Curaçao CW 531
Cyprus CY 196
Czech Republic CZ 203
Denmark DK 208
Djibouti DJ 262
Dominica DM 212
Dominican Republic DO 214
Ecuador EC 218
Egypt EG 818
El Salvador SV 222
Equatorial Guinea GQ 226
Eritrea ER 232
Estonia EE 233
Ethiopia ET 231
Falkland Islands (Malvinas) FK 238
Faroe Islands FO 234
Fiji FJ 242
Finland FI 246
France FR 250
French Guiana GF 254
French Polynesia PF 258
French Southern Territories TF 260
Gabon GA 266
Gambia GM 270
Georgia GE 268
Germany DE 276
Ghana GH 288
Gibraltar GI 292
Greece GR 300
Greenland GL 304
Grenada GD 308
Guadeloupe GP 312
Guam GU 316
Guatemala GT 320
Guernsey GG 831
Guinea GN 324
Guinea-Bissau GW 624
Guyana GY 328
Haiti HT 332
Heard Island and McDonald Islands HM 334
Holy See VA 336
Honduras HN 340
Hong Kong HK 344
Hungary HU 348
Iceland IS 352
India IN 356
Indonesia ID 360
Iran (Islamic Republic of) IR 364
Iraq IQ 368
Ireland IE 372
Isle of Man IM 833
Israel IL 376
Italy IT 380
Jamaica JM 388
Japan JP 392
Jersey JE 832
Jordan JO 400
Kazakhstan KZ 398
Kenya KE 404
Kiribati KI 296
Korea (Democratic People's Republic of) KP 408
Korea (Republic of) KR 410
Kuwait KW 414
Kyrgyzstan KG 417
Lao People's Democratic Republic LA 418
Latvia LV 428
Lebanon LB 422
Lesotho LS 426
Liberia LR 430
Libya LY 434
Liechtenstein LI 438
Lithuania LT 440
Luxembourg LU 442
Macao MO 446
Macedonia (the former Yugoslav Republic of) MK 807
Madagascar MG 450
Malawi MW 454
Malaysia MY 458
Maldives MV 462
Mali ML 466
Malta MT 470
Marshall Islands MH 584
Martinique MQ 474
Mauritania MR 478
Mauritius MU 480
Mayotte YT 175
Mexico MX 484
Micronesia (Federated States of) FM 583
Moldova (Republic of) MD 498
Monaco MC 492
Mongolia MN 496
Montenegro ME 499
Montserrat MS 500
Morocco MA 504
Mozambique MZ 508
Myanmar MM 104
Namibia NA 516
Nauru NR 520
Nepal NP 524
Netherlands NL 528
New Caledonia NC 540
New Zealand NZ 554
Nicaragua NI 558
Niger NE 562
Nigeria NG 566
Niue NU 570
Norfolk Island NF 574
Northern Mariana Islands MP 580
Norway NO 578
Oman OM 512
Pakistan PK 586
Palau PW 585
Palestine, State of PS 275
Panama PA 591
Papua New Guinea PG 598
Paraguay PY 600
Peru PE 604
Philippines PH 608
Pitcairn PN 612
Poland PL 616
Portugal PT 620
Puerto Rico PR 630
Qatar QA 634
Réunion RE 638
Romania RO 642
Russian Federation RU 643
Rwanda RW 646
Saint Barthélemy BL 652
Saint Helena, Ascension and Tristan da Cunha SH 654
Saint Kitts and Nevis KN 659
Saint Lucia LC 662
Saint Martin (French part) MF 663
Saint Pierre and Miquelon PM 666
Saint Vincent and the Grenadines VC 670
Samoa WS 882
San Marino SM 674
Sao Tome and Principe ST 678
Saudi Arabia SA 682
Senegal SN 686
Serbia RS 688
Seychelles SC 690
Sierra Leone SL 694
Singapore SG 702
Sint Maarten (Dutch part) SX 534
Slovakia SK 703
Slovenia SI 705
Solomon Islands SB 090
Somalia SO 706
South Africa ZA 710
South Georgia and the South Sandwich Islands GS 239
South Sudan SS 728
Spain ES 724
Sri Lanka LK 144
Sudan SD 729
Suriname SR 740
Svalbard and Jan Mayen SJ 744
Swaziland SZ 748
Sweden SE 752
Switzerland CH 756
Syrian Arab Republic SY 760
Taiwan, Province of China TW 158
Tajikistan TJ 762
Tanzania, United Republic of TZ 834
Thailand TH 764
Timor-Leste TL 626
Togo TG 768
Tokelau TK 772
Tonga TO 776
Trinidad and Tobago TT 780
Tunisia TN 788
Turkey TR 792
Turkmenistan TM 795
Turks and Caicos Islands TC 796
Tuvalu TV 798
Uganda UG 800
Ukraine UA 804
United Arab Emirates AE 784
United Kingdom of Great Britain and Northern Ireland GB 826
United States of America US 840
United States Minor Outlying Islands UM 581
Uruguay UY 858
Uzbekistan UZ 860
Vanuatu VU 548
Venezuela (Bolivarian Republic of) VE 862
Viet Nam VN 704
Virgin Islands (British) VG 092
Virgin Islands (U.S.) VI 850
Wallis and Futuna WF 876
Western Sahara EH 732
Yemen YE 887
Zambia ZM 894
Zimbabwe ZW 716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment