Published
Edited
Nov 19, 2018
Insert cell
Insert cell
map = {
const width = 400;
const height = 400;
const svg = d3.select(DOM.svg(width, height))
// solution
const projection = d3.geoEqualEarth();
projection.fitExtent([[40,40],[width,height]],bounds)
svg.selectAll('circle')
.data([data])
.enter()
.append('circle')
.attr('cx', projection(data)[0])
.attr('cy', projection(data)[1])
.attr('r',5)
.attr('fill','red');
return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more