Network

.qp.network.format

Format a table to be in the shape expected by the graph layout algorithm

Parameter(s):

Name Type Description
t table Table to format
c symbol[] Pair of symbols indicating the id and child columns

Returns:

Name Type Description
<returns> table Formatted table

.qp.network.layout

Perform a force-directed layout on the given table

Parameter(s):

Name Type Description
t table Table to layout
x symbol ID column
y symbol Child column
o null | dict (decay: float; speed: long; ticks: long; c: float; maxdepth: long; theta: float) Options to control the layout

Returns:

Name Type Description
<returns> table Edge-table with original node properties added in

Example: Basic network


     g: .gg.cheat.i.assemble[];

     layout: .qp.network.layout[g; `id; `children; ::];

     .qp.theme[.gg.theme.blank]
         .qp.stack (
             .qp.segment[layout;`px__;`py__;`ppx__;`ppy__;::];
             .qp.point[layout;`px__;`py__;::])

Image