Published
Edited
Nov 6, 2020
Insert cell
md`# My First D3`
Insert cell
html`<h2>見出し</h2>
<p>パラグラフ</p>
<ul>
<li>その1</li>
<li>その2</li>
</ul>`
Insert cell
md`## 見出し

パラグラフ

* その1
* その2
`
Insert cell
score = 5 + 2
Insert cell
doubleAcore = score * 2
Insert cell
someArray = [0,4,8,12,16]
Insert cell
{
const first = 1;
const second = first + 1;
}
Insert cell
someFunc = (arg1, arg2) => {
const result = arg1 * 10 + arg2;
return result;
}
Insert cell
simpleFunc = d => d * d
Insert cell
sampleObj = ({
key1: 0,
key2: 10
})
Insert cell
{
const dataset = [5, 25, 45, 65, 85];

const div = d3.create("div");

div
.selectAll("p")
.data(dataset)
.join("p")
.text((d, i) => `${i}人目は、${d}点!`);

return div.node();
}
Insert cell
d3 = require("d3@6")
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