activityFDNPPTime = Plot.plot({
color: {
type: "threshold",
scheme: "YlGnBu",
domain: activityBins
},
projection: {
type: "azimuthal-equidistant",
rotate: center.map((d) => -d),
domain: circle,
},
fx: {
transform: (d) => timeScale(d.getFullYear()),
label: "Date →",
reverse: false,
},
facet: {
data: dataWithinRadius,
x: "time",
},
marks: [
Plot.geo(land, {
fill: "#ffffff",
stroke: "black",
strokeWidth: 0.5
}),
Plot.graticule(),
Plot.dot(
dataWithinRadius,
Plot.hexbin(
{
fill: (g) => d3["max"](g, (d) => d.activity),
},
{
x: "lon",
y: "lat",
fillOpacity: 0.9,
symbol: "hexagon",
stroke: "black",
strokeWidth: 0.2,
binWidth: 5,
}
)
),
Plot.geo(circle, {
stroke: "#bbb",
strokeWidth: 1,
strokeDasharray: "5,3"
}),
Plot.sphere({ strokeWidth: 0.5 })
],
width
})