Published
Edited
Nov 9, 2019
Insert cell
Insert cell
Insert cell
select("h1") // exist and selected
Insert cell
select("h2") // non-exist and filled with null
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell

// export default function(selector) {
select = function(selector) {
return typeof selector === "string"
? new Selection([[document.querySelector(selector)]], [document.documentElement])
: new Selection([[selector]], root);
}
Insert cell
import {Selection, root} from "@embracelife/d3-selection-src-selection-index-js";

Insert cell
Insert cell
import {anchorLink} from "@embracelife/tutorial-utilities"
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