Plot.plot({
width: width,
inset: 8,
marginLeft: 60,
grid: true,
color: {
type: "diverging",
range: ["blue","white","red"],
pivot: 0,
},
y:
{
clamp: true,
tickSize: 0,
},
x:
{
grid: false,
},
marks: [
Plot.dot(data, {
x: d=>d.X*1,
y: "WBANOMAPR",
fill: "WBANOMAPR",
r: "pop_max",
stroke: "black",
strokeWidth: 0.5,
}),
Plot.text(data, {
x: d=>d.X*1,
y: "WBANOMAPR",
text: "NAME",
dy: -10,
dx: 10,
filter: d=>d.megacity === 1,
}),
Plot.ruleY(data,{y:[0],stroke:"black",}),
]
})