Published
Edited
May 12, 2020
1 fork
9 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
get_rem(ROOTID) // Fetch the root node
Insert cell
tree = make_tree(remdb, ROOTID) // Convert rem database --> tree viz friendly form
Insert cell
render_html_tree(tree) // Render as HTML tree
Insert cell
tree
Insert cell
render_tree(tree, default_tree_layout)
Insert cell
render_tree(tree, { // layout algorithm for the tree graph
type: 'indented',
direction: 'LR',
indent: 50,
getHeight: d => 5
})
Insert cell
Insert cell
graph = make_graph(remdb) // Convert rem database --> graph viz friendly form
Insert cell
render_graph(graph, {
type: 'dagre',
rankdir: 'TB', // The center of the graph by default
align: 'DL',
nodesep: 5,
ranksep: 30,
controlPoints: true,
})
Insert cell
render_graph(graph, {
type: 'circular',
radius: 200
})
Insert cell
render_graph(graph, {
type: 'force',
preventOverlap: true,
nodeStrength: -1000
})
Insert cell
render_graph(graph, {
type: 'dagre',
rankdir: 'LR', // The center of the graph by default
align: 'DL',
nodesep: 5,
ranksep: 30,
controlPoints: true,
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
remdb = block_on_load(crawl_rem(ROOTID, 100)) // Crawl & block on result
// Could also this to lazily load in background instead of block:
// remdb = crawler.db
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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