Public
Edited
Dec 7, 2022
Insert cell
Insert cell
data = FileAttachment("penguins.csv").csv({typed: true})
Insert cell
rndPoisson = d3.randomPoisson(5)
Insert cell
genArray = function(size) {
let numbers = new Array(size);
for (let i=0; i < size; i++) {
numbers[i] = rndPoisson();
}
return numbers;
}
Insert cell
poissonNumbers = genArray(100)
Insert cell
viewof bins = Inputs.range([3, 20], {step: 1, label: "Bins"})
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.rectY(poissonNumbers, Plot.binX({y: "sum"}))
]
})
Insert cell

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.
Learn more