Plot.plot({
facet: {
data: data.filter(d => d.country == 'US' || d.country == 'CA'),
y: 'country'
},
marks: [
Plot.rectY(
data.filter(d => d.country == 'US' || d.country == 'CA'),
Plot.binX(
{ y: "count" },
{
x: "date",
y: "price_in_usd",
fill: "brand",
thresholds: d3.utcDay
}
)
)
],
marginLeft: 100,
width: 666,
height: 300
})