Public
Edited
Feb 16, 2023
5 forks
76 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
main = import(`https://api.observablehq.com/${id}.js?v=3`)
.then(async ({default: define}) => {
const runtime = new Runtime();
const main = runtime.module(define, name => show.anon || name);
await runtime._compute();
runtime.dispose();
return main;
})
Insert cell
variables = Array.from(main._runtime._variables, (v, i) => (v._id = i, v))
.filter(v => !isimport(v) && v._reachable)
.filter(v => show.anon || v._name !== null)
.filter(v => show.builtin || v._module !== main._runtime._builtin)
.map(v => ({
_module: v._module,
_name: v._name,
_id: v._id,
_inputs: v._inputs
.map(i => isimport(i) ? i._inputs[0] : i)
.filter(i => show.builtin || i._module !== main._runtime._builtin)
}))
Insert cell
isimport = v => v._inputs.length === 1 && v._module !== v._inputs[0]._module
Insert cell
Runtime = (await require("@observablehq/runtime@4")).Runtime
Insert cell
import {submit} from "@mbostock/more-deliberate-inputs"
Insert cell
import { elky } from "@tmcw/elk@260"
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