This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Node and Link Schemas
Benjamin edited this page Aug 24, 2016
·
1 revision
To import data, networkcube uses two tables:
- a node table that contains one row per node with its respective attributes, and
- a link table that contains one row per link with its respective attributes.
The respective node and link schemas are simple JSON objects that map columns to data attributes
For example,
var nodeSchema = {id:0}
var linkSchema = {id:0, source:1, target:2}
creates two schemas assigning the required attributes for each type, node and link.
Note that you can provide your data in this tables. However, you can also use networkcube's loader functions to parse a specific format into these table and schemas. More information in the [Importing Data section](Importing Data).
-
id
(required) - Node ID. Must be unique, start with 0, and running. -
label
(optional) - Label shown for this node. If not provided, node ID should be shown. -
location
(optional) - a node's geographic location. Can change over time. -
time
(optional) - associates a time stamp to this node. Attributes in this row are valid only at this time stamp. This can be used to, e.g. change a node's type or label over time. -
nodeType
(optional) - a node's type
-
id
(required) - Node ID. Must be unique, start with 0, and running. -
source
(required) - ID of source node -
target
(required) - ID of target node -
time
(optional) - associates a time stamp to this node. Attributes in this row are valid only at this time stamp. This can be used to, e.g. change a node's type or label over time. -
weight
(optional) - an edge's weight. Can change with time -
linkType
(optional) - a link's type. Can change over time -
directed
(optional) - if a link is directed or not. If not explicitly indicated a link is seen as directed.