Public
Edited
Jan 17
Insert cell
Insert cell
viewof blend = Inputs.range([0, 1], { value: 0, step: 0.1, label: "Blend" })
Insert cell
Plot.plot({
projection: mixed,
width,
marks: [Plot.geo(land, { fill: "#000" }), Plot.graticule(), Plot.sphere()]
})
Insert cell
mixed = d3
.geoProjection(function (x, y) {
const mercatorPoint = [x, Math.log(Math.tan(Math.PI / 4 + y / 2))];
const orthoPoint = [Math.cos(y) * Math.sin(x), Math.sin(y)];
return [
mercatorPoint[0] * blend + orthoPoint[0] * (1 - blend),
mercatorPoint[1] * blend + orthoPoint[1] * (1 - blend)
];
})
.scale(250)
.translate([width / 2, 350 + 60 * blend])
.clipAngle(85 + 5 * blend)
Insert cell
land = topojson.feature(land50m, land50m.objects.land)
Insert cell
land50m = FileAttachment("land-50m.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