Published
Edited
Nov 6, 2020
1 star
Insert cell
Insert cell
fillcolour = 'steelblue'
Insert cell
Insert cell
viewof rotate = slider({
min: -180,
max: 180,
value: -30,
description: "rotation slider"
})
Insert cell
mutable projection = d3
.geoOrthographic()
.fitExtent([[1, 1], [width - 1, height - 1]], sphere)
.rotate([rotate, -30])
Insert cell
height = Math.max(640, width)
Insert cell
sphere = ({type: "Sphere"})
Insert cell
graticule = d3.geoGraticule10()
Insert cell
points = d3.csv("https://gist.githubusercontent.com/mbostock/b5c3549cbe0a68649f87952b73d9983c/raw/631e77d2f2724d0d4b35dd9bb3a25b8c09d4a622/airports.csv", ({longitude, latitude}) => [+longitude, +latitude])
Insert cell
mesh = d3.geoVoronoi(points).mesh()
Insert cell
import {zoom} from "@d3/versor-zooming"
Insert cell
import { slider } from "@jashkenas/inputs"
Insert cell
d3 = require("d3@6", "d3-geo-voronoi@1")
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