Public
Edited
Dec 12, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.rectY(data, Plot.binX({y: "proportion"}, {x: "success"})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
data = {
let samples = [];
let n = 10000;
let dicePool = pool(virtue, path);
for (let index = 0; index < n; ++index) {
let successes = success(path, dicePool);
let datum = {
path:path,
virtue:virtue,
success:successes
}
samples.push(datum);
}
return(samples)
}
Insert cell
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