{
let width = 960;
let height = 600;
let svg = d3.select(DOM.svg(width, height));
let g = svg.append("g")
.call(legend);
tooltip
const twitterById = {};
const ProtwitterById = {};
boston_311.forEach(d => (twitterById[d.id] = +Math.log(d.twitter)));
newboston_311.forEach(d => (ProtwitterById[d.id] = d3.format("%")(d.pro_twitter)));
g.selectAll("path")
.data(topojson.feature(Boston, Boston.objects.boston_neigh).features)
.enter().append("path")
.attr("d", bos_geoPath)
.style("fill", d => color(twitterById[d.properties.OBJECTID]))
.style("stroke", "white")
.on("mouseover",d=>tooltip.style("visibility","visible").text(d.properties.Name))
.on("mousemove", d=>tooltip.style("top",(d3.event.pageY-10)+"px").style("left",(d3.event.pageX+10)+"px").text(d.properties.Name + ":"+ ProtwitterById[d.properties.OBJECTID]))
.on("mouseout", d=>tooltip.style("visibility", "hidden"));
return svg.node();
}