edges

An edge list from @data, one edge per row: edges(from: #trade.exporter; to: #trade.importer; weights: #trade.value). Every distinct cell in the two endpoint columns is a vertex labelled with its text, matched without regard to case or spacing. An inline vertex or a vertices row whose name matches a cell is that vertex — how a data vertex is named, coloured, sized, or given an #id a path can point at. weights: is the network's own measure of each edge; widths: is the data drawn on it and nothing more; groups: sorts the edges into kinds, each drawn in its own hue under colour-by: group and named in the footer's key. A list with neither from: nor to: lists no rows: its colour-by: and width-by: are the rule for the inline edges — edges(width-by: weight).

edgesNode
A directed trade network of five countries from an edge list, each edge as thick as the trade it carries.A directed trade network of five countries from an edge list, each edge as thick as the trade it carries.

#Attributes

fromImplicit
The column naming each row's first vertex: #data.column. Given with to:, or not at all.
Can be written as shorthand: edges:value
to
The column naming each row's second vertex.
weights
A numeric column of edge weights: a path's length, a vertex table's size-by: weight, width-by: weight and show-weights all read it. A cell that is not a number leaves that row unweighted.
widths
A numeric column drawn as stroke width, in proportion to the largest reading. It replaces width-by: for these edges and changes no measurement — for a quantity that is not the edge's weight, such as lanes on a road weighted by its length.
width-by
weight draws each edge's stroke in proportion to its weight — the flow map's convention.
noneweight
Defaultnone
slice
The column this list is SLICED by — long-format, one row per edge per slice — showing the edges of the slice the scene's slider over that column stands on: a network over time is edges(from: #ties.a; to: #ties.b; slice: #ties.month) with cue.slider:m(over: #ties.month). The rows naming one pair are one edge, so the layout and every measurement take the edges of every slice together, and nothing moves as the slider does. A numeric slice holds until the next arrives — an edge is there or it is not, with no half way between.
colour-by
How the list's rows are coloured: group deals each of its groups: a hue, named in the key; ends takes the colour of the vertices an edge joins — theirs when they share one, an even mix when they differ; gradient runs from the colour of the vertex it leaves to the colour of the one it reaches; component and community colour the vertices the list brings in by that measurement, and its edges from their ends. none draws every row in the list's colour:.
nonegroupendsgradientcomponentcommunity
Also written: color-by
Defaultnone
groups
What kind of edge each row is — motorway, other road. Each kind is dealt a hue, after any vertex groups so no hue means two things, and named in the footer's key. The data says what an edge is, never what colour to draw it.
hues
Pins the kinds whose hue carries meaning: hues: motorway = red, other road = grey — each kind as the data spells it, =, then its colour. The rest are dealt from the palette, skipping every pinned hue.
network-hues
hue-labels
Renames kinds in the footer's key, and only there: hue-labels: other = Other road — each kind as the data spells it, =, then the name the key gives it.
network-hue-labels
colourAnimatable
Every edge's hue in a list with no colour-by:; unset, a neutral grey.
bluelight-bluedark-blueredlight-reddark-redorangelight-orangedark-orangeyellowlight-yellowdark-yellowteallight-tealdark-tealgreenlight-greendark-greenpinklight-pinkdark-pinkpurplelight-purpledark-purplegreylight-greydark-greyneutralhex(…)rgb(…)
Also written: color
dashed
Dashed strokes.
Defaultfalse
hiddenAnimatable
Declared but not drawn, with the vertices only this list names. They still count in every measurement. Animatable.
Defaultfalse

#Allowed in

#Examples

edges(from: #trade.exporter; to: #trade.importer; weights: #trade.value)
edges(from: #roads.from; to: #roads.to; weights: #roads.km; widths: #roads.lanes; groups: #roads.kind; colour-by: group; hues: motorway = red, other road = grey)
edges(from: #retweets.from; to: #retweets.to; colour-by: ends)
cue{
    edges(from: #citations.paper; to: #citations.cites)
}(
    in: 1
)

Last updated