Published
Edited
Feb 12, 2020
1 fork
1 star
Insert cell
md`# Great circle points via d3.geoInterpolate`
Insert cell
radius = 200
Insert cell
height = width * .57;
Insert cell
Insert cell
Insert cell
Insert cell
seattle = [-122, 47];
Insert cell
newyork = [-74,40]
Insert cell
tokyo = [139.7, 35.6]
Insert cell
it = d3.geoInterpolate(seattle, newyork);
Insert cell
projection = d3.geoEquirectangular()
.fitSize([width, height], {type: "Sphere"});
Insert cell
path = d3.geoPath()
.projection(projection);
Insert cell
fraction
Insert cell
coords = it(fraction)
Insert cell
distanceMiles = d3.geoDistance(seattle, coords) * 3958.8
Insert cell
distanceKM = d3.geoDistance(seattle, coords) * 6371
Insert cell
d3 = require("d3@5")
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