Public
Edited
Mar 18, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
margin = ({top: 25, right: 0, bottom: 25, left: 0})
Insert cell
x = d3.scaleLinear()
.domain([0,width/10])
.range([0,width])
Insert cell
xAxis = svg=>svg
.attr("transform", `translate(0,${-margin.bottom})`)
.call(d3.axisBottom(x))
Insert cell
y=d3.scaleLinear()
.domain([height/10,0])
.range([-height,0])
Insert cell
yAxis = svg => svg
.attr("transform",`translate(0,${-margin.bottom})`)
.call(d3.axisRight(y))
Insert cell
height = 300
Insert cell
d3 = require("d3@6")
Insert cell
sim_scrubber = (n_frames) => Scrubber(Array.from({length: n_frames}, (_, i) => i), {
format: i => "Time: " + (i/100),
delay: 10,
autoplay: false,
loop: false
})
Insert cell
import {Scrubber} from "@mbostock/scrubber"
Insert cell
import {slider,checkbox,select,text,button} from "@jashkenas/inputs"
Insert cell
import { knob } from "@toja/knob-input"
Insert cell
import { view } from "@tomlarkworthy/view"
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