globalMap = Plot.plot({
color: {
type: "threshold",
scheme: "BuRd",
domain: [0.25, 0.5, 0.75, 0.95, 0.99].map((d) =>
d3.quantile(valuesForLegend, d)
)
},
projection: {
type: "mercator",
domain: circle
},
marks: [
Plot.geo(land, { fill: "lightgrey", stroke: "#aaa", strokeWidth: 0.5 }),
Plot.graticule(),
Plot.geo(circle, {
stroke: "#bbb",
strokeWidth: 1,
strokeDasharray: "5,3"
}),
Plot.dot(
dataWithinRadius,
Plot.hexbin(
{
fill: (g) => d3[aggType](g, (d) => d.activity),
title: (g) =>
`${nuclide} (${aggType}): ${d3[aggType](g, (d) => d.activity)}`
},
{
x: "longitude",
y: "latitude",
fillOpacity: 0.9,
symbol: "hexagon",
stroke: "black",
strokeWidth: 0.5,
strokeOpacity: 0.5,
binWidth: 6,
tip: true
}
)
),
Plot.geo(WISPolygon),
Plot.geo(WOIPolygon),
Plot.geo(EISPolygon)
]
})