data = FileAttachment("penguins.csv") .csv({ typed: true }) filtered = data.filter(function(penguin) { return bill_length_min < penguin.bill_length_mm && islands.includes(penguin.island); })
Plot.rectY(filtered, Plot.binX( {y: "count"}, {x: "body_mass_g", fill: "species", thresholds: 20} )) .plot({ facet: { data: filtered, x: "sex", y: "species", marginRight: 80 }, marks: [ Plot.frame(), ] } )
Inputs.table(filtered)