Skip to content

@graphty/graphty-element / session / ReadingCode

Type Alias: ReadingCode ​

ReadingCode = "reading.metric" | "reading.metric-empty" | "reading.groups" | "reading.groups-empty" | "reading.path" | "reading.path-none" | "reading.set" | "reading.pairs" | "reading.series" | "reading.coverage"

Defined in: graphty-element/src/session/results/types.ts:798

What a result's RunResult.readingFact says, one code per result shape. Each code carries these params:

  • reading.metric -- a node or edge metric: { field, leader, leaderLabel, highest, median, lowest, tiedAtLowest, measured, count }. field is the measured field's name ("value"); leader is the highest-ranked element's id and leaderLabel its label attribute or printed id; highest, median and lowest are values of the field; tiedAtLowest is how many measured elements sit at lowest; measured of count elements in scope carry a value. The element's own English mentions the tie only when it is a tenth or more of measured.
  • reading.metric-empty -- a metric that measured nothing: { field }.
  • reading.groups -- a partition (community, layered grouping or category table): { groups, largest, measured, modularity, band }, how many groups, the size of the largest, how many elements were grouped, the modularity or null when the algorithm publishes none, and the id of the modularity's FieldBand or null.
  • reading.groups-empty -- a partition that grouped nothing: {}.
  • reading.path -- a route: { hops, cost }, each a number or null when not published.
  • reading.path-none -- a path result with neither: {}.
  • reading.set -- a node or edge set: { count, element }, how many were chosen and "node" or "edge".
  • reading.pairs -- a pair list: { count }.
  • reading.series -- a temporal series: { steps }, 0 for an empty series.
  • reading.coverage -- any other shape: { measured, count }, how many of the elements in scope carry a value.

Since ​

3.18.0