Choropleth Map with Custom Data Domain

A map demonstrating how to use a custom data domain, as an example for this question on StackOverflow.

See the complete JavaScript code needed to render the map below.

var map = d3.choropleth()
    .geofile('/d3-geomap/topojson/world/countries.json')
    .colors(['green','red'])
    .column('1800')
    .domain([0, 1])
    .legend(false)
    .unitId('iso3');

d3.csv('/data/custom-domain.csv').then(data => {
    map.draw(d3.select('#map').datum(data));
});

Data

See an excerpt of the data used in this map below. Currently CSV is the only supported data format for creating choropleth maps with d3-geomap.

iso3,1800,1801,1802
AGO,0,0,0
ARG,0,0,1
AUS,0,0,0
AUT,,0,0
ESP,NaN,0,0
...

Example Maps