Plot.plot({
y: {
grid: true,
label: "↑ Unemployment (%)"
},
color: {
domain: [false, true],
range: ["#ccc", "red"]
},
marks: [
Plot.ruleY([0]),
Plot.line(bls, {
x: "date",
y: "unemployment",
z: "division",
transform: (data, facets) => ({
data,
facets: facets.map((facet) => {
return facet.filter((i) => {
return /, MI /.test(data[i].division);
});
})
})
})
]
})