Skip to content

Instantly share code, notes, and snippets.

@iaindillingham
Last active May 18, 2018 20:49
Show Gist options
  • Save iaindillingham/36b2794e6e6809e37e122cb36a4ff91a to your computer and use it in GitHub Desktop.
Save iaindillingham/36b2794e6e6809e37e122cb36a4ff91a to your computer and use it in GitHub Desktop.
Reusable chart with d3.dispatch
license: mit
height: 500
scrolling: no
border: yes
{
"env": {
"browser": true
},
"extends": "eslint:recommended",
"globals": {
"d3": false,
"ss": false,
"topojson": false
},
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true
}
},
"rules": {
"indent": ["warn", 4],
"no-tabs": "error"
}
}

Hello Maria,

Here's how we might combine a reusable chart with d3.dispatch. There's nothing new here, but the combination might help you understand how to fit the two together.

I spent hours studying the dispatching events block, which is the template for this block, so if it doesn't make sense immediately, then keep trying!

The data are from the World Bank/Gapminder. They show the Gini index over time.

Iain

function translate(x, y) {
return "translate(" + x + "," + y + ")";
}
function chart() {
var margin = {top: 20, right: 20, bottom: 20, left: 20},
width = 760,
height = 500,
xValue = function (d) { return d[0]; },
yValue = function (d) { return d[1]; },
xScale = d3.scaleTime(),
yScale = d3.scaleLinear(),
xAxis = d3.axisBottom(xScale),
yAxis = d3.axisLeft(yScale),
line = d3.line().x(X).y(Y);
function chart(selection) {
selection.each(function (data) {
data = data.map(function (d, i) {
return [xValue.call(data, d, i), yValue.call(data, d, i)];
});
xScale
.domain(d3.extent(data, function (d) { return d[0]; }))
.range([0, width - margin.left - margin.right])
.nice(); // Re-nice the scale after setting the domain
yScale
.domain([0, d3.max(data, function (d) { return d[1]; })])
.range([height - margin.top - margin.bottom, 0])
.nice();
// Select any existing svg elements that are descendants of
// the `this` selection.
// (Here, there will be zero elements on the first pass and
// one element on later passes.)
// Join these svg elements to `[data]` (one array of one array)
// and return the update selection.
var svg = d3.select(this).selectAll("svg").data([data]);
// Append an svg element for data that do not match
// any existing svg elements and return the enter selection.
// (Here, append an svg element on the first pass.)
var svgEnter = svg.enter().append("svg");
// If we appended an svg element, then also append one g element
// to contain the chart and, as children, two g elements to contain
// the x and y axes.
var gEnter = svgEnter.append("g");
gEnter.append("path").attr("class", "line");
gEnter.append("g").attr("class", "x axis");
gEnter.append("g").attr("class", "y axis");
// `svg` contains the update selection.
// `svgEnter` contains the enter selection.
// Merge (union) the update and enter selections.
// (Here, set the width and height on the first and later passes.)
svg = svg.merge(svgEnter)
.attr("width", width)
.attr("height", height);
// Phew! We've finished with the svg element.
var g = svg.select("g")
.attr("transform", translate(margin.left, margin.right));
g.select(".line")
.attr("d", line)
.attr("fill", "none")
.attr("stroke", "steelblue");
g.select(".x.axis")
.attr("transform", translate(0, yScale.range()[0]))
.call(xAxis);
g.select(".y.axis")
.call(yAxis);
});
}
chart.x = function (value) {
if (!arguments.length) return xValue;
xValue = value;
return chart;
};
chart.y = function (value) {
if (!arguments.length) return yValue;
yValue = value;
return chart;
};
function X(d) {
return xScale(d[0]);
}
function Y(d) {
return yScale(d[1]);
}
return chart;
}
var dispatch = d3.dispatch("load", "statechange");
dispatch.on("load.chart", function (byCountry) {
var gapminder = chart()
.x(function (d) { return d.year; })
.y(function (d) { return d.gini_index; });
// Notice that `statechange.chart` is within `load.chart`? A closure!
// This allows us to initialise `gapminder` on the first pass (`load.chart`)
// and use it on later passes (`statechange.chart`).
dispatch.on("statechange.chart", function (timeseries) {
d3.select("#chart")
.datum(timeseries)
.call(gapminder);
});
});
dispatch.on("load.widget", function (byCountry) {
// A select widget is less complex than a chart, so we don't really need
// to make it reusable.
// We don't need the update or exit selections because the select widget
// doesn't change.
var countries = byCountry.keys().sort(d3.ascending);
d3.select("#widget")
.append("select")
.on("change", change)
.selectAll("option")
.data(countries)
.enter().append("option")
.text(function (d) { return d; });
// On the first pass (`load.widget`), call `change` with `this.value`.
change.call({value: countries[0]});
function change() {
dispatch.call("statechange", null, byCountry.get(this.value));
}
});
d3.json("indicator_SI_POV_GINI.json").then(function (timeseries) {
// Notice that we wrangle the data here but we don't make either
// the chart or the select widget.
var parseYear = d3.utcParse("%Y");
timeseries.forEach(function (d) {
d.year = parseYear(d.year);
});
var byCountry = d3.nest()
.key(function (d) { return d.country; })
.map(timeseries);
// If a country has one year in the timeseries, then remove it.
// (One year isn't a timeseries!)
byCountry.entries().forEach(function (d) {
if (d.value.length === 1) {
byCountry.remove(d.key);
}
});
dispatch.call("load", null, byCountry);
});
<!DOCTYPE html>
<meta charset="utf-8">
<div id="chart"></div>
<div id="widget"></div>
<script src="https://unpkg.com/d3@5/dist/d3.min.js"></script>
<script src="block.js"></script>
[{"country":"India","year":"1978","gini_index":35.09},{"country":"Panama","year":"1979","gini_index":48.74},{"country":"Colombia","year":"1980","gini_index":59.13},{"country":"Madagascar","year":"1980","gini_index":46.85},{"country":"Brazil","year":"1981","gini_index":57.93},{"country":"China","year":"1981","gini_index":29.11},{"country":"Costa Rica","year":"1981","gini_index":47.49},{"country":"Thailand","year":"1981","gini_index":45.22},{"country":"Uruguay","year":"1981","gini_index":43.65},{"country":"Venezuela","year":"1981","gini_index":55.61},{"country":"Brazil","year":"1982","gini_index":58.42},{"country":"Ethiopia","year":"1982","gini_index":32.42},{"country":"Brazil","year":"1983","gini_index":58.99},{"country":"India","year":"1983","gini_index":31.11},{"country":"Bangladesh","year":"1984","gini_index":25.88},{"country":"Brazil","year":"1984","gini_index":58.38},{"country":"China","year":"1984","gini_index":27.69},{"country":"Indonesia","year":"1984","gini_index":30.47},{"country":"Malaysia","year":"1984","gini_index":48.63},{"country":"Mexico","year":"1984","gini_index":46.26},{"country":"Brazil","year":"1985","gini_index":55.59},{"country":"Cote d'Ivoire","year":"1985","gini_index":41.21},{"country":"Morocco","year":"1985","gini_index":39.19},{"country":"Nepal","year":"1985","gini_index":30.06},{"country":"Philippines","year":"1985","gini_index":41.04},{"country":"Poland","year":"1985","gini_index":25.16},{"country":"Rwanda","year":"1985","gini_index":28.9},{"country":"Sri Lanka","year":"1985","gini_index":32.47},{"country":"Tunisia","year":"1985","gini_index":43.43},{"country":"Argentina","year":"1986","gini_index":42.79},{"country":"Bangladesh","year":"1986","gini_index":26.92},{"country":"Botswana","year":"1986","gini_index":54.21},{"country":"Brazil","year":"1986","gini_index":58.46},{"country":"Costa Rica","year":"1986","gini_index":34.42},{"country":"Cote d'Ivoire","year":"1986","gini_index":38.62},{"country":"Dominican Republic","year":"1986","gini_index":47.78},{"country":"Honduras","year":"1986","gini_index":55.09},{"country":"Iran","year":"1986","gini_index":47.42},{"country":"Nigeria","year":"1986","gini_index":38.68},{"country":"Peru","year":"1986","gini_index":45.72},{"country":"Argentina","year":"1987","gini_index":45.28},{"country":"Brazil","year":"1987","gini_index":59.69},{"country":"Chile","year":"1987","gini_index":56.21},{"country":"China","year":"1987","gini_index":29.85},{"country":"Cote d'Ivoire","year":"1987","gini_index":40.43},{"country":"Ecuador","year":"1987","gini_index":50.49},{"country":"Guatemala","year":"1987","gini_index":58.26},{"country":"Hungary","year":"1987","gini_index":20.96},{"country":"Indonesia","year":"1987","gini_index":29.27},{"country":"Jordan","year":"1987","gini_index":36.06},{"country":"Lesotho","year":"1987","gini_index":56.02},{"country":"Malaysia","year":"1987","gini_index":47.04},{"country":"Mauritania","year":"1987","gini_index":43.94},{"country":"Pakistan","year":"1987","gini_index":33.35},{"country":"Poland","year":"1987","gini_index":25.53},{"country":"Slovenia","year":"1987","gini_index":23.6},{"country":"Turkey","year":"1987","gini_index":43.57},{"country":"Venezuela","year":"1987","gini_index":53.45},{"country":"Algeria","year":"1988","gini_index":40.19},{"country":"Belarus","year":"1988","gini_index":22.76},{"country":"Brazil","year":"1988","gini_index":61.43},{"country":"Colombia","year":"1988","gini_index":53.11},{"country":"Cote d'Ivoire","year":"1988","gini_index":36.89},{"country":"Croatia","year":"1988","gini_index":22.78},{"country":"Czech Republic","year":"1988","gini_index":19.4},{"country":"Estonia","year":"1988","gini_index":22.97},{"country":"Ghana","year":"1988","gini_index":35.35},{"country":"India","year":"1988","gini_index":31.88},{"country":"Jamaica","year":"1988","gini_index":43.16},{"country":"Kazakhstan","year":"1988","gini_index":25.74},{"country":"Kyrgyz Republic","year":"1988","gini_index":26.01},{"country":"Latvia","year":"1988","gini_index":22.49},{"country":"Lithuania","year":"1988","gini_index":22.48},{"country":"Moldova","year":"1988","gini_index":24.14},{"country":"Philippines","year":"1988","gini_index":40.63},{"country":"Russia","year":"1988","gini_index":23.8},{"country":"Slovak Republic","year":"1988","gini_index":19.54},{"country":"Thailand","year":"1988","gini_index":43.84},{"country":"Trinidad and Tobago","year":"1988","gini_index":42.6},{"country":"Turkmenistan","year":"1988","gini_index":26.39},{"country":"Ukraine","year":"1988","gini_index":23.31},{"country":"Uzbekistan","year":"1988","gini_index":24.95},{"country":"Bangladesh","year":"1989","gini_index":28.85},{"country":"Brazil","year":"1989","gini_index":63.3},{"country":"Bulgaria","year":"1989","gini_index":23.43},{"country":"Colombia","year":"1989","gini_index":53.59},{"country":"Costa Rica","year":"1989","gini_index":46.69},{"country":"Dominican Republic","year":"1989","gini_index":50.46},{"country":"Ghana","year":"1989","gini_index":35.99},{"country":"Guatemala","year":"1989","gini_index":59.6},{"country":"Honduras","year":"1989","gini_index":59.49},{"country":"Hungary","year":"1989","gini_index":25.05},{"country":"Malaysia","year":"1989","gini_index":46.17},{"country":"Panama","year":"1989","gini_index":58.91},{"country":"Poland","year":"1989","gini_index":26.89},{"country":"Romania","year":"1989","gini_index":23.31},{"country":"Uganda","year":"1989","gini_index":44.36},{"country":"Uruguay","year":"1989","gini_index":42.37},{"country":"Venezuela","year":"1989","gini_index":43.84},{"country":"Brazil","year":"1990","gini_index":61.04},{"country":"Chile","year":"1990","gini_index":55.25},{"country":"China","year":"1990","gini_index":32.43},{"country":"Costa Rica","year":"1990","gini_index":45.3},{"country":"Honduras","year":"1990","gini_index":57.36},{"country":"Indonesia","year":"1990","gini_index":29.19},{"country":"Iran","year":"1990","gini_index":43.6},{"country":"Jamaica","year":"1990","gini_index":42.2},{"country":"Paraguay","year":"1990","gini_index":40.84},{"country":"Thailand","year":"1990","gini_index":45.27},{"country":"Tunisia","year":"1990","gini_index":40.24},{"country":"Argentina","year":"1991","gini_index":46.61},{"country":"Bolivia","year":"1991","gini_index":42.04},{"country":"Colombia","year":"1991","gini_index":51.32},{"country":"Costa Rica","year":"1991","gini_index":46.65},{"country":"Egypt","year":"1991","gini_index":32.0},{"country":"El Salvador","year":"1991","gini_index":53.97},{"country":"Guinea","year":"1991","gini_index":46.84},{"country":"Honduras","year":"1991","gini_index":51.85},{"country":"Morocco","year":"1991","gini_index":39.2},{"country":"Pakistan","year":"1991","gini_index":33.23},{"country":"Panama","year":"1991","gini_index":58.19},{"country":"Philippines","year":"1991","gini_index":43.82},{"country":"Senegal","year":"1991","gini_index":54.14},{"country":"Sri Lanka","year":"1991","gini_index":32.48},{"country":"Argentina","year":"1992","gini_index":45.48},{"country":"Bangladesh","year":"1992","gini_index":27.6},{"country":"Brazil","year":"1992","gini_index":53.99},{"country":"Bulgaria","year":"1992","gini_index":30.71},{"country":"Burundi","year":"1992","gini_index":33.33},{"country":"Central African Republic","year":"1992","gini_index":61.33},{"country":"Chile","year":"1992","gini_index":54.77},{"country":"Colombia","year":"1992","gini_index":51.45},{"country":"Costa Rica","year":"1992","gini_index":45.7},{"country":"Dominican Republic","year":"1992","gini_index":51.36},{"country":"Ghana","year":"1992","gini_index":38.13},{"country":"Honduras","year":"1992","gini_index":51.83},{"country":"Jordan","year":"1992","gini_index":43.36},{"country":"Kenya","year":"1992","gini_index":57.46},{"country":"Lao","year":"1992","gini_index":30.43},{"country":"Malaysia","year":"1992","gini_index":47.65},{"country":"Mexico","year":"1992","gini_index":51.06},{"country":"Moldova","year":"1992","gini_index":34.32},{"country":"Niger","year":"1992","gini_index":36.1},{"country":"Nigeria","year":"1992","gini_index":44.95},{"country":"Poland","year":"1992","gini_index":26.7},{"country":"Romania","year":"1992","gini_index":25.46},{"country":"Slovak Republic","year":"1992","gini_index":19.49},{"country":"Tanzania","year":"1992","gini_index":33.83},{"country":"Thailand","year":"1992","gini_index":47.86},{"country":"Trinidad and Tobago","year":"1992","gini_index":40.27},{"country":"Uganda","year":"1992","gini_index":42.62},{"country":"Ukraine","year":"1992","gini_index":25.71},{"country":"Uruguay","year":"1992","gini_index":40.08},{"country":"Venezuela","year":"1992","gini_index":42.1},{"country":"Argentina","year":"1993","gini_index":44.89},{"country":"Belarus","year":"1993","gini_index":21.6},{"country":"Belize","year":"1993","gini_index":59.94},{"country":"Bolivia","year":"1993","gini_index":53.55},{"country":"Brazil","year":"1993","gini_index":60.8},{"country":"China","year":"1993","gini_index":35.5},{"country":"Costa Rica","year":"1993","gini_index":46.0},{"country":"Cote d'Ivoire","year":"1993","gini_index":36.91},{"country":"Czech Republic","year":"1993","gini_index":26.6},{"country":"Estonia","year":"1993","gini_index":39.5},{"country":"Guinea-Bissau","year":"1993","gini_index":47.84},{"country":"Guyana","year":"1993","gini_index":51.55},{"country":"Honduras","year":"1993","gini_index":53.47},{"country":"Hungary","year":"1993","gini_index":27.94},{"country":"Indonesia","year":"1993","gini_index":29.31},{"country":"Jamaica","year":"1993","gini_index":35.67},{"country":"Japan","year":"1993","gini_index":24.85},{"country":"Kazakhstan","year":"1993","gini_index":32.67},{"country":"Kyrgyz Republic","year":"1993","gini_index":53.7},{"country":"Latvia","year":"1993","gini_index":26.99},{"country":"Lesotho","year":"1993","gini_index":57.94},{"country":"Lithuania","year":"1993","gini_index":33.64},{"country":"Madagascar","year":"1993","gini_index":46.12},{"country":"Mauritania","year":"1993","gini_index":50.05},{"country":"Namibia","year":"1993","gini_index":74.33},{"country":"Nicaragua","year":"1993","gini_index":50.41},{"country":"Poland","year":"1993","gini_index":32.32},{"country":"Russia","year":"1993","gini_index":48.38},{"country":"Slovenia","year":"1993","gini_index":29.18},{"country":"South Africa","year":"1993","gini_index":59.33},{"country":"Turkmenistan","year":"1993","gini_index":35.38},{"country":"Vietnam","year":"1993","gini_index":35.68},{"country":"Zambia","year":"1993","gini_index":52.61},{"country":"Argentina","year":"1994","gini_index":45.96},{"country":"Australia","year":"1994","gini_index":35.19},{"country":"Belize","year":"1994","gini_index":61.3},{"country":"Botswana","year":"1994","gini_index":60.96},{"country":"Bulgaria","year":"1994","gini_index":24.32},{"country":"Burkina Faso","year":"1994","gini_index":50.71},{"country":"Cambodia","year":"1994","gini_index":38.28},{"country":"Chile","year":"1994","gini_index":55.05},{"country":"Costa Rica","year":"1994","gini_index":46.75},{"country":"Ecuador","year":"1994","gini_index":54.32},{"country":"Guinea","year":"1994","gini_index":44.87},{"country":"Honduras","year":"1994","gini_index":55.01},{"country":"India","year":"1994","gini_index":30.82},{"country":"Iran","year":"1994","gini_index":43.0},{"country":"Kenya","year":"1994","gini_index":42.07},{"country":"Lesotho","year":"1994","gini_index":63.16},{"country":"Mali","year":"1994","gini_index":50.56},{"country":"Mexico","year":"1994","gini_index":51.89},{"country":"Niger","year":"1994","gini_index":41.53},{"country":"Peru","year":"1994","gini_index":44.87},{"country":"Philippines","year":"1994","gini_index":42.89},{"country":"Romania","year":"1994","gini_index":28.2},{"country":"Senegal","year":"1994","gini_index":41.44},{"country":"Thailand","year":"1994","gini_index":43.47},{"country":"Turkey","year":"1994","gini_index":41.53},{"country":"Algeria","year":"1995","gini_index":35.33},{"country":"Argentina","year":"1995","gini_index":48.91},{"country":"Azerbaijan","year":"1995","gini_index":34.96},{"country":"Belarus","year":"1995","gini_index":28.76},{"country":"Belize","year":"1995","gini_index":59.54},{"country":"Brazil","year":"1995","gini_index":60.24},{"country":"Bulgaria","year":"1995","gini_index":31.03},{"country":"Costa Rica","year":"1995","gini_index":45.71},{"country":"Cote d'Ivoire","year":"1995","gini_index":36.68},{"country":"Ecuador","year":"1995","gini_index":51.21},{"country":"El Salvador","year":"1995","gini_index":49.88},{"country":"Estonia","year":"1995","gini_index":30.06},{"country":"Ethiopia","year":"1995","gini_index":39.96},{"country":"France","year":"1995","gini_index":32.74},{"country":"Honduras","year":"1995","gini_index":55.49},{"country":"Latvia","year":"1995","gini_index":30.98},{"country":"Malaysia","year":"1995","gini_index":48.52},{"country":"Mongolia","year":"1995","gini_index":33.2},{"country":"Panama","year":"1995","gini_index":57.81},{"country":"Paraguay","year":"1995","gini_index":58.17},{"country":"St. Lucia","year":"1995","gini_index":42.58},{"country":"South Africa","year":"1995","gini_index":56.59},{"country":"Swaziland","year":"1995","gini_index":60.65},{"country":"Tunisia","year":"1995","gini_index":41.66},{"country":"Ukraine","year":"1995","gini_index":39.29},{"country":"Uruguay","year":"1995","gini_index":42.11},{"country":"Venezuela","year":"1995","gini_index":47.21},{"country":"Zimbabwe","year":"1995","gini_index":50.1},{"country":"Argentina","year":"1996","gini_index":49.52},{"country":"Armenia","year":"1996","gini_index":44.42},{"country":"Bangladesh","year":"1996","gini_index":33.46},{"country":"Belize","year":"1996","gini_index":56.89},{"country":"Brazil","year":"1996","gini_index":60.55},{"country":"Cameroon","year":"1996","gini_index":40.68},{"country":"Chile","year":"1996","gini_index":54.88},{"country":"China","year":"1996","gini_index":35.7},{"country":"Colombia","year":"1996","gini_index":56.94},{"country":"Costa Rica","year":"1996","gini_index":46.54},{"country":"Czech Republic","year":"1996","gini_index":25.82},{"country":"Dominican Republic","year":"1996","gini_index":47.43},{"country":"Egypt","year":"1996","gini_index":30.13},{"country":"El Salvador","year":"1996","gini_index":51.2},{"country":"Georgia","year":"1996","gini_index":37.13},{"country":"Honduras","year":"1996","gini_index":55.72},{"country":"Hong Kong, China","year":"1996","gini_index":43.44},{"country":"Indonesia","year":"1996","gini_index":31.33},{"country":"Jamaica","year":"1996","gini_index":40.47},{"country":"Kazakhstan","year":"1996","gini_index":35.32},{"country":"Latvia","year":"1996","gini_index":31.65},{"country":"Lithuania","year":"1996","gini_index":32.26},{"country":"Mauritania","year":"1996","gini_index":37.29},{"country":"Mexico","year":"1996","gini_index":48.54},{"country":"Mozambique","year":"1996","gini_index":44.49},{"country":"Nepal","year":"1996","gini_index":35.23},{"country":"Nigeria","year":"1996","gini_index":46.5},{"country":"Papua New Guinea","year":"1996","gini_index":50.88},{"country":"Poland","year":"1996","gini_index":32.66},{"country":"Russia","year":"1996","gini_index":46.11},{"country":"Slovak Republic","year":"1996","gini_index":25.81},{"country":"Sri Lanka","year":"1996","gini_index":35.41},{"country":"Thailand","year":"1996","gini_index":42.9},{"country":"Uganda","year":"1996","gini_index":37.13},{"country":"Ukraine","year":"1996","gini_index":35.12},{"country":"Uruguay","year":"1996","gini_index":42.66},{"country":"Zambia","year":"1996","gini_index":49.79},{"country":"Albania","year":"1997","gini_index":29.12},{"country":"Argentina","year":"1997","gini_index":49.11},{"country":"Belize","year":"1997","gini_index":57.28},{"country":"Bolivia","year":"1997","gini_index":58.26},{"country":"Brazil","year":"1997","gini_index":60.53},{"country":"Bulgaria","year":"1997","gini_index":26.38},{"country":"Costa Rica","year":"1997","gini_index":45.62},{"country":"Denmark","year":"1997","gini_index":24.7},{"country":"Dominican Republic","year":"1997","gini_index":48.92},{"country":"Georgia","year":"1997","gini_index":41.88},{"country":"Honduras","year":"1997","gini_index":52.73},{"country":"Jordan","year":"1997","gini_index":36.42},{"country":"Kenya","year":"1997","gini_index":42.51},{"country":"Lao","year":"1997","gini_index":34.91},{"country":"Latvia","year":"1997","gini_index":31.72},{"country":"Madagascar","year":"1997","gini_index":39.16},{"country":"Malaysia","year":"1997","gini_index":49.15},{"country":"Moldova","year":"1997","gini_index":36.9},{"country":"New Zealand","year":"1997","gini_index":36.17},{"country":"Pakistan","year":"1997","gini_index":28.65},{"country":"Panama","year":"1997","gini_index":58.26},{"country":"Peru","year":"1997","gini_index":34.78},{"country":"Philippines","year":"1997","gini_index":46.16},{"country":"Portugal","year":"1997","gini_index":38.45},{"country":"Uruguay","year":"1997","gini_index":42.73},{"country":"Argentina","year":"1998","gini_index":50.74},{"country":"Belarus","year":"1998","gini_index":30.28},{"country":"Belize","year":"1998","gini_index":55.01},{"country":"Brazil","year":"1998","gini_index":60.35},{"country":"Burkina Faso","year":"1998","gini_index":46.85},{"country":"Burundi","year":"1998","gini_index":42.39},{"country":"Chile","year":"1998","gini_index":55.54},{"country":"Costa Rica","year":"1998","gini_index":45.67},{"country":"Cote d'Ivoire","year":"1998","gini_index":43.75},{"country":"Croatia","year":"1998","gini_index":26.82},{"country":"Ecuador","year":"1998","gini_index":51.67},{"country":"El Salvador","year":"1998","gini_index":54.52},{"country":"Estonia","year":"1998","gini_index":37.64},{"country":"Gambia","year":"1998","gini_index":50.23},{"country":"Georgia","year":"1998","gini_index":37.26},{"country":"Ghana","year":"1998","gini_index":40.75},{"country":"Guatemala","year":"1998","gini_index":55.8},{"country":"Guyana","year":"1998","gini_index":44.54},{"country":"Honduras","year":"1998","gini_index":57.43},{"country":"Hungary","year":"1998","gini_index":24.93},{"country":"Iran","year":"1998","gini_index":44.1},{"country":"South Korea","year":"1998","gini_index":31.59},{"country":"Kyrgyz Republic","year":"1998","gini_index":35.98},{"country":"Latvia","year":"1998","gini_index":33.52},{"country":"Lithuania","year":"1998","gini_index":30.21},{"country":"Macedonia, FYR","year":"1998","gini_index":28.13},{"country":"Malawi","year":"1998","gini_index":50.31},{"country":"Maldives","year":"1998","gini_index":63.27},{"country":"Mexico","year":"1998","gini_index":48.99},{"country":"Moldova","year":"1998","gini_index":39.47},{"country":"Mongolia","year":"1998","gini_index":30.27},{"country":"Nicaragua","year":"1998","gini_index":45.24},{"country":"Panama","year":"1998","gini_index":57.56},{"country":"Paraguay","year":"1998","gini_index":56.68},{"country":"Peru","year":"1998","gini_index":56.17},{"country":"Poland","year":"1998","gini_index":32.85},{"country":"Romania","year":"1998","gini_index":29.44},{"country":"Singapore","year":"1998","gini_index":42.48},{"country":"Slovenia","year":"1998","gini_index":28.41},{"country":"Thailand","year":"1998","gini_index":41.46},{"country":"Turkmenistan","year":"1998","gini_index":40.77},{"country":"Uruguay","year":"1998","gini_index":43.81},{"country":"Uzbekistan","year":"1998","gini_index":45.28},{"country":"Venezuela","year":"1998","gini_index":48.06},{"country":"Vietnam","year":"1998","gini_index":35.52},{"country":"Yemen","year":"1998","gini_index":33.44},{"country":"Zambia","year":"1998","gini_index":53.44},{"country":"Argentina","year":"1999","gini_index":49.81},{"country":"Armenia","year":"1999","gini_index":36.01},{"country":"Belize","year":"1999","gini_index":53.13},{"country":"Bolivia","year":"1999","gini_index":57.89},{"country":"Brazil","year":"1999","gini_index":59.78},{"country":"China","year":"1999","gini_index":39.23},{"country":"Colombia","year":"1999","gini_index":58.74},{"country":"Costa Rica","year":"1999","gini_index":47.67},{"country":"Croatia","year":"1999","gini_index":27.71},{"country":"Ecuador","year":"1999","gini_index":60.13},{"country":"El Salvador","year":"1999","gini_index":52.24},{"country":"Georgia","year":"1999","gini_index":41.06},{"country":"Honduras","year":"1999","gini_index":55.36},{"country":"Hungary","year":"1999","gini_index":27.77},{"country":"Indonesia","year":"1999","gini_index":28.99},{"country":"Jamaica","year":"1999","gini_index":44.22},{"country":"Madagascar","year":"1999","gini_index":41.81},{"country":"Moldova","year":"1999","gini_index":39.35},{"country":"Morocco","year":"1999","gini_index":39.46},{"country":"Netherlands","year":"1999","gini_index":30.9},{"country":"Pakistan","year":"1999","gini_index":33.02},{"country":"Paraguay","year":"1999","gini_index":56.95},{"country":"Peru","year":"1999","gini_index":56.66},{"country":"Poland","year":"1999","gini_index":33.08},{"country":"Russia","year":"1999","gini_index":37.48},{"country":"Suriname","year":"1999","gini_index":52.88},{"country":"Tajikistan","year":"1999","gini_index":29.01},{"country":"Thailand","year":"1999","gini_index":43.09},{"country":"Uganda","year":"1999","gini_index":43.07},{"country":"Ukraine","year":"1999","gini_index":28.96},{"country":"United Kingdom","year":"1999","gini_index":35.97},{"country":"Venezuela","year":"1999","gini_index":47.76},{"country":"Angola","year":"2000","gini_index":58.64},{"country":"Argentina","year":"2000","gini_index":51.11},{"country":"Austria","year":"2000","gini_index":29.15},{"country":"Bangladesh","year":"2000","gini_index":33.46},{"country":"Belarus","year":"2000","gini_index":30.35},{"country":"Belgium","year":"2000","gini_index":32.97},{"country":"Bolivia","year":"2000","gini_index":62.78},{"country":"Canada","year":"2000","gini_index":32.56},{"country":"Chile","year":"2000","gini_index":55.26},{"country":"Colombia","year":"2000","gini_index":58.68},{"country":"Costa Rica","year":"2000","gini_index":46.53},{"country":"Croatia","year":"2000","gini_index":31.33},{"country":"Dominican Republic","year":"2000","gini_index":52.01},{"country":"Ecuador","year":"2000","gini_index":56.59},{"country":"Egypt","year":"2000","gini_index":32.76},{"country":"Estonia","year":"2000","gini_index":37.0},{"country":"Ethiopia","year":"2000","gini_index":30.0},{"country":"Finland","year":"2000","gini_index":26.88},{"country":"Georgia","year":"2000","gini_index":41.09},{"country":"Germany","year":"2000","gini_index":28.31},{"country":"Greece","year":"2000","gini_index":34.27},{"country":"Guatemala","year":"2000","gini_index":54.28},{"country":"Hungary","year":"2000","gini_index":27.32},{"country":"Ireland","year":"2000","gini_index":34.28},{"country":"Italy","year":"2000","gini_index":36.03},{"country":"Lithuania","year":"2000","gini_index":31.85},{"country":"Luxembourg","year":"2000","gini_index":30.76},{"country":"Macedonia, FYR","year":"2000","gini_index":34.44},{"country":"Mauritania","year":"2000","gini_index":39.04},{"country":"Mexico","year":"2000","gini_index":51.87},{"country":"Micronesia, Fed. Sts.","year":"2000","gini_index":61.1},{"country":"Norway","year":"2000","gini_index":25.79},{"country":"Peru","year":"2000","gini_index":50.75},{"country":"Philippines","year":"2000","gini_index":46.09},{"country":"Poland","year":"2000","gini_index":32.93},{"country":"Romania","year":"2000","gini_index":30.25},{"country":"Rwanda","year":"2000","gini_index":51.51},{"country":"Seychelles","year":"2000","gini_index":42.73},{"country":"South Africa","year":"2000","gini_index":57.77},{"country":"Spain","year":"2000","gini_index":34.66},{"country":"Sweden","year":"2000","gini_index":25.0},{"country":"Switzerland","year":"2000","gini_index":33.68},{"country":"Tanzania","year":"2000","gini_index":34.62},{"country":"Thailand","year":"2000","gini_index":42.84},{"country":"Tunisia","year":"2000","gini_index":40.81},{"country":"United States","year":"2000","gini_index":40.81},{"country":"Uruguay","year":"2000","gini_index":44.39},{"country":"Argentina","year":"2001","gini_index":53.36},{"country":"Armenia","year":"2001","gini_index":36.22},{"country":"Azerbaijan","year":"2001","gini_index":36.5},{"country":"Belarus","year":"2001","gini_index":30.66},{"country":"Bolivia","year":"2001","gini_index":58.54},{"country":"Bosnia and Herzegovina","year":"2001","gini_index":28.03},{"country":"Brazil","year":"2001","gini_index":60.13},{"country":"Bulgaria","year":"2001","gini_index":34.34},{"country":"Cameroon","year":"2001","gini_index":40.41},{"country":"Colombia","year":"2001","gini_index":58.01},{"country":"Costa Rica","year":"2001","gini_index":50.9},{"country":"Croatia","year":"2001","gini_index":31.1},{"country":"Dominican Republic","year":"2001","gini_index":50.43},{"country":"El Salvador","year":"2001","gini_index":53.6},{"country":"Estonia","year":"2001","gini_index":36.9},{"country":"Georgia","year":"2001","gini_index":41.04},{"country":"Haiti","year":"2001","gini_index":59.21},{"country":"Honduras","year":"2001","gini_index":54.38},{"country":"Hungary","year":"2001","gini_index":26.92},{"country":"Israel","year":"2001","gini_index":39.2},{"country":"Kazakhstan","year":"2001","gini_index":41.11},{"country":"Lithuania","year":"2001","gini_index":32.4},{"country":"Madagascar","year":"2001","gini_index":47.47},{"country":"Mali","year":"2001","gini_index":40.01},{"country":"Moldova","year":"2001","gini_index":38.59},{"country":"Morocco","year":"2001","gini_index":40.63},{"country":"Nicaragua","year":"2001","gini_index":43.06},{"country":"Panama","year":"2001","gini_index":57.3},{"country":"Paraguay","year":"2001","gini_index":56.15},{"country":"Peru","year":"2001","gini_index":54.06},{"country":"Poland","year":"2001","gini_index":32.84},{"country":"Romania","year":"2001","gini_index":30.57},{"country":"Russia","year":"2001","gini_index":39.6},{"country":"Sao Tome and Principe","year":"2001","gini_index":50.82},{"country":"Senegal","year":"2001","gini_index":41.25},{"country":"Swaziland","year":"2001","gini_index":50.68},{"country":"Timor-Leste","year":"2001","gini_index":39.52},{"country":"Uruguay","year":"2001","gini_index":46.17},{"country":"Venezuela","year":"2001","gini_index":47.23},{"country":"Albania","year":"2002","gini_index":28.15},{"country":"Argentina","year":"2002","gini_index":53.79},{"country":"Armenia","year":"2002","gini_index":35.66},{"country":"Belarus","year":"2002","gini_index":29.97},{"country":"Bolivia","year":"2002","gini_index":59.94},{"country":"Brazil","year":"2002","gini_index":59.42},{"country":"Cape Verde","year":"2002","gini_index":50.52},{"country":"China","year":"2002","gini_index":42.59},{"country":"Colombia","year":"2002","gini_index":60.68},{"country":"Costa Rica","year":"2002","gini_index":50.72},{"country":"Cote d'Ivoire","year":"2002","gini_index":48.39},{"country":"Djibouti","year":"2002","gini_index":39.96},{"country":"Dominican Republic","year":"2002","gini_index":50.12},{"country":"El Salvador","year":"2002","gini_index":53.1},{"country":"Estonia","year":"2002","gini_index":36.81},{"country":"Georgia","year":"2002","gini_index":40.31},{"country":"Guatemala","year":"2002","gini_index":59.19},{"country":"Guinea-Bissau","year":"2002","gini_index":35.52},{"country":"Honduras","year":"2002","gini_index":58.89},{"country":"Hungary","year":"2002","gini_index":26.82},{"country":"Indonesia","year":"2002","gini_index":29.74},{"country":"Jamaica","year":"2002","gini_index":48.34},{"country":"Kazakhstan","year":"2002","gini_index":34.95},{"country":"Kyrgyz Republic","year":"2002","gini_index":31.67},{"country":"Lao","year":"2002","gini_index":32.63},{"country":"Latvia","year":"2002","gini_index":35.91},{"country":"Lithuania","year":"2002","gini_index":32.33},{"country":"Macedonia, FYR","year":"2002","gini_index":38.75},{"country":"Mexico","year":"2002","gini_index":49.68},{"country":"Moldova","year":"2002","gini_index":36.87},{"country":"Mongolia","year":"2002","gini_index":32.84},{"country":"Pakistan","year":"2002","gini_index":30.39},{"country":"Panama","year":"2002","gini_index":56.64},{"country":"Paraguay","year":"2002","gini_index":56.67},{"country":"Peru","year":"2002","gini_index":55.64},{"country":"Poland","year":"2002","gini_index":34.05},{"country":"Romania","year":"2002","gini_index":31.46},{"country":"Russia","year":"2002","gini_index":35.7},{"country":"Serbia","year":"2002","gini_index":32.74},{"country":"Slovenia","year":"2002","gini_index":29.15},{"country":"Sri Lanka","year":"2002","gini_index":41.06},{"country":"Thailand","year":"2002","gini_index":41.98},{"country":"Turkey","year":"2002","gini_index":42.71},{"country":"Uganda","year":"2002","gini_index":45.77},{"country":"Ukraine","year":"2002","gini_index":28.28},{"country":"Uruguay","year":"2002","gini_index":46.66},{"country":"Uzbekistan","year":"2002","gini_index":34.55},{"country":"Venezuela","year":"2002","gini_index":49.01},{"country":"Vietnam","year":"2002","gini_index":37.55},{"country":"Argentina","year":"2003","gini_index":54.72},{"country":"Armenia","year":"2003","gini_index":33.8},{"country":"Benin","year":"2003","gini_index":38.62},{"country":"Bhutan","year":"2003","gini_index":46.83},{"country":"Brazil","year":"2003","gini_index":58.78},{"country":"Bulgaria","year":"2003","gini_index":29.22},{"country":"Burkina Faso","year":"2003","gini_index":39.6},{"country":"Central African Republic","year":"2003","gini_index":43.57},{"country":"Chad","year":"2003","gini_index":39.78},{"country":"Chile","year":"2003","gini_index":54.64},{"country":"Colombia","year":"2003","gini_index":57.86},{"country":"Costa Rica","year":"2003","gini_index":49.74},{"country":"Dominican Republic","year":"2003","gini_index":52.09},{"country":"Ecuador","year":"2003","gini_index":55.06},{"country":"El Salvador","year":"2003","gini_index":50.72},{"country":"Estonia","year":"2003","gini_index":35.78},{"country":"Fiji","year":"2003","gini_index":46.81},{"country":"Gambia","year":"2003","gini_index":47.28},{"country":"Georgia","year":"2003","gini_index":40.37},{"country":"Guatemala","year":"2003","gini_index":56.08},{"country":"Guinea","year":"2003","gini_index":40.3},{"country":"Honduras","year":"2003","gini_index":58.71},{"country":"Jordan","year":"2003","gini_index":38.87},{"country":"Kazakhstan","year":"2003","gini_index":33.85},{"country":"Latvia","year":"2003","gini_index":37.66},{"country":"Lesotho","year":"2003","gini_index":52.5},{"country":"Macedonia, FYR","year":"2003","gini_index":38.95},{"country":"Moldova","year":"2003","gini_index":35.55},{"country":"Mozambique","year":"2003","gini_index":47.11},{"country":"Nepal","year":"2003","gini_index":43.83},{"country":"Panama","year":"2003","gini_index":56.31},{"country":"Paraguay","year":"2003","gini_index":56.88},{"country":"Peru","year":"2003","gini_index":55.22},{"country":"Philippines","year":"2003","gini_index":44.48},{"country":"Romania","year":"2003","gini_index":31.06},{"country":"Russia","year":"2003","gini_index":37.26},{"country":"Serbia","year":"2003","gini_index":32.81},{"country":"Sierra Leone","year":"2003","gini_index":42.52},{"country":"Slovenia","year":"2003","gini_index":30.82},{"country":"Tajikistan","year":"2003","gini_index":32.62},{"country":"Turkey","year":"2003","gini_index":43.42},{"country":"Ukraine","year":"2003","gini_index":28.05},{"country":"Uruguay","year":"2003","gini_index":46.22},{"country":"Uzbekistan","year":"2003","gini_index":36.72},{"country":"Venezuela","year":"2003","gini_index":48.1},{"country":"Zambia","year":"2003","gini_index":42.08},{"country":"Albania","year":"2004","gini_index":31.09},{"country":"Argentina","year":"2004","gini_index":50.18},{"country":"Armenia","year":"2004","gini_index":37.79},{"country":"Belarus","year":"2004","gini_index":26.22},{"country":"Bosnia and Herzegovina","year":"2004","gini_index":35.78},{"country":"Brazil","year":"2004","gini_index":57.68},{"country":"Cambodia","year":"2004","gini_index":41.85},{"country":"Colombia","year":"2004","gini_index":58.29},{"country":"Comoros","year":"2004","gini_index":64.3},{"country":"Costa Rica","year":"2004","gini_index":48.69},{"country":"Croatia","year":"2004","gini_index":28.99},{"country":"Dominican Republic","year":"2004","gini_index":51.95},{"country":"El Salvador","year":"2004","gini_index":49.0},{"country":"Estonia","year":"2004","gini_index":36.0},{"country":"Guatemala","year":"2004","gini_index":54.5},{"country":"Honduras","year":"2004","gini_index":58.49},{"country":"Hungary","year":"2004","gini_index":30.04},{"country":"Jamaica","year":"2004","gini_index":45.51},{"country":"Kazakhstan","year":"2004","gini_index":32.25},{"country":"Kyrgyz Republic","year":"2004","gini_index":34.78},{"country":"Latvia","year":"2004","gini_index":35.73},{"country":"Lithuania","year":"2004","gini_index":35.81},{"country":"Macedonia, FYR","year":"2004","gini_index":38.85},{"country":"Malawi","year":"2004","gini_index":39.02},{"country":"Malaysia","year":"2004","gini_index":37.91},{"country":"Maldives","year":"2004","gini_index":37.37},{"country":"Mauritania","year":"2004","gini_index":41.26},{"country":"Mexico","year":"2004","gini_index":46.05},{"country":"Moldova","year":"2004","gini_index":35.96},{"country":"Namibia","year":"2004","gini_index":63.9},{"country":"Nigeria","year":"2004","gini_index":42.93},{"country":"Panama","year":"2004","gini_index":55.0},{"country":"Paraguay","year":"2004","gini_index":54.0},{"country":"Peru","year":"2004","gini_index":50.34},{"country":"Poland","year":"2004","gini_index":35.88},{"country":"Romania","year":"2004","gini_index":31.66},{"country":"Russia","year":"2004","gini_index":37.14},{"country":"Serbia","year":"2004","gini_index":32.94},{"country":"Slovak Republic","year":"2004","gini_index":29.08},{"country":"Slovenia","year":"2004","gini_index":31.15},{"country":"Syria","year":"2004","gini_index":35.78},{"country":"Tajikistan","year":"2004","gini_index":33.61},{"country":"Turkey","year":"2004","gini_index":42.67},{"country":"Ukraine","year":"2004","gini_index":28.11},{"country":"Uruguay","year":"2004","gini_index":47.13},{"country":"Venezuela","year":"2004","gini_index":47.5},{"country":"Vietnam","year":"2004","gini_index":36.81},{"country":"Zambia","year":"2004","gini_index":50.74},{"country":"Albania","year":"2005","gini_index":33.03},{"country":"Argentina","year":"2005","gini_index":49.28},{"country":"Armenia","year":"2005","gini_index":36.16},{"country":"Bangladesh","year":"2005","gini_index":33.22},{"country":"Belarus","year":"2005","gini_index":27.92},{"country":"Bolivia","year":"2005","gini_index":57.79},{"country":"Brazil","year":"2005","gini_index":57.42},{"country":"China","year":"2005","gini_index":42.48},{"country":"Colombia","year":"2005","gini_index":56.12},{"country":"Congo, Rep.","year":"2005","gini_index":47.32},{"country":"Costa Rica","year":"2005","gini_index":47.63},{"country":"Dominican Republic","year":"2005","gini_index":51.06},{"country":"Ecuador","year":"2005","gini_index":54.14},{"country":"Egypt","year":"2005","gini_index":32.14},{"country":"El Salvador","year":"2005","gini_index":50.33},{"country":"Ethiopia","year":"2005","gini_index":29.83},{"country":"Gabon","year":"2005","gini_index":41.45},{"country":"Georgia","year":"2005","gini_index":41.05},{"country":"Honduras","year":"2005","gini_index":59.65},{"country":"India","year":"2005","gini_index":33.38},{"country":"Indonesia","year":"2005","gini_index":34.01},{"country":"Iran","year":"2005","gini_index":38.28},{"country":"Kenya","year":"2005","gini_index":47.68},{"country":"Kyrgyz Republic","year":"2005","gini_index":39.49},{"country":"Macedonia, FYR","year":"2005","gini_index":39.13},{"country":"Madagascar","year":"2005","gini_index":47.24},{"country":"Moldova","year":"2005","gini_index":36.28},{"country":"Montenegro","year":"2005","gini_index":30.12},{"country":"Nicaragua","year":"2005","gini_index":40.47},{"country":"Niger","year":"2005","gini_index":43.89},{"country":"Pakistan","year":"2005","gini_index":31.18},{"country":"Panama","year":"2005","gini_index":54.0},{"country":"Paraguay","year":"2005","gini_index":52.45},{"country":"Peru","year":"2005","gini_index":51.11},{"country":"Poland","year":"2005","gini_index":34.92},{"country":"Romania","year":"2005","gini_index":31.57},{"country":"Russia","year":"2005","gini_index":37.51},{"country":"Senegal","year":"2005","gini_index":39.19},{"country":"Serbia","year":"2005","gini_index":33.4},{"country":"Slovak Republic","year":"2005","gini_index":29.84},{"country":"Tunisia","year":"2005","gini_index":41.42},{"country":"Turkey","year":"2005","gini_index":42.56},{"country":"Ukraine","year":"2005","gini_index":28.21},{"country":"Uruguay","year":"2005","gini_index":45.87},{"country":"Venezuela","year":"2005","gini_index":49.46},{"country":"Yemen","year":"2005","gini_index":37.69},{"country":"Argentina","year":"2006","gini_index":47.72},{"country":"Armenia","year":"2006","gini_index":32.84},{"country":"Belarus","year":"2006","gini_index":28.63},{"country":"Bolivia","year":"2006","gini_index":56.38},{"country":"Brazil","year":"2006","gini_index":56.77},{"country":"Burundi","year":"2006","gini_index":33.27},{"country":"Chile","year":"2006","gini_index":51.84},{"country":"Colombia","year":"2006","gini_index":58.66},{"country":"Congo, Dem. Rep.","year":"2006","gini_index":44.43},{"country":"Costa Rica","year":"2006","gini_index":49.14},{"country":"Dominican Republic","year":"2006","gini_index":51.9},{"country":"Ecuador","year":"2006","gini_index":53.2},{"country":"El Salvador","year":"2006","gini_index":46.19},{"country":"Georgia","year":"2006","gini_index":41.11},{"country":"Ghana","year":"2006","gini_index":42.76},{"country":"Guatemala","year":"2006","gini_index":55.89},{"country":"Honduras","year":"2006","gini_index":57.56},{"country":"Jordan","year":"2006","gini_index":37.72},{"country":"Kazakhstan","year":"2006","gini_index":30.76},{"country":"Kyrgyz Republic","year":"2006","gini_index":38.69},{"country":"Macedonia, FYR","year":"2006","gini_index":42.78},{"country":"Mali","year":"2006","gini_index":38.99},{"country":"Mexico","year":"2006","gini_index":48.11},{"country":"Moldova","year":"2006","gini_index":36.13},{"country":"Montenegro","year":"2006","gini_index":29.33},{"country":"Pakistan","year":"2006","gini_index":32.74},{"country":"Panama","year":"2006","gini_index":55.06},{"country":"Paraguay","year":"2006","gini_index":54.85},{"country":"Peru","year":"2006","gini_index":50.87},{"country":"Philippines","year":"2006","gini_index":44.04},{"country":"Poland","year":"2006","gini_index":34.13},{"country":"Romania","year":"2006","gini_index":32.11},{"country":"Russia","year":"2006","gini_index":42.13},{"country":"Rwanda","year":"2006","gini_index":53.09},{"country":"Serbia","year":"2006","gini_index":29.63},{"country":"Slovak Republic","year":"2006","gini_index":27.66},{"country":"South Africa","year":"2006","gini_index":67.4},{"country":"Thailand","year":"2006","gini_index":42.35},{"country":"Togo","year":"2006","gini_index":34.41},{"country":"Turkey","year":"2006","gini_index":40.34},{"country":"Uganda","year":"2006","gini_index":42.62},{"country":"Ukraine","year":"2006","gini_index":29.65},{"country":"Uruguay","year":"2006","gini_index":47.2},{"country":"Venezuela","year":"2006","gini_index":44.77},{"country":"Vietnam","year":"2006","gini_index":35.75},{"country":"Zambia","year":"2006","gini_index":54.63},{"country":"Argentina","year":"2007","gini_index":47.37},{"country":"Armenia","year":"2007","gini_index":30.23},{"country":"Belarus","year":"2007","gini_index":28.74},{"country":"Bhutan","year":"2007","gini_index":38.06},{"country":"Bolivia","year":"2007","gini_index":57.44},{"country":"Bosnia and Herzegovina","year":"2007","gini_index":36.21},{"country":"Brazil","year":"2007","gini_index":55.89},{"country":"Bulgaria","year":"2007","gini_index":28.19},{"country":"Cambodia","year":"2007","gini_index":44.37},{"country":"Cameroon","year":"2007","gini_index":38.91},{"country":"Colombia","year":"2007","gini_index":58.88},{"country":"Costa Rica","year":"2007","gini_index":49.25},{"country":"Dominican Republic","year":"2007","gini_index":48.69},{"country":"Ecuador","year":"2007","gini_index":54.31},{"country":"El Salvador","year":"2007","gini_index":46.97},{"country":"Georgia","year":"2007","gini_index":39.37},{"country":"Guinea","year":"2007","gini_index":39.35},{"country":"Honduras","year":"2007","gini_index":56.16},{"country":"Hungary","year":"2007","gini_index":31.18},{"country":"Iraq","year":"2007","gini_index":30.86},{"country":"Kazakhstan","year":"2007","gini_index":30.88},{"country":"Kyrgyz Republic","year":"2007","gini_index":33.43},{"country":"Latvia","year":"2007","gini_index":36.27},{"country":"Liberia","year":"2007","gini_index":38.16},{"country":"Malaysia","year":"2007","gini_index":46.0},{"country":"Moldova","year":"2007","gini_index":35.27},{"country":"Montenegro","year":"2007","gini_index":30.83},{"country":"Morocco","year":"2007","gini_index":40.88},{"country":"Paraguay","year":"2007","gini_index":53.31},{"country":"Peru","year":"2007","gini_index":51.65},{"country":"Poland","year":"2007","gini_index":34.02},{"country":"Qatar","year":"2007","gini_index":41.1},{"country":"Romania","year":"2007","gini_index":32.1},{"country":"Russia","year":"2007","gini_index":43.71},{"country":"Serbia","year":"2007","gini_index":29.4},{"country":"Seychelles","year":"2007","gini_index":65.77},{"country":"Slovak Republic","year":"2007","gini_index":28.13},{"country":"Sri Lanka","year":"2007","gini_index":40.26},{"country":"Tajikistan","year":"2007","gini_index":32.55},{"country":"Tanzania","year":"2007","gini_index":37.58},{"country":"Timor-Leste","year":"2007","gini_index":31.93},{"country":"Turkey","year":"2007","gini_index":39.26},{"country":"Ukraine","year":"2007","gini_index":29.56},{"country":"Uruguay","year":"2007","gini_index":47.63},{"country":"West Bank and Gaza","year":"2007","gini_index":38.65},{"country":"Afghanistan","year":"2008","gini_index":27.82},{"country":"Albania","year":"2008","gini_index":34.51},{"country":"Argentina","year":"2008","gini_index":46.26},{"country":"Armenia","year":"2008","gini_index":30.86},{"country":"Azerbaijan","year":"2008","gini_index":33.71},{"country":"Belarus","year":"2008","gini_index":27.22},{"country":"Bolivia","year":"2008","gini_index":56.29},{"country":"Brazil","year":"2008","gini_index":55.07},{"country":"Cambodia","year":"2008","gini_index":37.85},{"country":"Central African Republic","year":"2008","gini_index":56.3},{"country":"Colombia","year":"2008","gini_index":57.23},{"country":"Costa Rica","year":"2008","gini_index":48.87},{"country":"Cote d'Ivoire","year":"2008","gini_index":41.5},{"country":"Croatia","year":"2008","gini_index":33.65},{"country":"Dominican Republic","year":"2008","gini_index":49.0},{"country":"Ecuador","year":"2008","gini_index":50.62},{"country":"Egypt","year":"2008","gini_index":30.77},{"country":"El Salvador","year":"2008","gini_index":46.75},{"country":"Georgia","year":"2008","gini_index":41.34},{"country":"Honduras","year":"2008","gini_index":61.33},{"country":"Jordan","year":"2008","gini_index":33.82},{"country":"Kazakhstan","year":"2008","gini_index":29.33},{"country":"Kyrgyz Republic","year":"2008","gini_index":37.29},{"country":"Lao","year":"2008","gini_index":36.74},{"country":"Latvia","year":"2008","gini_index":36.61},{"country":"Lithuania","year":"2008","gini_index":37.57},{"country":"Macedonia, FYR","year":"2008","gini_index":44.2},{"country":"Mauritania","year":"2008","gini_index":40.46},{"country":"Mexico","year":"2008","gini_index":48.28},{"country":"Moldova","year":"2008","gini_index":35.3},{"country":"Mongolia","year":"2008","gini_index":36.52},{"country":"Montenegro","year":"2008","gini_index":29.99},{"country":"Mozambique","year":"2008","gini_index":45.66},{"country":"Niger","year":"2008","gini_index":34.55},{"country":"Pakistan","year":"2008","gini_index":30.02},{"country":"Paraguay","year":"2008","gini_index":52.05},{"country":"Peru","year":"2008","gini_index":48.95},{"country":"Poland","year":"2008","gini_index":34.21},{"country":"Romania","year":"2008","gini_index":31.15},{"country":"Russia","year":"2008","gini_index":42.27},{"country":"Serbia","year":"2008","gini_index":28.16},{"country":"Slovak Republic","year":"2008","gini_index":26.86},{"country":"Thailand","year":"2008","gini_index":40.51},{"country":"Turkey","year":"2008","gini_index":38.95},{"country":"Ukraine","year":"2008","gini_index":27.51},{"country":"Uruguay","year":"2008","gini_index":46.27},{"country":"Vietnam","year":"2008","gini_index":35.57},{"country":"Argentina","year":"2009","gini_index":46.13},{"country":"Brazil","year":"2009","gini_index":54.69},{"country":"Burkina Faso","year":"2009","gini_index":39.79},{"country":"Chile","year":"2009","gini_index":52.06},{"country":"Colombia","year":"2009","gini_index":56.67},{"country":"Costa Rica","year":"2009","gini_index":50.73},{"country":"Dominican Republic","year":"2009","gini_index":48.86},{"country":"Ecuador","year":"2009","gini_index":49.43},{"country":"El Salvador","year":"2009","gini_index":48.33},{"country":"Fiji","year":"2009","gini_index":42.83},{"country":"Honduras","year":"2009","gini_index":56.95},{"country":"Kazakhstan","year":"2009","gini_index":29.04},{"country":"Kyrgyz Republic","year":"2009","gini_index":36.19},{"country":"Macedonia, FYR","year":"2009","gini_index":43.17},{"country":"Malaysia","year":"2009","gini_index":46.21},{"country":"Moldova","year":"2009","gini_index":34.02},{"country":"Panama","year":"2009","gini_index":52.03},{"country":"Paraguay","year":"2009","gini_index":51.04},{"country":"Peru","year":"2009","gini_index":49.05},{"country":"Philippines","year":"2009","gini_index":42.98},{"country":"Poland","year":"2009","gini_index":34.07},{"country":"Romania","year":"2009","gini_index":30.0},{"country":"Russia","year":"2009","gini_index":40.11},{"country":"Serbia","year":"2009","gini_index":27.8},{"country":"Slovak Republic","year":"2009","gini_index":26.0},{"country":"South Africa","year":"2009","gini_index":63.14},{"country":"Sudan","year":"2009","gini_index":35.29},{"country":"Tajikistan","year":"2009","gini_index":30.83},{"country":"Thailand","year":"2009","gini_index":40.02},{"country":"Uganda","year":"2009","gini_index":44.3},{"country":"Ukraine","year":"2009","gini_index":26.44},{"country":"Uruguay","year":"2009","gini_index":46.28},{"country":"West Bank and Gaza","year":"2009","gini_index":35.5},{"country":"South Sudan","year":"2009","gini_index":45.53},{"country":"Argentina","year":"2010","gini_index":44.49},{"country":"Bangladesh","year":"2010","gini_index":32.12},{"country":"Colombia","year":"2010","gini_index":55.91},{"country":"Dominican Republic","year":"2010","gini_index":47.2},{"country":"Ecuador","year":"2010","gini_index":49.26},{"country":"Jordan","year":"2010","gini_index":35.43},{"country":"Madagascar","year":"2010","gini_index":44.11},{"country":"Mali","year":"2010","gini_index":33.02},{"country":"Moldova","year":"2010","gini_index":33.03},{"country":"Nepal","year":"2010","gini_index":32.82},{"country":"Nigeria","year":"2010","gini_index":48.83},{"country":"Panama","year":"2010","gini_index":51.92},{"country":"Paraguay","year":"2010","gini_index":52.42},{"country":"Peru","year":"2010","gini_index":48.14},{"country":"Swaziland","year":"2010","gini_index":51.49},{"country":"Uruguay","year":"2010","gini_index":45.32}]
MIT License
Copyright (c) 2017 Iain Dillingham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment