Notebooks 2.0 is here.

Public
Edited
Jun 1, 2024
Insert cell
Insert cell
Insert cell
viewof b = Inputs.button("new points")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
number_of_blue = {
if (data_set == "Balanced") {
return 100;
} else {
return 10;
}
}
Insert cell
viewof s = Inputs.range([0, 2], {label: "Spread", step: 0.01})
Insert cell
viewof x = Inputs.range([0, 10], {label: "Set Threshold", step: 0.1})
Insert cell
Insert cell
sensitivity = redRed / (redRed + blueRed)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
red.filter(e => 5 + e - s < x).length/100
Insert cell
blue.filter(e => 5 + e - s < x).length/100
Insert cell
red.filter((d) => d + 5 - s >= x).length / 100
Insert cell
red.filter(e => 5 + e - s < x).length/100
Insert cell
red.filter((d) => 5 + d - s < x).length / 100
Insert cell
Insert cell
red = {
const red = []
for(let i = 0;i < 100;i++){
red.push(normal(0,0.85))
}
return red
}
Insert cell
blue = {
const blue = [];
for (let i = 0; i < number_of_blue; i++) {
blue.push(normal(0.8, 0.9));
}
return blue;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = {
const data = []
for(let i = 0;i < 10;i = i+.01){
data.push(i)
}
return data
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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