Published
Edited
Nov 16, 2019
Insert cell
Insert cell
html`<p><b>Bold</b></p>`

Insert cell
html` <p>plain</p>`
Insert cell
md`**bold again**`
Insert cell
three_p = d3.selectAll("p") // there are three paragraphs created
Insert cell
p_with_strong = d3.selectAll("p").select("strong").style("color", "red"); // the third paragraph
Insert cell
p_with_b = d3.selectAll("p").select("b").style("color", "green"); // the first paragraph
Insert cell
select_with_func = d3.selectAll("p").select(function(d, i, nodes) {
return (i === 1)? nodes[i] : null;
});
Insert cell
previous_p = d3.selectAll("p").select(function() {
return this.previousElementSibling; // not sure what exactly previousElementSibling work???
});
Insert cell
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

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