Published
Edited
Jan 31, 2019
Insert cell
Insert cell
{
const matrix = [
[11975, 5871, 8916, 2868],
[ 1951, 10048, 2060, 6171],
[ 8010, 16145, 8090, 8045],
[ 1013, 990, 940, 6907]
];

const div = html`<div>`;
const tr = d3.select(div)
.append("table")
.selectAll("tr")
.data(matrix)
.join("tr");

const td = tr.selectAll("td")
.data(d => d)
.join("td")
.text(d => d);

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