Plot.plot({
width: 640,
height: 640,
projection: {
type: "azimuthal-equidistant",
rotate: [0, -90],
domain: d3
.geoCircle()
.center([0, 90])
.radius(90 - d3.min(noaa_data.map((d) => d.lat)))(),
inset: 20
},
color: {
type: "linear",
label: "year",
tickFormat: (d) => d + "",
ticks: 10,
width: 400,
domain: noaa_data.map((d) => d.year),
legend: true
},
marks: [
Plot.geo(land, { fill: "lightgray" }),
Plot.graticule(),
Plot.line(noaa_data, {
x: "lng",
y: "lat",
curve: "catmull-rom",
stroke: "darkgrey",
z: null
}),
Plot.line(filtered, {
x: "lng",
y: "lat",
curve: "catmull-rom",
stroke: (d) => d.year,
z: null
}),
Plot.dot(filtered, {
x: "lng",
y: "lat",
r: 2,
stroke: null,
fill: (d) => d.year
}),
Plot.frame()
]
})