map = Plot.plot({
width,
color: { legend: true, type: "linear", scheme: "YlOrRd", domain: [15, 35] },
projection: "equal-earth",
marks: [
Plot.geo(land, { fill: "#ececec" }),
Plot.dot(
data.filter((d) => d["p99.9 of WBT"] < 20),
{
x: "longitude",
y: "latitude",
fill: "#ccc",
opacity: 1,
r: 2
}
),
Plot.dot(
data.filter((d) => d["p99.9 of WBT"] >= 20),
{
x: "longitude",
y: "latitude",
fill: "p99.9 of WBT",
opacity: 0.75,
r: 2
}
),
Plot.dot(
data.filter((d) => d["all-time max WBT"] >= 36.5),
{
x: "longitude",
y: "latitude",
fill: "all-time max WBT",
fillOpacity: 0,
stroke: "#000",
r: 5,
tip: "xy"
}
),
Plot.sphere()
]
})