{
let width = 750
let height = 600
let top_buffer = 50
const bosProjection = d3.geoAlbers()
.scale( 190000 )
.rotate( [71.057,0] )
.center( [0, 42.313] )
.translate( [width/2,(height/2 + top_buffer)] )
const bos_geoPath = d3.geoPath()
.projection( bosProjection )
const tweetsbyneigh = {};
bos311.forEach(d => (tweetsbyneigh[d.Name] = +d.twitter));
let svg = d3.select(DOM.svg(width, height))
svg.append("g")
.attr("transform", "translate(400,30)")
.call(legend);
tooltip
svg.selectAll( "path" )
.data( topojson.feature(bosNeighborhoods, bosNeighborhoods.objects.boston_neigh).features )
.enter()
.append( "path" )
.attr( "fill", d => color(Math.log(tweetsbyneigh[d.properties.Name])) )
.attr( "stroke", "#333")
.attr( "d", bos_geoPath )
.on("mouseover", d => tooltip.style("visibility", "visible").text(d.properties.Name + ": " + tweetsbyneigh[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 + ": " + tweetsbyneigh[d.properties.Name]))
.on("mouseout", d => tooltip.style("visibility", "hidden"))
return svg.node()
}