Published
Edited
Jun 10, 2020
Importers
Insert cell
Insert cell
Insert cell
Insert cell
graph = AgoraGML.toGML({ nodes, edges })
Insert cell
nodes = _.map(actors, ({ id: index, label, ...meta }) => ({
...node_defaults,
index,
label,
meta
}))
Insert cell
edges = _.map(links, ({ source, target, weight, ...meta }) => ({
source,
target,
meta: { ...meta, intWeight: weight }
}))
Insert cell
md`## Options`
Insert cell
node_defaults = ({ x: 0, y: 0, width: 20, height: 20 })
Insert cell
Insert cell
Insert cell
actors = fetch(
"https://gist.githubusercontent.com/stardisblue/a9989f9515680b0fe37a97816becbbb7/raw/6154eac3d0d2b1f8537c96da6bca49c8931eefbc/actor-nodes.json"
).then(d => d.json())
Insert cell
Insert cell
AgoraGML = require('https://cdn.jsdelivr.net/gh/agorajs/agora-gml@latest/dist/agora-gml.min.js')
Insert cell
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