Public
Edited
May 2, 2023
8 forks
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const context = DOM.context2d(width, height);
path.context(context);
context.beginPath();
context.fillStyle = "tomato";
path(circle());
context.fill();
context.beginPath();
context.strokeStyle = "black";
path(land);
context.stroke();
return context.canvas;
}
Insert cell
circle = d3.geoCircle()
.center([lon, lat])
.radius(radius / (6371 * Math.PI * 2) * 360)
.precision(precision);
Insert cell
projection = d3.geoNaturalEarth1()
.fitSize([width, height], {type: "Sphere"});
Insert cell
path = d3.geoPath()
.projection(projection);
Insert cell
height = width * .57;
Insert cell
land = FileAttachment("ne_110m_land.json").json();
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