plot = Plot.plot({
caption:
"Data was reported by WHO member states between 2013–2017. Data from the WHO Global Health Observatory (2017).",
projection: "equal-earth",
color: {
legend: true,
label: "Psychiatrists per 100,000 people",
scheme: "viridis",
unknown: "white"
},
marginLeft: -150,
marks: [
Plot.geo(dataGeo, {
fill: (d) => d.properties["Psychiatrists"],
stroke: "currentColor",
strokeWidth: 0.5
}),
Plot.tip(
dataGeo.features,
Plot.pointer(
Plot.centroid({
channels: {
Country: (d) => d.properties["Name"],
"Psychiatrists per 100k": (d) => d.properties["Psychiatrists"]
}
})
)
)
]
})