Plot.plot({
x: {
round: true,
label: "Spoke distance",
grid: true,
type: "pow",
exponent: .25,
domain: [100, 5000]
},
y: {
grid: true,
label: "N of flights"
},
marks: [
Plot.rectY(spokesAttrs,
Plot.binX(
{ y: d => d.map(spoke => spoke.DEPARTURES_PERFORMED).reduce((a,b) => a+b) },
{ x: d => d.DISTANCE }
)
),
]
})