chart = {
const width = 960;
const height = 600;
const center = d3.geoCentroid(hex_data);
const scale = 7000;
const offset = [width/2, height/2];
const projection = d3.geoEquirectangular().scale(scale).center(center)
.translate(offset);
const path = d3.geoPath().projection(projection);
const colorScale = d3.scaleSequential()
.domain([d3.max(hex_data.features, d => d.properties.total), d3.min(hex_data.features, d => d.properties.total)])
.interpolator(d3.interpolateInferno);
const svg = d3.select(DOM.svg(width, height))
.style("width", "100%")
.style("height", "auto");
svg.append("g")
.selectAll("path")
.data(hex_data.features)
.enter().append("path")
.attr("d", path)
.attr("stroke", "white")
.attr("stroke-width", "1.5")
.attr("fill", function(d){return colorScale(+d.properties.total)});
console.log(d3.max(hex_data.features, d => d.properties.total));
return svg.node();
}