chart = {
const scale = 3
const path = d3.geoPath().projection(
d3.geoTransform({
point(x, y) {
return this.stream.point(...convertPoint(x, y))
}
})
)
const svg = d3.select(DOM.svg(mapSize.width, mapSize.height))
const states = svg.append('g')
states
.append('path')
.datum(northeast)
.attr('fill', '#ddd')
.attr('d', path)
states
.append('path')
.datum(topojson.mesh(us, us.objects.northeast, (a, b) => a !== b))
.attr('fill', 'none')
.attr('stroke', 'white')
.attr('stroke-linejoin', 'round')
.attr('d', path)
svg
.append('g')
.selectAll('circle')
.data(data)
.join('circle')
.attr('transform', d => `translate(${convertPoint(...projection([d.longitude, d.latitude]))})`)
.attr('fill', d => d.color)
.attr('opacity', 0.4)
.attr('r', 3)
return svg.node()
}