Network

The Network class represents a graph with nodes and links. Network objects are created by importing JSON files in a specific format using the graphjson function:

let network = await msc.graphjson("data.json");

A network is represented using two data tables, one for the nodes and one for the links (Figure 1). Mascot automatically infers the data type for each node attribute and link attribute, and parses the values accordingly.

network import

Figure 1: a network dataset is parsed as two data tables

Properties

propertyexplanationtypedefault value
nodeTable the node table in the networkDataTable
linkTable the link table in the networkDataTable
nodes the nodes in the networkArray of Objects
links the links in the networkArray of Objects

Methods

methodexplanationreturn type
getNode(id)returns the node with the idObject