Published
Edited
Nov 16, 2019
Insert cell
Insert cell
html`<p>paragraph</p>`
Insert cell
append_div_under_p = d3.select("p").append("div");// yes, we can add a div inside a p
Insert cell
append_anchor_under_h1 = d3.select("h1").append(function() {
return document.createElement("a"); // yes, we just added an anchor to h1
});
Insert cell
append_svg_under_p = d3.select("p").select(function() {
return this.appendChild(document.createElement("svg"));
});
Insert cell
d3 = require("https://cdn.jsdelivr.net/npm/d3@5.12.0/dist/d3.js")
Insert cell
import { anchorLink } from "@embracelife/tutorial-utilities"
Insert cell
Insert cell
Insert cell
d3.select("p")._groups[0][0].textContent // devtool, select element, Properties
Insert cell
d3.select("p").property("textContent")
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