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.geomap.choropleth()
    .geofile('/d3-geomap/topojson/world/countries.json')
    .colors(['green','red'])
    .column('1800')
    .domain([0, 1])
    .legend(false)
    .unitId('Country');

d3.csv('/data/custom-domain.csv', function(error, data) {
    d3.select('#map')
        .datum(data)
        .call(map.draw, map);
});

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.

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

Example Maps