Plot.plot({
caption:
"Data on prevalence is estimated from real data sources and statistical models for the region. Data from the WHO Global Health Observatory (2015).",
projection: "equal-earth",
width,
color: {
legend: true,
type: "log",
label: "Ratio of Depression Prevalence to Life Satisfaction",
scheme: "magma",
unknown: "white"
},
marks: [
Plot.geo(dataGeo, {
fill: (d) =>
d.properties["Ratio of Depression Prevalence to Life Satisfaction"],
stroke: "currentColor",
strokeWidth: 0.5
}),
Plot.sphere(),
Plot.tip(
dataGeo.features,
Plot.pointer(
Plot.centroid({
channels: {
Country: (d) => d.properties["Name"],
Ratio: (d) =>
d.properties[
"Ratio of Depression Prevalence to Life Satisfaction"
]
}
})
)
)
]
})