Skip to content

Instantly share code, notes, and snippets.

@yan2014
Last active November 11, 2015 00:37
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 yan2014/e15c1329be30aec416fe to your computer and use it in GitHub Desktop.
Save yan2014/e15c1329be30aec416fe to your computer and use it in GitHub Desktop.
Week 11: Choropleth Map
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<!-- This map code and design were inspired by the tutorial in Flowing Data: http://flowingdata.com/2015/02/19/make-an-interactive-map-with-category-filters/ -->
<head>
<title>Stunted Growth By Income Level</title>
<link rel="stylesheet" href="world_comparisons.css" type="text/css" media="screen" />
</head>
<div id="main-wrapper">
<h2>Average Mortality Rate from 1990-2015</h2>
<p>Source: <a href="http://data.unicef.org/nutrition/malnutrition.html">UNICEF</a>.
<div class="clr"></div>
<div id="tooltip" class="tooltip">
<h3 class="name"></h3>
<hr>
<div data-metric="urban" class="line">
<div class="urban symbol"></div>Mortality Rate
<div class="urban val"></div>
</div>
</div>
<div id="vis"></div>
</div><!-- @end #main-wrapper -->
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/queue.v1.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script>
var width = 1000,
height = 700,
center = [width / 2, height / 2],
defaultFill = "#e0e0e0";
var color = d3.scale.linear().range(["#ffffff", "#80b1d3"]).interpolate(d3.interpolateLab);
var countryById = d3.map();
var projection = d3.geo.mercator()
.scale(200)
.translate([width / 2, height / 2]);
var path = d3.geo.path()
.projection(projection);
var zoom = d3.behavior.zoom()
.scaleExtent([1, 8])
.on("zoom", move);
var svg = d3.select("#vis").append("svg")
.attr("width", width)
.attr("height", height)
.append("g")
.call(zoom);
svg.on("wheel.zoom", null);
svg.on("mousewheel.zoom", null);
var countryById = d3.map();
var g = svg.append("g");
var tooltip = d3.select("#tooltip")
.attr("class", "tooltip")
.style("opacity", 0);
var CURR_SELECT = "urban";
function typeAndSet(d) {
d.sum=+d.sum;
countryById.set(d.ISO, d);
return d;
}
queue()
.defer(d3.json, "countries.json")
.defer(d3.csv, "NeonatalRate.csv", typeAndSet)
.await(ready);
function ready(error, world, stunting) {
console.log(error, world, stunting);
color.domain(d3.extent(stunting, function(d) {return d.sum;}));
g.append("g")
.attr("class", "countries")
.selectAll("path")
.data(topojson.feature(world, world.objects.units).features)
.enter().append("path")
.attr("d", path)
.on("mouseover", mouseover)
.on("mouseout", function() {
d3.select(this).classed("selected", false);
tooltip.transition().duration(300)
.style("opacity", 0);
})
.attr("fill",function(d) {
return color(getColor(d));
});
make_buttons(); // create the zoom buttons
} // end function ready
function make_buttons() {
// Zoom buttons actually manually constructed, not images
svg.selectAll(".scalebutton")
.data(['zoom_in', 'zoom_out'])
.enter()
.append("g")
.attr("id", function(d){return d;}) // id is the zoom_in and zoom_out
.attr("class", "scalebutton")
.attr({x: 20, width: 20, height: 20})
.append("rect")
.attr("y", function(d,i) { return 20 + 25*i })
.attr({x: 20, width: 20, height: 20})
// Plus button
svg.select("#zoom_in")
.append("line")
.attr({x1: 25, y1: 30, x2: 35, y2: 30 })
.attr("stroke", "#fff")
.attr("stroke-width", "2px");
svg.select("#zoom_in")
.append("line")
.attr({x1: 30, y1: 25, x2: 30, y2: 35 })
.attr("stroke", "#fff")
.attr("stroke-width", "2px");
// Minus button
svg.select("#zoom_out")
.append("line")
.attr({x1: 25, y1: 55, x2: 35, y2: 55 })
.attr("stroke", "#fff")
.attr("stroke-width", "2px");
svg.selectAll(".scalebutton")
.on("click", function() {
d3.event.preventDefault();
var scale = zoom.scale(),
extent = zoom.scaleExtent(),
translate = zoom.translate(),
x = translate[0], y = translate[1],
factor = (this.id === 'zoom_in') ? 2 : 1/2,
target_scale = scale * factor;
var clamped_target_scale = Math.max(extent[0], Math.min(extent[1], target_scale));
if (clamped_target_scale != target_scale){
target_scale = clamped_target_scale;
factor = target_scale / scale;
}
// Center each vector, stretch, then put back
x = (x - center[0]) * factor + center[0];
y = (y - center[1]) * factor + center[1];
// Transition to the new view over 350ms
d3.transition().duration(350).tween("zoom", function () {
var interpolate_scale = d3.interpolate(scale, target_scale),
interpolate_trans = d3.interpolate(translate, [x,y]);
return function (t) {
zoom.scale(interpolate_scale(t))
.translate(interpolate_trans(t));
svg.call(zoom.event);
};
});
});
}
function mouseover(d){
d3.select(this).classed("selected", true);
tooltip.transition().duration(100)
.style("opacity", 1);
tooltip
.style("top", (d3.event.pageY - 10) + "px" )
.style("left", (d3.event.pageX + 10) + "px");
tooltip.selectAll(".symbol").style("opacity", "0");
tooltip.selectAll(".val").style("font-weight", "normal");
tooltip.selectAll(".val").style("color", "darkgray");
tooltip.select(".symbol." + CURR_SELECT).style("opacity", "1");
tooltip.select(".val." + CURR_SELECT).style({
"font-weight": "bolder",
"color": "black"
});
if (countryById.get(d.id)) {
tooltip.select(".name").text(countryById.get(d.id)['Country']);
tooltip.select(".urban.val").text(d3.round(countryById.get(d.id)['sum']/26)+"%");
} else {
tooltip.select(".name").text("No data for " + d.properties.name);
tooltip.select(".urban.val").text("NA");
}
} // end mouseover
function getColor(d) {
var dataRow = countryById.get(d.id);
if (dataRow) {
console.log(dataRow);
return dataRow.sum;
} else {
console.log("black");
return "black";
}
}
function zoomIn() {
zoom.scale(zoom.scale()*2);
move();
}
function move() {
var t = d3.event.translate,
s = d3.event.scale;
t[0] = Math.min(width * (s - 1), Math.max(width * (1 - s), t[0]));
t[1] = Math.min(height * (s - 1), Math.max(height * (1 - s), t[1]));
zoom.translate(t);
g.style("stroke-width", 1 / s).attr("transform", "translate(" + t + ")scale(" + s + ")");
}
</script>
ISO Country 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 sum
AFG Afghanistan 52.8 51.9 50.9 49.9 49.1 48.2 47.5 47 46.1 45.6 45.2 44.5 43.9 43.2 42.5 41.7 41 40.4 39.8 39.1 38.7 38.1 37.4 36.8 36.1 35.5 1132.9
ALB Albania 13.4 13.2 13 12.9 12.9 12.7 12.5 12.3 11.9 11.7 11.3 11 10.7 10.3 9.8 9.4 8.9 8.5 8.2 7.9 7.5 7.2 7 6.8 6.5 6.2 263.7
DZA Algeria 22.4 22.1 22 21.8 21.7 21.5 21.3 21.1 21 21 21 20.9 20.7 20.4 20 19.5 18.8 18.2 17.5 17 16.5 16.2 15.9 15.7 15.6 15.5 505.3
AND Andorra 4.3 4 3.7 3.4 3.2 3 2.8 2.6 2.4 2.3 2.2 2.1 2.1 2 2 1.9 1.9 1.8 1.8 1.7 1.7 1.6 1.6 1.5 1.5 1.4 60.5
AGO Angola 59.1 59.2 59.4 59.4 59.3 59.4 59.5 59.4 58.9 58.7 58.4 58.2 57.5 57.2 56.7 56.1 55.5 55 54.1 53.4 52.6 51.9 51.1 50.4 49.6 48.7 1458.7
ATG Antigua & Barbuda 14.7 14.1 13.5 12.9 12.3 11.7 11.2 10.7 10.3 9.9 9.4 9 8.6 8.2 7.9 7.5 7.2 6.9 6.6 6.3 6 5.8 5.5 5.3 5.1 4.9 231.5
ARG Argentina 15.4 15 14.7 14.4 14 13.3 12.6 12 11.5 11.3 11.3 11.1 10.6 10 9.5 9.2 8.8 8.5 8.1 7.8 7.5 7.2 7 6.8 6.5 6.3 270.4
ARM Armenia 23 22.5 21.9 21.2 20.5 19.8 19.1 18.3 17.5 16.7 15.9 15.1 14.4 13.7 13 12.4 11.8 11.1 10.6 10 9.5 9.1 8.6 8.2 7.7 7.4 379
AUS Australia 4.6 4.4 4.2 4 3.9 3.7 3.7 3.6 3.6 3.5 3.5 3.5 3.4 3.4 3.3 3.3 3.2 3.1 3 2.9 2.8 2.6 2.5 2.4 2.3 2.2 86.6
AUT Austria 4.6 4.4 4.2 4 3.7 3.5 3.4 3.2 3.2 3.1 3.1 3.1 3 3 2.9 2.8 2.8 2.7 2.6 2.6 2.5 2.4 2.4 2.3 2.2 2.1 79.8
AZE Azerbaijan 35.9 36.2 36.6 37 37.3 37.4 37.1 36.6 35.8 34.7 33.4 32.1 30.6 29.2 27.8 26.6 25.4 24.4 23.4 22.5 21.7 21 20.4 19.7 18.9 18.2 759.9
BHS Bahamas 14 13.3 12.6 12 11.4 10.7 10.2 9.6 9.2 8.9 8.7 8.6 8.6 8.6 8.7 8.7 8.6 8.5 8.4 8.2 8 7.8 7.5 7.3 7.1 6.9 242.1
BHR Bahrain 15.2 14.5 13.5 12.3 10.9 9.5 8.2 7 6.1 5.3 4.7 4.2 3.7 3.2 2.8 2.4 2.1 1.8 1.6 1.5 1.4 1.3 1.2 1.2 1.1 1.1 137.8
BGD Bangladesh 63.4 61 58.7 56.4 54 51.8 49.6 47.7 45.9 44.2 42.6 41 39.6 38.2 36.8 35.5 34.2 32.8 31.5 30.2 28.9 27.6 26.3 25.2 24.2 23.3 1050.6
BRB Barbados 11.6 11 10.4 9.9 9.5 9.2 8.9 8.7 8.6 8.6 8.7 8.8 9.2 9.5 9.8 10 9.9 9.8 9.5 9.3 9.1 8.9 8.7 8.4 8.2 8 242.2
BLR Belarus 9.3 9.2 9.3 9.5 9.6 9.7 9.8 9.5 9 8.3 7.4 6.6 5.9 5.3 4.7 4.2 3.7 3.2 2.8 2.5 2.3 2.2 2.1 2 1.9 1.9 151.9
BEL Belgium 4.6 4.4 4.2 4.1 3.9 3.8 3.6 3.5 3.3 3.1 3 2.9 2.8 2.8 2.7 2.6 2.6 2.5 2.4 2.4 2.3 2.3 2.3 2.2 2.2 2.2 78.7
BLZ Belize 18.9 18.2 17.4 16.6 15.8 15.1 14.5 13.9 13.4 13 12.6 12.2 11.8 11.5 11.2 11 10.7 10.4 10.1 9.9 9.6 9.4 9.1 8.9 8.6 8.3 322.1
BEN Benin 46.3 45.4 44.4 43.6 42.9 42.3 41.9 41.4 40.9 40.3 39.6 38.6 37.8 36.9 36.1 35.5 35 34.5 34.1 33.8 33.5 33.3 32.9 32.6 32.2 31.8 987.6
BTN Bhutan 44 42.9 42 40.8 39.7 38.5 37.4 36.2 35.1 33.9 32.7 31.8 30.7 29.8 28.8 27.7 26.6 25.5 24.4 23.3 22.2 21.3 20.4 19.7 19.1 18.3 792.8
BOL Bolivia 42 40.9 39.9 39 38.1 37 35.6 34 32.5 31 29.9 29 28.4 28 27.6 27.1 26.3 25.3 24.4 23.4 22.6 21.9 21.2 20.7 20.1 19.6 765.5
BIH Bosnia & Herzegovina 11.3 11.1 10.9 10.5 10 9.5 9 8.4 7.8 7.2 6.6 6.1 5.7 5.4 5.2 5.1 5.1 5.1 5.1 5.2 5.1 5 4.7 4.5 4.2 4 177.8
BWA Botswana 25.9 25.7 25.4 25.2 25 24.7 24.4 24.2 24 23.9 24 24.3 24.7 25.1 25.4 25.5 25.5 25.3 25 24.6 24.2 23.7 23.3 22.9 22.4 21.9 636.2
BRA Brazil 24.3 23.3 22.4 21.5 20.7 20 19.3 18.5 17.8 17 16 14.9 13.9 13 12.2 11.5 10.8 10.4 10.3 10.5 10.7 10.8 10.7 10.3 9.6 8.9 389.3
BRN Brunei 6.4 6.2 6 5.8 5.6 5.4 5.2 5.1 5 4.9 4.9 4.9 4.9 4.9 4.9 4.9 4.9 4.8 4.7 4.7 4.6 4.5 4.4 4.3 4.3 4.3 130.5
BGR Bulgaria 11.6 11.9 12.1 12.2 12.2 12.2 12.3 12.3 12.2 11.8 11.3 10.8 10.3 9.8 9.2 8.6 8.1 7.7 7.4 7.2 7.1 6.8 6.5 6.2 5.9 5.6 249.3
BFA Burkina Faso 46.3 45.8 45.4 45 44.6 44.3 44 43.8 43.5 43 42.4 41.7 40.8 39.6 38.3 36.7 35.2 33.9 32.7 31.6 30.4 29.4 28.6 27.9 27.2 26.7 988.8
BDI Burundi 42 42.1 42.1 42 41.9 41.7 41.3 40.9 40.5 39.9 39.4 38.9 38.3 37.7 36.9 36 35.2 34.2 33.3 32.3 31.7 31 30.4 29.8 29.3 28.6 957.4
KHM Cambodia 40.7 40.3 40 40 39.9 39.9 39.8 39.5 38.8 37.6 36.1 34.2 32 30.1 28.3 26.8 25.5 24.3 23.1 21.9 20.7 19.4 18.2 16.9 15.7 14.8 784.5
CMR Cameroon 40.7 40.5 40.4 40.2 40 39.7 39.3 38.6 37.5 36.1 34.7 33.5 32.5 31.7 31.1 30.7 30.2 29.6 29 28.5 28.1 27.5 26.9 26.5 26.1 25.7 865.3
CAN Canada 4.4 4.3 4.2 4.1 4.1 4.1 4 3.9 3.8 3.7 3.7 3.8 3.8 3.9 4 4 4 3.9 3.8 3.8 3.7 3.6 3.5 3.4 3.3 3.2 100
CPV Cape Verde 22.1 22.1 22 22 22 21.7 21.3 20.6 19.6 18.5 17.3 15.9 14.8 14.2 13.9 13.8 13.9 14 14.1 14.1 13.9 13.7 13.3 12.9 12.6 12.2 436.5
CAF Central African Republic 51.3 51 50.6 50.3 49.9 49.7 49.5 49.3 49.2 49.1 49 48.9 48.7 48.5 48.4 48.1 47.9 47.8 47.4 47 46.4 45.7 44.9 44.2 43.3 42.6 1248.7
TCD Chad 53.9 52.9 52 51.3 50.8 50.4 49.8 49.2 48.3 47.4 46.7 46.2 45.8 45.5 45.2 44.8 44.5 44.1 43.7 43.1 42.5 41.8 41.1 40.5 39.9 39.3 1200.7
CHL Chile 8.6 8 7.4 7.1 6.8 6.5 6.4 6.3 6.2 6 5.7 5.5 5.3 5.3 5.4 5.4 5.5 5.5 5.5 5.5 5.4 5.4 5.3 5.2 5.1 4.9 155.2
CHN China 29.7 29.7 29.4 28.8 28 26.9 25.7 24.4 23.3 22.2 21.2 20.1 18.6 17.1 15.5 14 12.6 11.3 10.1 9.1 8.2 7.5 6.9 6.3 5.9 5.5 458
COL Colombia 17.9 17.6 17.2 16.8 16.3 15.9 15.4 14.9 14.4 14 13.5 13.1 12.7 12.3 12 11.7 11.4 11 10.7 10.4 10 9.7 9.4 9.1 8.8 8.5 334.7
COM Comoros 50.1 48.3 46.7 45.6 44.7 44 43.6 43 42.6 42.2 41.8 41.8 41.6 41.3 40.9 40.7 40.2 39.7 38.9 38.2 37.6 36.9 36.2 35.5 34.7 34 1070.8
COG Congo 29.1 29.3 29.7 30.2 30.8 31.5 32.1 32.7 33.2 33.3 33.2 32.7 31.9 30.9 29.6 28.4 27.1 25.7 24.4 23.1 21.9 20.9 19.9 19.2 18.6 18 717.4
COD Congo DR 41.6 41.3 41 40.7 40.4 40.2 40 39.8 39.3 39 38.7 38.4 38 37.6 37.1 36.5 35.7 35 34.3 33.6 32.9 32.3 31.7 31.2 30.6 30.1 957
COK Cook Islands 13.2 13 12.8 12.6 12.2 11.8 11.3 10.7 10.1 9.6 9.1 8.6 8.2 7.8 7.4 7 6.6 6.2 5.9 5.6 5.3 5.1 4.9 4.7 4.5 4.4 218.6
CRI Costa Rica 8.9 8.8 8.8 8.8 8.7 8.6 8.5 8.4 8.2 8 7.7 7.4 7.2 7.1 7 7 6.9 6.8 6.7 6.6 6.6 6.5 6.5 6.4 6.3 6.2 194.6
CIV Cote d Ivoire 50.5 50.4 50.6 50.9 51.1 51.3 51.3 51.1 50.8 50.4 49.9 49.3 48.7 47.9 47.1 46.1 45.2 44.2 43.4 42.6 41.8 41 40.2 39.4 38.6 37.9 1211.7
HRV Croatia 8.1 8 7.8 7.4 6.9 6.4 6 5.7 5.7 5.7 5.5 5.3 5 4.7 4.5 4.2 4 3.9 3.8 3.7 3.5 3.3 3.1 2.9 2.7 2.6 130.4
CUB Cuba 6.7 6.4 6.2 6 5.9 5.6 5.2 4.7 4.3 4.2 4.2 4.1 4 3.8 3.6 3.4 3.2 3.1 2.9 2.8 2.7 2.6 2.5 2.4 2.4 2.3 105.2
CYP Cyprus 5.6 5.5 5.3 5.1 4.8 4.5 4.2 4 3.7 3.5 3.2 3 2.8 2.6 2.5 2.4 2.3 2.2 2.1 2 1.9 1.8 1.7 1.6 1.5 1.5 81.3
CZE Czech Republic 10.3 9.7 8.9 8.1 7.3 6.5 5.8 5.2 4.6 4.2 3.9 3.7 3.5 3.4 3.3 3.1 3 2.8 2.7 2.5 2.4 2.3 2.1 2 1.9 1.8 115
DNK Denmark 4.4 4.2 4.1 4 3.9 3.8 3.8 3.7 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.1 3 2.9 2.9 2.8 2.8 2.7 2.7 2.6 2.6 2.5 86.3
DJI Djibouti 49.8 49.3 49 48.6 48 47.4 46.7 46 45.2 44.7 44.1 43.6 43 42.3 41.7 41.1 40.4 39.7 39 38.2 37.4 36.7 35.9 35.2 34.2 33.4 1100.6
DMA Dominica 10.5 10.5 10.7 10.8 10.9 10.9 11 11.1 11.1 11.2 11.2 11.2 11.2 11.2 11.3 11.5 11.8 12.2 12.7 13.2 13.9 14.6 15.1 15.5 15.6 15.6 316.5
DOM Dominican Republic 24.6 24.2 23.9 23.7 23.7 23.7 23.8 24 24.1 24.1 24.1 24 23.9 23.8 23.7 23.8 23.8 23.9 23.8 23.7 23.5 23.3 23 22.6 22.1 21.7 614.5
ECU Ecuador 24.2 23.4 22.6 21.9 21.2 20.4 19.7 19.1 18.5 17.9 17.3 16.7 16.1 15.6 15.1 14.6 14.2 13.8 13.4 13 12.6 12.2 11.8 11.4 11.1 10.8 428.6
EGY Egypt 33.4 32 30.7 29.4 28.1 26.9 25.9 24.9 24 23.1 22.3 21.5 20.8 20.2 19.5 19 18.4 17.6 16.9 16.2 15.5 14.9 14.3 13.8 13.3 12.8 555.4
SLV El Salvador 22.5 21.8 21 20.2 19.3 18.4 17.5 16.7 15.9 15.3 14.4 13.6 12.9 12.3 11.8 11.3 10.9 10.6 10.3 10 9.8 9.5 9.2 8.9 8.6 8.3 361
GNQ Equatorial Guinea 50.6 49.8 49.4 48.9 48.1 47.6 47 46.2 45.7 45.3 44.8 44 43.3 42.6 41.8 40.8 39.7 38.6 37.8 37.1 36.4 35.7 35.1 34.4 33.7 33.1 1097.5
ERI Eritrea 33.6 32.8 32.2 31.7 31.1 30.4 29.5 28.6 27.7 26.9 26.3 25.7 25.2 24.7 24.1 23.4 22.9 22.2 21.6 21.1 20.5 20 19.6 19.2 18.8 18.4 658.2
EST Estonia 13.8 13.4 12.8 12.1 11.3 10.3 9.3 8.3 7.5 6.8 6.3 5.7 5.3 4.8 4.4 4 3.7 3.4 3.1 2.8 2.5 2.3 2 1.8 1.7 1.5 160.9
ETH Ethiopia 60.9 60 58.9 57.5 56.1 54.7 53.2 51.8 50.5 49.5 48.4 47.2 45.9 44.4 42.7 40.9 39 37.3 35.5 33.9 32.5 31.4 30.4 29.3 28.5 27.7 1148.1
FSM Federated States of Micronesia 26.2 26 25.9 26 26 26.1 26.3 26.3 26.2 26 25.7 25.3 25 24.5 24 23.5 23 22.6 22.1 21.7 21.2 20.7 20.2 19.7 19.2 18.8 618.2
FJI Fiji 17 16.5 16 15.6 15.2 14.9 14.7 14.4 14.2 14.1 13.9 13.7 13.5 13.2 12.9 12.5 11.8 11.1 10.7 10.4 10.3 10.3 10.2 10 9.8 9.6 336.5
FIN Finland 3.9 3.7 3.6 3.4 3.2 3.1 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2 2.2 2.1 2 2 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.3 62.1
FRA France 3.6 3.4 3.2 3.1 3.1 3.1 3.1 3 2.9 2.8 2.8 2.7 2.7 2.6 2.5 2.4 2.3 2.3 2.3 2.3 2.3 2.2 2.2 2.3 2.3 2.2 69.7
GAB Gabon 31.7 31.6 31.4 31.2 31 30.7 30.5 30.3 30.1 30 29.8 29.6 29.3 28.8 28.5 28.2 27.8 27.4 27 26.4 25.9 25.3 24.7 24.2 23.8 23.2 738.4
GMB Gambia The 50.7 49.8 48.5 47.5 46.7 45.7 44.8 44.1 43.3 42.5 41.7 40.6 39.9 39.1 38.4 37.3 36.2 35.3 34.6 33.9 33.2 32.7 32.1 31.4 30.7 29.9 1030.6
GEO Georgia 24.7 24.7 24.6 24.5 24.2 23.9 23.6 23.1 22.4 21.8 21 20 18.7 17.4 16.1 14.8 13.7 12.6 11.6 10.8 10 9.3 8.7 8.2 7.6 7.2 445.2
DEU Germany 3.4 3.5 3.5 3.3 3.2 3.1 3 2.9 2.9 2.8 2.8 2.7 2.7 2.7 2.6 2.6 2.6 2.5 2.4 2.4 2.3 2.3 2.3 2.2 2.2 2.1 71
GHA Ghana 42.3 41.4 40.7 40.1 39.6 39.2 38.7 38.2 37.8 37.1 36.4 35.7 34.9 34.4 33.9 33.6 33.4 33.1 32.8 32.4 31.9 31.2 30.5 29.7 29 28.3 916.3
GRC Greece 9.5 9 8.6 8.4 8.1 7.8 7.5 7.1 6.6 6.1 5.6 5.1 4.7 4.3 3.9 3.6 3.4 3.2 3.1 3.1 3 3 3 3 3 2.9 136.6
GRD Grenada 13.2 12.6 11.8 11 10.1 9.3 8.7 8.2 7.9 7.8 7.7 7.6 7.5 7.5 7.4 7.3 7.2 7.1 7 6.9 6.8 6.7 6.5 6.4 6.2 6 212.4
GTM Guatemala 29 28 27.1 26.3 25.4 24.6 23.8 23.1 22.4 21.6 21 20.3 19.6 19.1 18.5 17.9 17.5 17 16.6 16.2 15.8 15.3 14.8 14.3 13.8 13.4 522.4
GIN Guinea 62.9 61.6 60.5 59.8 59.3 58.7 57.7 56.2 54 51.1 48.3 46.1 44.5 43.3 42.1 40.9 39.4 37.7 36.4 35.3 34.6 33.9 33.2 32.6 31.8 31.3 1193.2
GNB Guinea-Bissau 65.4 64.7 64.2 63.6 62.6 61.6 60.6 59.5 58.3 57.1 55.7 54.6 53.6 52.5 51.9 51.1 50.4 49.3 48.2 46.9 45.5 44.2 42.8 41.6 40.6 39.7 1386.2
GUY Guyana 30.1 30 29.8 29.5 29.2 28.8 28.4 27.9 27.3 26.6 26 25.5 25.1 24.8 24.6 24.4 24.2 24.1 24.1 24 23.9 23.8 23.7 23.5 23.2 22.8 675.3
HTI Haiti 39.2 37.5 36.2 35.2 34.3 33.6 32.8 32.1 31.5 31 30.6 30.3 30.2 30.2 30.1 29.8 29.4 29 28.5 28.1 29.9 27.3 26.9 26.5 26 25.4 801.6
HND Honduras 21.6 20.8 20.1 19.6 19.2 18.9 18.7 18.5 18.5 17.9 17.6 17.3 17 16.5 16.1 15.7 15.3 14.8 14.3 13.7 13.1 12.6 12.2 11.8 11.4 11 424.2
HUN Hungary 13.6 12.8 11.9 10.8 9.9 9.1 8.5 8.1 7.7 7.4 7 6.6 6.1 5.7 5.3 5 4.8 4.6 4.4 4.2 4 3.9 3.8 3.7 3.6 3.5 176
ISL Iceland 3.5 3.3 3.1 3 2.8 2.7 2.6 2.5 2.3 2.2 2.1 2 1.8 1.7 1.6 1.5 1.4 1.3 1.3 1.2 1.2 1.1 1.1 1 1 0.9 50.2
IND India 57.4 56.1 54.8 53.7 52.5 51.4 50.3 49 47.8 46.5 45.1 43.7 42.3 40.9 39.5 38.3 37.1 36 34.9 33.8 32.7 31.6 30.6 29.5 28.6 27.7 1091.8
IDN Indonesia 30.3 29.6 28.9 28.2 27.4 26.5 25.6 24.7 23.9 23.1 22.3 21.6 20.9 20.3 19.8 19.2 18.6 18.1 17.6 17.1 16.4 15.7 15.1 14.5 14 13.5 552.9
IRN Iran 26.5 25.6 24.8 24 23.3 22.6 22 21.3 20.6 19.9 19.2 18.4 17.5 16.8 16 15.3 14.6 13.9 13.1 12.4 11.7 11.2 10.7 10.2 9.8 9.5 450.9
IRQ Iraq 27.1 26.6 26.2 25.9 25.6 25.3 25.1 24.9 24.7 24.5 24.3 24 23.7 23.4 23 22.6 22.3 21.9 21.5 21.1 20.7 20.4 20 19.5 19 18.4 601.7
IRL Ireland 4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.1 4.1 4.1 4 3.9 3.7 3.5 3.2 3 2.8 2.6 2.5 2.5 2.5 2.5 2.5 2.4 2.3 2.3 89.3
ISR Israel 6.3 5.9 5.5 5.1 4.7 4.5 4.2 4 3.8 3.7 3.6 3.5 3.3 3.2 2.9 2.7 2.5 2.5 2.4 2.4 2.4 2.4 2.3 2.3 2.2 2.1 90.4
ITA Italy 6.4 6.1 5.6 5.3 5 4.7 4.5 4.2 3.9 3.7 3.4 3.2 3.1 2.9 2.8 2.7 2.6 2.5 2.5 2.5 2.4 2.4 2.3 2.2 2.1 2.1 91.1
JAM Jamaica 20.6 20.3 20 19.7 19.3 18.9 18.6 18.3 17.9 17.5 17 16.5 16 15.5 15.1 14.7 14.5 14.3 14 13.7 13.5 13.1 12.7 12.4 12 11.6 417.7
JPN Japan 2.5 2.5 2.4 2.3 2.2 2.2 2.1 2 1.9 1.8 1.8 1.7 1.7 1.6 1.5 1.4 1.3 1.3 1.2 1.2 1.1 1 1 1 1 0.9 42.6
JOR Jordan 20.2 19.7 19.3 18.9 18.5 18.1 17.8 17.5 17.3 17 16.6 16.3 15.9 15.4 15 14.5 14.1 13.6 13.3 12.9 12.5 12.1 11.7 11.3 11 10.6 401.1
KAZ Kazakhstan 22.3 22.3 22.4 22.7 22.9 22.8 22.6 22.2 21.5 20.9 20.1 19.4 18.6 17.9 17.2 16.2 15.1 14 12.9 11.8 10.7 9.8 8.9 8.1 7.5 7 437.8
KEN Kenya 27.4 27.2 27.2 27.1 27.1 27.3 27.6 28 28.4 28.8 29.1 29.3 29.3 29.3 29.2 29 28.5 28 27.3 26.6 25.9 25.1 24.3 23.6 22.9 22.2 705.7
KIR Kiribati 36.1 35.2 34.4 33.7 33.1 32.5 31.9 31.1 30.4 29.7 28.9 28.2 27.5 26.9 26.5 26.2 26 26 26 25.9 25.7 25.3 24.9 24.6 24.1 23.7 744.5
PRK Korea DPR 21.9 23.7 25.7 27.8 29.5 30.9 31.7 31.7 30.9 29.4 27.3 24.8 22.3 20.2 18.7 17.7 17.4 17.4 17.5 17.3 16.9 16.2 15.5 14.8 14.1 13.5 574.8
KOR Korea Rep 2.7 2.5 2.4 2.2 2.1 1.9 1.8 1.8 1.9 2.1 2.4 2.7 2.9 2.9 2.7 2.5 2.2 2 1.9 1.8 1.7 1.7 1.7 1.7 1.7 1.6 55.5
KWT Kuwait 10.4 9.9 9.4 8.9 8.5 8.1 7.7 7.3 7 6.7 6.5 6.4 6.2 6 5.9 5.9 5.8 5.7 5.4 5.1 4.6 4.2 3.8 3.6 3.4 3.2 165.6
KGZ Kyrgyzstan 25.2 25.5 25.6 25.6 25.5 25.1 24.4 23.7 23.1 22.3 21.8 21.2 20.7 20.3 20 19.8 19.5 19 18.4 17.3 16.1 14.8 13.7 12.8 12.1 11.5 525
LAO Lao PDR 54.7 53.5 52.2 51 49.8 48.6 47.4 46.4 45.3 44.4 43.3 42.3 41.4 40.3 39.3 38.3 37.2 36.3 35.3 34.5 33.6 32.7 32 31.3 30.7 30.1 1071.9
LVA Latvia 12 13.7 15 15.9 16.2 15.9 15.2 14 12.7 11.5 10.4 9.7 9.1 8.6 8.2 7.9 7.5 7.2 6.9 6.6 6.3 6 5.8 5.6 5.4 5.2 258.5
LBN Lebanon 20.8 19.6 18.5 17.5 16.5 15.6 14.8 14 13.3 12.6 11.8 11.2 10.4 9.7 9 8.3 7.6 7.1 6.6 6.2 5.9 5.6 5.4 5.2 5 4.8 283
LSO Lesotho 40.3 40.6 40.8 40.8 40.8 40.7 40.4 39.9 39.2 38.5 37.7 37 36.4 35.9 35.5 35.2 34.8 34.7 34.7 34.7 34.8 34.7 34.3 33.9 33.4 32.7 962.4
LBR Liberia 57 55.5 54.3 52.9 52 51.1 50.3 49.1 47.4 45.6 43.7 41.7 39.7 37.9 36.2 34.5 32.9 31.3 29.9 28.6 27.6 26.8 26 25.3 24.7 24.1 1026.1
LBY Libya 20.9 20.3 19.6 19.1 18.5 17.9 17.2 16.6 16.1 15.6 15.1 14.7 14.2 13.7 13.1 12.4 11.7 10.8 10.1 9.5 8.9 8.5 8.1 7.8 7.5 7.2 355.1
LTU Lithuania 9.5 11.1 12.5 12.8 11.3 9.3 7.8 6.8 6.2 5.8 5.5 5.3 5.2 5.2 5.2 5.1 4.8 4.4 4.1 3.7 3.4 3.2 2.9 2.7 2.6 2.5 158.9
LUX Luxembourg 4.3 4 3.8 3.6 3.4 3.2 3 2.8 2.7 2.6 2.4 2.3 2.2 2 1.9 1.8 1.6 1.5 1.4 1.3 1.2 1.1 1.1 1 1 0.9 58.1
MKD Macedonia 17.3 16.4 15.6 14.6 13.6 12.6 11.6 10.9 10.3 9.7 9.2 8.7 8.5 8.5 8.8 8.9 8.7 8.4 7.9 7.3 6.5 5.6 4.8 4.2 3.8 3.5 245.9
MDG Madagascar 40.2 39.6 39.1 38.5 37.9 37.1 36.2 35.2 34.1 32.9 31.7 30.6 29.5 28.4 27.4 26.4 25.5 24.6 23.7 22.9 22.3 21.7 21.1 20.5 20.1 19.7 766.9
MWI Malawi 48.6 47.1 45.7 44.4 43.4 42.6 41.8 40.8 39.5 37.8 35.8 33.7 31.7 30 28.6 27.7 27 26.7 26.5 26.2 25.7 24.9 24 23.2 22.4 21.8 867.6
MYS Malaysia 9 8.5 8.1 7.7 7.4 7.1 6.8 6.6 6.2 5.8 5.3 4.9 4.6 4.4 4.3 4.2 4.2 4.3 4.4 4.3 4.3 4.2 4.1 4.1 4 3.9 142.7
MDV Maldives 42.9 41.7 40.4 39 37.7 36.1 34.4 32.4 30.4 28.1 25.7 23.2 20.8 18.1 15.7 13.6 11.8 10.4 9.2 8.2 7.4 6.7 6.1 5.6 5.2 4.9 555.7
MLI Mali 73.1 71.4 69.8 68.9 67.8 66.5 64.8 63 61.1 59.1 56.8 54.4 52.3 50.6 49.2 47.7 46.4 45.1 43.9 43 42.1 41.1 40.2 39.4 38.6 37.8 1394.1
MLT Malta 7.5 7.3 7.1 6.8 6.6 6.4 6.1 5.8 5.6 5.4 5.2 5 4.9 4.8 4.7 4.7 4.6 4.6 4.6 4.6 4.6 4.5 4.5 4.5 4.4 4.4 139.2
MHL Marshall Islands 19.7 19.2 18.7 18.2 17.9 17.7 17.7 17.9 18.2 18.4 18.5 18.5 18.4 18.2 18.1 18.1 18 17.9 17.9 17.8 17.7 17.6 17.5 17.2 17 16.7 468.7
MRT Mauritania 45.9 45.2 44.7 44.3 44.3 44.3 44.2 44 43.7 43.3 43 42.7 42.6 42.5 42.4 42.1 41.8 41.1 40.5 39.9 39.1 38.3 37.7 36.9 36.3 35.7 1086.5
MUS Mauritius 14.6 14.1 13.9 14 14.4 15 15.5 15.5 14.8 13.6 12.3 11 10.2 9.9 9.8 9.9 10 9.9 9.6 9.3 9.1 9.1 9 8.9 8.7 8.4 300.5
MEX Mexico 20.6 19.4 18.3 17.2 16.2 15.3 14.2 13.1 12 11 10.1 9.3 8.6 8.1 7.9 7.8 7.5 6.9 6.6 6.9 7.7 8.2 8.1 7.7 7.4 7 283.1
MDA Moldova 18.6 18.9 19.6 20.4 21.4 22.3 23 23.3 23.1 22.3 20.7 18.9 17.1 15.6 14.5 13.8 13.3 13.2 13.1 13 12.9 12.8 12.6 12.4 12.1 11.9 440.8
MCO Monaco 4.2 4 3.8 3.7 3.5 3.4 3.2 3.1 3 2.9 2.8 2.7 2.6 2.5 2.5 2.4 2.4 2.3 2.3 2.2 2.2 2.1 2.1 2 2 1.9 71.8
MNG Mongolia 31.8 31.9 31.8 31.7 31.4 30.9 30 29 27.9 26.8 25.7 24.6 23.5 22.3 21.2 20.1 19.2 18.2 17.2 16 14.9 13.9 13 12.3 11.7 11.1 588.1
MNE Montenegro 10.9 10.4 10.1 10 9.9 9.8 9.8 9.7 9.5 9.3 9 8.7 8.3 7.8 7.4 6.8 6.4 5.9 5.4 5 4.5 4.1 3.8 3.5 3.3 3.1 192.4
MAR Morocco 36.5 35.6 34.7 33.9 33 32.1 31.1 30.1 29.2 28.3 27.5 26.9 26.2 25.5 24.9 24.3 23.8 23.2 22.6 21.9 21.1 20.3 19.6 18.9 18.2 17.6 687
MOZ Mozambique 61.5 60.5 59.6 58.4 57.1 55.5 53.8 51.6 49.1 46.6 44.1 41.9 39.8 38.1 36.6 35.2 34.1 33.1 32.3 31.4 30.6 29.8 29.1 28.4 27.8 27.1 1093.1
MMR Myanmar 46.6 46 45.2 44.3 43.4 42.3 41.2 40.2 39.3 38.3 37.3 36.5 35.6 34.9 34.2 33.5 32.8 32.1 31.7 30.5 29.7 29 28.4 27.7 27 26.4 934.1
NAM Namibia 27.7 27 26.1 25.2 24.3 23.3 22.5 21.7 21 20.3 19.6 18.9 18.3 17.8 17.4 17.1 17 17.1 17.1 17.1 17.1 16.9 16.7 16.4 16.1 15.9 515.6
NRU Nauru 28.8 28.3 27.7 27.3 26.9 26.7 26.4 25.9 25.5 25.1 24.8 24.6 24.5 24.5 24.5 24.5 24.5 24.6 24.7 24.6 24.6 24.2 23.8 23.5 23.1 22.7 656.3
NPL Nepal 58.5 56.2 54 51.9 49.8 47.7 45.8 44 42.4 40.8 39.3 37.8 36.5 35.1 33.8 32.5 31.3 30.1 29 27.8 26.7 25.6 24.7 23.8 23 22.2 970.3
NLD Netherlands 4.6 4.5 4.4 4.3 4.2 4.1 4 3.9 3.9 3.9 3.8 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3 2.9 2.8 2.7 2.6 2.5 2.4 2.4 91.4
NZL New Zealand 4.3 4.2 4 3.8 3.6 3.5 3.5 3.5 3.5 3.5 3.5 3.4 3.4 3.3 3.2 3.1 3 3 3.1 3.2 3.3 3.4 3.3 3.3 3.2 3.1 89.2
NIC Nicaragua 23.5 22.8 22.2 21.6 21 20.3 19.7 19 18.5 17.8 17.2 16.7 16.2 15.7 15 14.4 13.8 13.3 12.7 12.3 11.8 11.4 11 10.6 10.3 9.8 418.6
NER Niger 54.5 53.6 52.7 51.6 50.3 49.2 48 46.9 45.8 44.6 43.4 42.1 40.7 39.3 37.9 36.6 35.4 34.2 33 31.9 30.8 29.8 28.9 28.1 27.3 26.8 1043.4
NGA Nigeria 50.4 50.7 51.1 51.3 51.4 51.4 51.1 50.7 50.1 49.3 48.3 47.2 46.1 45 43.8 42.7 41.6 40.7 39.8 39 38.2 37.4 36.5 35.8 35 34.3 1158.9
NIU Niue 7.5 7.9 8.3 8.7 9.2 9.7 10.2 10.7 11.2 11.9 12.5 13.2 13.8 14.5 14.9 15.1 15.1 15 14.8 14.6 14.3 13.9 13.5 13.2 12.8 12.5 319
NOR Norway 4 3.8 3.6 3.4 3.2 3.1 2.9 2.8 2.8 2.7 2.7 2.6 2.5 2.4 2.4 2.3 2.2 2.1 2 1.9 1.9 1.8 1.7 1.6 1.6 1.5 65.5
OMN Oman 17.3 16 14.6 13.3 12.1 11 10.2 9.4 8.7 8.1 7.5 7 6.6 6.2 6 5.8 5.6 5.5 5.4 5.3 5.3 5.3 5.3 5.3 5.3 5.2 213.3
PAK Pakistan 64.3 65.4 66.4 67.1 67 66.4 65.5 64.5 63.2 61.8 60.4 59 57.8 56.3 54.8 53.4 52.5 51.8 51.2 50.6 50 49.2 48.4 47.4 46.6 45.5 1486.5
PLW Palau 19.3 18.9 18.5 18.1 17.6 17 16.5 16 15.5 15 14.6 14.1 13.7 13.3 12.8 12.5 12 11.6 11.3 10.9 10.6 10.2 9.9 9.6 9.3 9 357.8
PAN Panama 17.4 17 16.6 16.3 16.1 15.9 15.7 15.5 15.3 15 14.7 14.4 14 13.7 13.3 13 12.6 12.3 12 11.6 11.3 10.9 10.6 10.2 9.9 9.6 354.9
PNG Papua New Guinea 31.8 31.6 31.4 31.3 31.1 30.9 30.8 30.6 30.4 30.2 30.1 29.9 29.8 29.7 29.5 29.2 28.9 28.5 28.1 27.7 27.1 26.5 26 25.4 24.9 24.5 755.9
PRY Paraguay 22.7 22.1 21.6 21 20.5 19.9 19.5 19.1 18.6 18.3 17.7 17.2 16.7 16.3 15.8 15.4 14.9 14.4 13.9 13.5 13 12.6 12.2 11.8 11.4 10.9 431
PER Peru 27.8 26.8 25.9 24.8 23.6 22.3 20.8 19.3 18 16.8 15.8 15 14.3 13.6 13 12.5 12 11.6 11.1 10.7 10.2 9.8 9.4 8.9 8.6 8.2 410.8
PHL Philippines 19.6 19 18.5 18.1 17.8 17.5 17.3 17.1 17 16.9 16.8 16.7 16.6 16.4 16.2 16 15.7 15.4 15 14.6 14.3 14 13.7 13.3 12.9 12.6 419
POL Poland 11.1 10.7 10.5 10.5 10.4 9.7 8.8 7.8 6.9 6.2 5.8 5.4 5.2 5 4.8 4.6 4.4 4.2 4 3.8 3.6 3.4 3.3 3.2 3.2 3.1 159.6
PRT Portugal 7.2 6.6 6 5.5 5.1 4.7 4.3 4 3.8 3.5 3.4 3.2 3 2.8 2.6 2.3 2.2 2.1 2.1 2.1 2.1 2.1 2.1 2.1 2 2 88.9
QAT Qatar 11.3 10.6 9.9 9.3 8.8 8.3 7.9 7.5 7.2 6.8 6.5 6.2 6 5.7 5.5 5.2 5 4.9 4.8 4.6 4.5 4.4 4.3 4.1 4 3.8 167.1
ROU Romania 13.5 13.4 13.3 13.3 13.2 13.1 13.1 13.1 13.1 13.1 13.1 13 13 12.8 12.3 11.7 10.9 10 9.2 8.5 7.9 7.4 7.1 6.8 6.5 6.3 288.7
RUS Russian Federation 14 14 14 14.2 14.3 14.3 14.1 13.8 13.5 13.1 12.5 11.9 11.2 10.5 9.7 9 8.3 7.7 7.2 6.7 6.3 6 5.7 5.4 5.2 5 267.6
RWA Rwanda 40.8 41.2 42 43.3 46 46.1 45.4 45.8 45.6 44 42.3 40.3 38 35.7 33.4 31.2 29.5 28 26.7 25.5 24.3 22.9 21.6 20.4 19.5 18.7 898.2
KNA Saint Kitts & Nevis 17.5 16.7 16 15.4 14.9 14.3 13.8 13.2 12.6 12.1 11.6 11.1 10.7 10.3 9.9 9.5 9.1 8.8 8.4 8.1 7.8 7.5 7.2 7 6.8 6.5 286.8
LCA Saint Lucia 12.8 12.4 12.1 11.8 11.5 11.2 11.1 11 11 11.1 11.2 11.3 11.3 11.3 11.2 11.2 11.1 10.9 10.8 10.6 10.5 10.2 10 9.8 9.5 9.3 286.2
WSM Samoa 16.7 16.2 15.7 15.1 14.5 14 13.5 13 12.6 12.1 11.7 11.4 11.1 10.8 10.6 10.5 10.4 10.3 10.2 10.2 10.2 10.1 10 9.9 9.7 9.5 310
SMR San Marino 6.6 5.8 4.9 3.9 3.1 2.4 2 1.7 1.5 1.4 1.3 1.2 1.2 1.1 1 1 1 1 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 48.4
STP Sao Tome & Principe 28.4 28.2 28 27.7 27.3 26.9 26.3 25.9 25.5 25.1 24.5 23.9 23.3 22.7 22.2 21.6 21 20.5 20 19.5 19 18.6 18.2 17.8 17.5 17.1 596.7
SAU Saudi Arabia 22.3 20.9 19.6 18.5 17.2 16 15.1 14.2 13.5 12.9 12.4 11.9 11.6 11.2 10.9 10.7 10.5 10.2 9.9 9.6 9.3 9 8.7 8.5 8.2 7.9 330.7
SEN Senegal 40.2 40 39.9 40 40.1 40.3 40.4 40.3 40.1 39.6 38.9 37.9 36.7 35.4 34 32.5 31 29.6 28.1 26.8 25.5 24.3 23.2 22.2 21.5 20.8 869.3
SRB Serbia 17.5 16 15 14.3 13.5 12.2 10.8 9.5 8.6 8 7.7 7.5 7.1 6.6 6 5.5 5.2 5.1 5 4.9 4.8 4.7 4.5 4.4 4.3 4.2 212.9
SYC Seychelles 11.3 10.8 10.4 10.1 9.8 9.5 9.3 9.2 9.2 9.2 9.2 9.2 9.2 9.2 9.1 9.1 9.1 9 9 9 9 9 9 8.9 8.8 8.6 243.2
SLE Sierra Leone 53.9 54 53.8 53.6 53.4 53 52.4 51.8 51.4 50.8 50.1 49.4 48.7 48.2 47.5 46.7 45.7 44.6 43.3 42 40.7 39.4 38.2 37 35.8 34.9 1220.3
SGP Singapore 4 3.5 3.1 2.7 2.4 2.3 2.1 2 1.9 1.8 1.6 1.5 1.4 1.3 1.3 1.3 1.2 1.2 1.2 1.2 1.1 1.1 1.1 1.1 1.1 1 45.5
SVK Slovakia 12.5 12 11.5 11 10.5 9.9 9.3 8.8 8.2 7.7 7.3 6.9 6.6 6.2 5.9 5.6 5.4 5.3 5.2 5.1 5 4.9 4.7 4.6 4.4 4.2 188.7
SVN Slovenia 5.7 5.3 4.9 4.6 4.3 4 3.8 3.7 3.5 3.4 3.3 3.1 3 2.8 2.6 2.5 2.3 2.2 2.1 1.9 1.8 1.7 1.6 1.5 1.5 1.4 78.5
SLB Solomon Islands 16 15.6 15.3 15 14.8 14.6 14.6 14.6 14.6 14.4 14.4 14.3 14.2 14.3 14.3 14.4 14.5 14.5 14.3 14 13.8 13.5 13.2 12.9 12.5 12.2 370.8
SOM Somalia 45.1 44.6 44.5 44.1 44.1 44.2 44.2 44.2 44.2 44.4 44.5 44.9 45.2 45.4 45.4 45.3 45.2 44.8 44.3 43.6 43 42.4 41.9 41.2 40.5 39.7 1140.9
ZAF South Africa 20.4 20 19.5 19.2 18.8 18.4 17.9 17.4 16.9 16.4 16 15.5 15.1 14.6 14.2 13.7 13.2 12.8 12.3 11.9 11.7 11.5 11.3 11.2 11.1 11 392
SSD South Sudan 66.7 66.1 65.4 64.6 63.7 63.1 62.1 61.1 60.1 58.8 57.5 56 54.4 53 51.6 50.1 48.6 47.3 46 44.8 43.7 42.7 41.8 41 40.1 39.3 1389.6
ESP Spain 7.1 6.7 6.4 6 5.6 5.2 4.9 4.6 4.3 4.1 4 4 3.9 3.8 3.7 3.5 3.4 3.2 3.1 3.1 3 3 3 2.9 2.8 2.8 108.1
LKA Sri Lanka 14.3 14.2 14 13.7 13.2 12.6 12.1 11.5 11 10.5 10.1 9.8 9.6 9.4 9.4 8.7 8.2 7.7 7.2 6.8 6.4 6.1 5.9 5.7 5.6 5.4 249.1
VCT St Vincent & the Grenadines 13 12.9 12.8 12.8 12.8 12.9 13 13.2 13.3 13.4 13.5 13.6 13.7 13.8 13.8 13.8 13.7 13.6 13.5 13.3 13.1 12.8 12.5 12.2 11.8 11.5 340.3
PSE State of Palestine 22.1 21.5 20.8 20.1 19.5 18.9 18.4 17.7 17.2 16.7 16.4 16.1 15.8 15.6 15.3 14.9 14.5 14.2 13.9 13.6 13.4 13.1 12.8 12.4 12.1 11.8 418.8
SDN Sudan 40.7 40.1 39.5 39 38.4 37.9 37.4 37 36.5 36.1 35.6 35.1 34.6 34 33.6 33.2 32.9 32.8 32.6 32.4 32.2 31.8 31.4 30.9 30.4 29.8 905.9
SUR Suriname 23.3 22.8 22.3 21.9 21.4 21 20.5 20.1 19.6 19.1 18.6 18 17.3 16.8 16.3 15.9 15.4 14.9 14.4 13.9 13.5 13 12.6 12.2 11.8 11.5 448.1
SWZ Swaziland 22.1 22.2 22.3 22.4 22.5 22.5 22.5 22.4 22.2 21.8 21.3 20.6 19.8 19 18.3 17.8 17.4 17.1 16.9 16.8 16.6 16.3 15.7 15.1 14.6 14.2 500.4
SWE Sweden 3.5 3.4 3.2 3 2.9 2.7 2.5 2.4 2.4 2.3 2.3 2.3 2.2 2.1 2 1.9 1.8 1.8 1.7 1.6 1.6 1.6 1.6 1.6 1.6 1.6 57.6
CHE Switzerland 3.9 3.8 3.6 3.5 3.5 3.4 3.4 3.4 3.4 3.5 3.5 3.5 3.4 3.4 3.3 3.3 3.3 3.3 3.2 3.2 3.1 3 3 2.9 2.8 2.7 86.3
SYR Syria 16.6 16.1 15.7 15.1 14.7 14.3 13.9 13.6 13.2 12.8 12.4 12 11.6 11.2 10.7 10.3 9.9 9.5 9.1 8.7 8.4 8.1 7.8 7.6 7.3 7 297.6
TJK Tajikistan 32.3 32.3 32.5 32.7 32.8 32.5 32.2 31.9 31.4 30.9 30.1 29.2 28.4 27.5 26.4 25.6 24.9 24.4 23.9 23.3 22.8 22.3 21.8 21.4 20.9 20.5 714.9
TZA Tanzania 39.5 38.8 38.1 37.5 36.8 36.2 35.5 34.8 34 33.1 32 30.8 29.6 28.4 27.3 26.2 25.2 24.1 23.2 22.3 21.5 20.9 20.3 19.8 19.3 18.8 754
THA Thailand 20.4 19.5 18.5 17.5 16.6 15.9 15.2 14.5 13.9 13.3 12.7 12.1 11.5 11 10.5 10 9.5 9.1 8.8 8.4 8.1 7.8 7.5 7.3 7 6.7 313.3
TLS Timor Leste 55.9 54.4 52.7 50.8 48.8 46.6 44.6 42.8 40.9 39.1 37.4 35.7 34.1 32.6 31.3 29.9 28.8 27.8 26.9 26.2 25.3 24.7 24 23.4 22.9 22.3 929.9
TGO Togo 43.4 42.6 42 41.3 40.5 39.8 39 38.2 37.5 36.8 36 35.3 34.6 34 33.4 32.7 32 31.2 30.4 29.8 29.2 28.7 28.2 27.7 27.2 26.7 898.2
TON Tonga 10.1 9.7 9.3 9 8.7 8.5 8.3 8.1 7.9 7.8 7.6 7.4 7.3 7.2 7.1 7.1 7.1 7.1 7.1 7.1 7.2 7.3 7.3 7.2 7.1 6.9 202.5
TTO Trinidad & Tobago 19.9 19.5 19.3 19.2 19 18.9 18.9 18.8 18.8 18.8 18.7 18.6 18.5 18.2 17.8 17.4 17.1 16.6 16.2 15.8 15.3 14.9 14.5 14 13.6 13.2 451.5
TUN Tunisia 27.7 27.1 26.5 25.8 25 24.1 23.1 22 20.8 19.7 18.4 17.2 16.1 15.1 14.3 13.4 12.6 11.9 11.3 10.6 10.1 9.6 9.2 8.8 8.5 8.2 437.1
TUR Turkey 32.7 31.4 30 28.7 27.3 26 24.7 23.5 22.3 21.2 20.1 19 18 16.8 15.6 14.5 13.5 12.6 11.7 10.8 10.1 9.3 8.7 8.1 7.5 7.1 471.2
TKM Turkmenistan 30.1 30.9 31.5 32 32.3 32.3 32.2 32 31.6 31.1 30.6 30.2 29.7 29.1 28.5 28 27.5 26.9 26.3 25.9 25.3 24.8 24.3 23.7 23.2 22.6 742.6
TUV Tuvalu 30 29.8 29.5 29.1 28.6 28 27.5 26.9 26.3 25.7 25.3 25.1 24.8 24.5 24.1 23.6 23.2 22.7 22.1 21.4 20.8 20.2 19.5 18.9 18.3 17.6 633.5
UGA Uganda 38.5 37.2 36.1 35.3 34.9 34.6 34.4 34.1 33.8 33.2 32.5 31.6 30.5 29.4 28.3 27.3 26.3 25.2 24.1 23.1 22.1 21.2 20.4 19.7 19.2 18.7 751.7
UKR Ukraine 12.1 12 12.1 12.2 12.4 12.6 12.6 12.4 12.1 11.7 11.2 10.6 10.1 9.6 9.1 8.8 8.5 8.2 7.8 7.5 7.1 6.8 6.4 6.1 5.7 5.5 251.2
ARE United Arab Emirates 8.2 7.9 7.6 7.3 6.9 6.6 6.4 6.2 6 5.8 5.6 5.5 5.4 5.2 5.1 5 4.9 4.7 4.6 4.5 4.3 4.1 4 3.8 3.6 3.5 142.7
GBR United Kingdom 4.5 4.4 4.4 4.3 4.2 4.1 4 3.9 3.9 3.8 3.8 3.7 3.6 3.6 3.5 3.5 3.4 3.3 3.2 3.1 3 2.9 2.8 2.7 2.5 2.4 92.5
USA United States of America 5.8 5.6 5.4 5.2 5.1 5 4.9 4.8 4.7 4.6 4.6 4.6 4.6 4.6 4.5 4.5 4.4 4.3 4.3 4.2 4.1 4 3.9 3.8 3.7 3.6 118.8
URY Uruguay 12.2 11.9 11.6 11.2 10.8 10.3 9.6 9.1 8.7 8.5 8.4 8.3 8.2 8 7.7 7.4 7 6.6 6.4 6.2 6.1 5.9 5.8 5.5 5.3 5.1 211.8
UZB Uzbekistan 30.9 30.7 30.7 30.6 30.5 30.4 30.3 30 29.8 29.5 29 28.5 27.9 27.4 26.6 26 25.4 24.9 24.3 23.7 23.1 22.6 22.1 21.5 20.9 20.4 697.7
VUT Vanuatu 16.3 15.7 15.1 14.5 14 13.6 13.3 13.1 12.7 12.5 12.2 12 11.9 11.8 11.9 12 12 12.1 12.1 12.1 12.1 12.1 12.1 12 11.8 11.6 332.6
VEN Venezuela 13 13.5 14 14.1 13.8 13.3 13 12.9 12.7 12.4 12 11.6 11.1 10.5 9.8 9.3 9.4 9.7 10.1 10.2 10.1 9.9 9.7 9.5 9.2 8.9 293.7
VNM Vietnam 23.9 23.5 23.1 22.4 21.7 20.8 19.9 18.9 17.7 16.7 15.7 14.8 13.9 13.3 12.9 12.6 12.5 12.5 12.7 12.8 12.8 12.7 12.4 12.1 11.7 11.4 415.4
YEM Yemen 44 43.1 42.3 41.6 41.1 40.8 40.4 39.9 39.2 38.4 37.4 36.3 35.2 34.1 33 31.9 30.8 29.7 28.6 27.5 26.4 25.4 24.4 23.6 22.8 22.1 880
ZMB Zambia 36.2 35.7 35.1 34.6 34.4 34.4 34.6 34.9 35 35 34.5 33.6 32.3 30.7 29.3 28 27.1 26.5 26 25.6 25 24.4 23.5 22.8 22 21.4 782.6
ZWE Zimbabwe 22 21.3 20.8 20.5 20.4 20.3 20.4 20.5 20.6 20.7 21 21.4 21.8 22.2 22.6 23.1 23.7 24.3 24.8 25.2 25.3 25.1 24.8 24.4 23.9 23.5 584.6
/* A lot of this CSS is inherited from the Flowing Data tutorial:
http://flowingdata.com/2015/02/19/make-an-interactive-map-with-category-filters/;
*/
body {
margin: 0;
padding: 0;
font-family: Helvetica, sans-serif;
}
#main-wrapper {
width: 1000px;
padding: 50px;
}
#metrics { width: 920px; margin: 20px auto 15px 0; font-family: Helvetica, sans-serif; }
#metrics h3 { font-size: 13px; font-family: Helvetica, sans-serif; text-align: center; margin-bottom: 0; }
#metrics ul { font-size: 12px; font-family: Helvetica, sans-serif; margin-left: 0; padding: 0; }
#metrics ul li {
list-style: none;
margin: 10px 10px 0 0;
padding: 2px 0;
display: inline-block;
width: 108px;
/*background: #e0e0e0;*/
cursor: pointer;
text-align: center;
font-size: 11px;
border: 1px solid #e0e0e0;
}
#metrics ul li.bottom { margin-bottom: 0; }
#metrics #income { width: 250px; float: left; border-right: 1px solid #ccc; margin-right: 15px; }
#metrics #location { width: 250px; float: left; padding-left: 5px; }
#metrics .block-button { width: 80px; display: block; float:left; clear:both; }
.tooltip {
position: absolute;
z-index: 10;
text-align: left;
width: 170px;
padding: 10px;
font-size: 10px;
font-family: Helvetica, sans-serif;
background: #ffffff;
pointer-events: none;
opacity: 0;
}
.tooltip h3 {
font-size: 12px; margin: 0 0 7px 0;
line-height: 1.2em;
}
div.tooltip .line { clear: both; margin-top: 3px; font-size: 11px; }
div.tooltip .symbol { float: left; width: 6px; height: 6px; margin: 3px 4px 0 0; }
div.tooltip .val { float: right; width: 25px; text-align: center; margin-right: 4px; background: none; }
.overlay {
fill: none;
pointer-events: all;
}
.button {
fill: #000;
}
.scalebutton {
cursor: pointer;
}
.countries {
stroke: #fff;
stroke-linejoin: round;
}
.countries path.selected {
stroke: #000;
stroke-width: 0.5px;
}
path.richest, #metrics ul li.selected.richest, .tooltip .richest { fill: #8dd3c7; background: #8dd3c7; }
path.poorest, #metrics ul li.selected.poorest, .tooltip .poorest { fill: #bc80bd; background: #bc80bd; }
path.differenceIncome, #metrics ul li.selected.differenceIncome, .tooltip .differenceIncome { fill: #bebada; background: #bebada; }
path.urban, #metrics ul li.selected.urban, .tooltip .urban { fill: #80b1d3; background: #80b1d3; }
path.rural, #metrics ul li.selected.rural, .tooltip .rural { fill: #fdb462; background: #fdb462; }
path.differenceLoc, #metrics ul li.selected.differenceLoc, .tooltip .differenceLoc { fill: #b3de69; background: #b3de69; }
.clr { clear: both; }
#vis {
padding: 25px;
display: inline-block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment