Published
Edited
Nov 3, 2020
Importers
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
map = new Map([["foo", 1], ["bar", 2]]) // Mapを作成
Insert cell
// Mapから要素を作成
circles = d3
.create("svg")
.selectAll("circle")
.data(map)
.join("circle")
Insert cell
circles.size()
Insert cell
// セレクションのデータからMapを作成
new Map(circles.data())
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@6")
Insert cell
// 黄色とピンクのハイライトつきのmarkdown
mdh = {
const hljs = window.hljs || (await require("@observablehq/highlight.js"));

return function() {
const node = md(...arguments);
for (const fragment of node.querySelectorAll("code")) {
hljs.highlightBlock(fragment);

fragment.innerHTML = fragment.innerHTML.replace(
/___(.*?)___/g,
'<mark>$1</mark>'
);
fragment.innerHTML = fragment.innerHTML.replace(
/~~~(.*?)~~~/g,
'<mark style="background:pink">$1</mark>'
);
}

return node;
};
}
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