Public
Edited
Apr 13, 2024
2 forks
4 stars
Insert cell
Insert cell
Plot.plot({
width,
projection: "equal-earth",
color: { scheme: "Magma" },
marks: [
Plot.contour(values, {
x: (_, i) => i % n / 2,
y: (_, i) => 90 - Math.floor(i / n) / 2,
fill: values,
thresholds: 30,
stroke: "#000",
strokeWidth: 0.25,
clip: "sphere"
}),
Plot.sphere()
]
})
Insert cell
GeoTIFF = import("https://esm.sh/geotiff@2")
Insert cell
tiff = FileAttachment("sfctmp.tiff").arrayBuffer().then(GeoTIFF.fromArrayBuffer)
Insert cell
image = tiff.getImage()
Insert cell
n = image.getWidth()
Insert cell
values = (await image.readRasters())[0]
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