Plot.plot({
caption: "1-bedroom apartment rents vs. distance to UC Campanile",
marginLeft: 50,
color: {
scheme: "ylgnbu",
legend: true,
type: "linear",
label: "count"
},
y: {
label: "↑ rent",
tickFormat: "$d",
domain: [1, 9999]
},
x: {
domain: [1, 3999],
label: "distance from Campanile (m) →",
tickFormat: "d"
},
z: { label: "n" },
marks: [
Plot.hexgrid(),
Plot.hexagon(
parcelsJoined.filter((d) => d.beds == 1 && d.year > 2000),
Plot.hexbin(
{ fill: "count" },
{
x: "dist",
y: "rent",
fill: "rent",
title: "parcel",
stroke: "lightgrey",
strokeWidth: 1
}
)
)
]
})