Public
Edited
Apr 4, 2024
33 forks
22 stars
Insert cell
Insert cell
Insert cell
chart = Treemap(flare, {
value: d => d.size, // size of each node (file); null for internal nodes (folders)
group: (d, n) => n.ancestors().slice(-2)[0].data.name, // e.g., "animate" in flare/animate/Easing; color
label: (d, n) => [...d.name.split(/(?=[A-Z][a-z])/g), n.value.toLocaleString("en")].join("\n"),
title: (d, n) => `${n.ancestors().reverse().map(d => d.data.name).join(".")}\n${n.value.toLocaleString("en")}`,
link: (d, n) => `https://github.com/prefuse/Flare/blob/master/flare/src/${n.ancestors().reverse().map(d => d.data.name).join("/")}.as`,
width: 1152,
height: 1152
})
Insert cell
flare = FileAttachment("flare.json").json()
Insert cell
Insert cell
import {Treemap} from "@d3/treemap-component"
Insert cell
import {Swatches} from "@d3/color-legend"
Insert cell
import {howto} from "@d3/example-components"
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