= Inputs.range([32,50],
viewof bill_length_min value: 35, step:1, label: "Bill length (min)"})
{
= Inputs.checkbox(
viewof islands "Torgersen","Biscoe","Dream"],
[value: ["Torgersen","Biscoe"],
{label: "Islands:"
}
)
= transpose(data).filter(function(penguin){
filtered return bill_length_min < penguin.bill_length_mm && islands.includes(penguin.island)
;
})
.rectY(filtered,
Plot.binX(
Ploty: "count"},
{x: "body_mass_g", fill: "species", thresholds: 20}
{
)).plot({
facet: {
data: filtered,
x: "sex",
y: "species",
marginRight:80
,
}marks: [
.frame(),
Plot
] })
.table(filtered) Inputs