data:(data)=>data[0],// select the first element, for no reason
y:"count"
},
{
x:"body_mass_g",
z:"species"
}
),
fill:"sex"// get the color from the first element
})
]
})
Plot.plot({
facet:{data:penguins,x:"island"},
marks:[
Plot.rectY(penguins,{
...Plot.binX(
{
data:(data)=>data[0],// select the first element, for no reason
y:"count",
title:data=>mutablehello=data/// ???
},
{
x:"body_mass_g",
z:"species",
}
),
fill:"species"// get the color from the first element
})
]
})
mutablehello=null
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.