Published
Edited
Dec 19, 2019
1 fork
13 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nicolosi = d3.geoNicolosi()
.rotate([110])
.clipAngle(90)
.precision(.1)
.fitExtent([[0, 0], [width - padding * 2, height - padding * 2]], {type: "Sphere"})
Insert cell
stereo = d3.geoStereographic()
.rotate([110])
.clipAngle(90)
.precision(.1)
.fitExtent([[0, 0], [width - padding * 2, height - padding * 2]], {type: "Sphere"})
Insert cell
nicolosi_stereo = mutator(mutate)
.rotate([110])
.clipAngle(90)
.precision(.1)
.fitExtent([[0, 0], [width - padding * 2, height - padding * 2]], {type: "Sphere"})
Insert cell
mutator = d3.geoProjectionMutator(
interpolateProjection(d3.geoNicolosiRaw, d3.geoStereographicRaw)
)
Insert cell
function interpolateProjection(p0, p1) {
return t => {
return (x, y) => {
const [x0, y0] = p0(x, y);
const [x1, y1] = p1(x, y);
return [(1 - t) * x0 + t * x1, (1 - t) * y0 + t * y1];
};
};
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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