{
let svg = d3.select(DOM.svg(width, height_map));
let g = svg.append("g");
let value = null;
const neigh = {}
csv311b.forEach(d => (neigh[d.id] = Math.log(d["tot_count \t\t\t"])));
const outline = svg.append("path")
.attr("fill", "none")
.attr("stroke", "red")
.attr("stroke-width", "3px")
.attr("stroke-linejoin", "round")
.attr("pointer-events", "none");
g.selectAll("path")
.data(topojson.feature(bostonjson, bostonjson.objects.boston_neigh).features)
.enter().append("path")
.attr("d", path)
.style("fill", d => color(neigh[d.properties.OBJECTID]))
.style("stroke", "white")
.on("click", d => {
const node = svg.node();
node.value = value = value === d.properties.OBJECTID ? null : d.properties.OBJECTID;
node.dispatchEvent(new CustomEvent("input"));
outline.attr("d", value ? path(d) : null);
});
svg.append("g")
.attr("transform", "translate(600,40)")
.call(legend);
return Object.assign(svg.node(), {value: null});
}