Plot.plot({
projection: { type: "reflect-y", domain: chicago },
color: {
scheme: "blues",
unknown: "#ddd",
type: "linear",
label: `% of tract population that is ${selection}`,
legend: true,
percent: true,
domain: [0, 100]
},
marks: [
Plot.geo(flattened, {
stroke: "black",
type: "linear",
legend: true,
title: (d) => mapped_data.get(d.id),
fill: (d) => mapped_data.get(d.id),
tip: true
})
]
})