Plot.plot({
width: 900,
height: 600,
axis: null,
facet: { data: states, x: "x", y: "y" },
color: {
type: "diverging-log",
scheme: "piyg"
},
marks: [
Plot.barX(states, {x1: 0, x2: "y", domain: [0, 5]}),
Plot.text(states, {x: "x", y: "y", text: formatChange, dy: 10, fillOpacity: 0.6}),
]
})