Plot.plot({
width: 1000,
height: 2000,
marginLeft: 300,
opacity: {
legend: true,
label: 'CPA ($)'
},
marks: [
Plot.barX(clean.objects(), {
x: 'spend',
y: 'Campaign',
sort: {y: 'x', reverse: true},
fill: d => d.craigslist == true ? 'purple' : 'currentColor',
opacity: d => d.cpa,
}),
Plot.axisX({anchor: 'top'}),
Plot.axisY({facet: true})
]
})