carte = {
const svg = d3
.select(DOM.svg(1200, 800))
.attr('id', 'carte')
.style("width", "100%")
.style("height", "auto");
const path = d3
.geoPath()
.projection(
d3.geoMercator().fitExtent([[20, 20], [1200 - 20, 800 - 20]], data)
);
svg
.selectAll('path')
.data(data.features)
.enter()
.append('path')
.attr('d', path)
.style('fill', d =>
d.properties.commune.length % 2 === 0 ? 'blue' : 'red'
)
.style('stroke', 'white')
.append("title")
.text(d => d.properties.commune);
return svg.node();
}