Public
Edited
Feb 12, 2024
1 fork
Insert cell
Insert cell
viewof
Insert cell
paramsOld = ({
w1: Inputs.range([-2, 2], {step: .01, label: "w1"}),
w2: Inputs.range([-2, 2], {step: .01, label: "w2"}),
b: Inputs.range([-2, 2], {step: .01, label: "b"})
})
Insert cell
html`<div>${Object.values(paramsOld)}`
Insert cell
Generators.input(params.w1)
Insert cell
viewof w1 = Inputs.input(0)
Insert cell
params = new Map(['w1', 'w2', 'b'].map(x => ([x, Inputs.input(0)])))
Insert cell
md`y = ${
[...params.entries()].map(
([name, inp]) => Inputs.bind(Tangle({min: -2, max: 2, step: .05, value: 0}), inp))}`

Insert cell
Generators.input(params.get('w1'))
Insert cell
viewof params
Insert cell
Inputs.bind(viewof x, viewof params.w1)
Insert cell
q = (viewof params.w1)
Insert cell
md`
y = ${params.w1}
`
Insert cell
viewof bins = Inputs.range([3, 20], {step: 1, label: "Bins"})
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.rectY(data, Plot.binX({y: "sum"}, {x: "flipper_length_mm", thresholds: bins}))
]
})
Insert cell
import {Tangle} from "@mbostock/tangle"
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