Create beautiful and interactive
maps with d3.js

You know d3.js for it's power and flexibility creating interactive charts.
But d3.js is also great for creating interactive maps.
The code below is all you need to get started creating a simple map with d3.js. Not that complicated, right?

 1d3.json('data.geojson').then(function(bb) {
 2  let width = 200, height = 200;
 3  let projection = d3.geoEqualEarth();
 4  projection.fitSize([width, height], bb);
 5  let geoGenerator = d3.geoPath()
 6  .projection(projection);
 7
 8  let svg = d3.select("body").append('svg')
 9  .style("width", width).style("height", height);
10
11  svg.append('g').selectAll('path')
12  .data(bb.features)
13  .join('path')
14  .attr('d', geoGenerator)
15  .attr('fill', '#088')
16  .attr('stroke', '#000');
17});