observable-framework-lib-d3
Installation
SKILL.md
Library: D3
Observable Framework documentation: Library: D3 Source: https://observablehq.com/framework/lib-d3
D3 (or D3.js) is “a free, open-source JavaScript library for visualizing data. Its low-level approach built on web standards offers unparalleled flexibility in authoring dynamic, data-driven graphics.” D3 is available by default as d3 in Markdown, but you can import it explicitly like so:
import * as d3 from "npm:d3";
For example, here is an interactive force-directed graph showing the character co-occurence in Les Misérables; data is from the Stanford Graph Base. Color represents arbitrary clusters in the data. Drag nodes below to better understand connections.
const width = 640;
const height = 640;
const color = d3.scaleOrdinal(d3.schemeObservable10);