Public
Edited
May 25, 2023
6 stars
Insert cell
Insert cell
map = Plot.plot({
width: 1152,
projection: {
type: "equal-earth",
rotate: [-150, 0]
},
color: {
type: "log",
legend: true,
label: "Gaps in transponder data",
domain: [0.4, 100],
clamp: true
},
marks: [
Plot.raster(ais, {
pixelSize: 0.5,
x: "gap_start_lon",
y: "gap_start_lat",
fill: 1,
interpolate: interpolateSum,
clip: "sphere"
}),
Plot.geo(land, { fill: "white" }),
Plot.sphere()
]
})
Insert cell
function interpolateSum(index, width, height, X, Y, V) {
const U = new Float64Array(width * height);
for (const i of index) {
const x = Math.round(X[i]);
const y = Math.round(Y[i]);
if (x >= 0 && y >= 0 && x < width && y < height) U[x + width * y] += V[i];
}
return U;
}
Insert cell
ais = FileAttachment("ais_disabling_events.csv").csv()
Insert cell
import {land} from "@visionscarto/geo"
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