Public
Edited
Apr 21
Insert cell
Insert cell
import { ForceGraph } from "@d3/force-directed-graph-component"
Insert cell
staff_nodes.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
staff_edges.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
buildNetwork = (n, e) => {
return {
nodes: n,
links: e
};
}
Insert cell
staffnetwork=buildNetwork(staff_nodes, staff_edges)
Insert cell
ForceGraph(staffnetwork)
Insert cell
ForceGraph(staffnetwork, {
nodeId: d => d.id,
nodeGroup: d => d.weight,
nodeTitle: d => d.id,
tip: true,
width,
height: 1200,
nodeRadius: 9,
linkStrokeWidth: d => 0.2 * Math.sqrt(d.weight)
})
Insert cell
staffnetwork.nodes[0]
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