JavaScript & React libraryData requirementsAdvanced data usage

Advanced data usage

Cosmograph uses two types of identifiers: IDs (human-readable labels) and indices (numeric positions). IDs help you reference your data, while indices power the performance under the hood. This reduces memory usage and speeds up rendering, especially for large networks.

For best performance, your data should include:

  • Points with unique IDs and unique sequential indices
  • Links that reference the source and target point IDs and their corresponding indices
ā„¹ļø

Struggling with data indexing? Skip this section and use the Cosmograph Data Kit instead. It automatically handles all indexing for you (though it requires some processing time upfront).

Once indexed, your data loads into Cosmograph nearly instantly — giving you the fastest possible graph visualization performance.

Points configuration

Cosmograph needs at least points to render. The minimal required configuration options for points data to render it is:

PropertyDescription
pointsThe points data.
pointIdByUnique identifier column for each point.
pointIndexByOrdinal index column of each point from 0 to x (unique points count). This index is used for efficient lookup and referencing.

You can find full list of points properties here.

The minimal required configuration options for links data is:

PropertyDescription
linksThe links data.
linkSourceByUnique identifier column that contains pointIdBy of the source point of the link.
linkSourceIndexByThe index column of the source point of the link. This corresponds to the pointIndexBy of the point identified by linkSourceBy.
linkTargetByUnique identifier column that contains pointIdBy of the target point of the link.
linkTargetIndexByThe index column of the target point of the link. This corresponds to the pointIndexBy of the point identified by linkTargetBy.
ā„¹ļø

Cosmograph works with single source-target pairs for links. Each link connects exactly one source point to one target point. If your data contains multiple targets, combine them into a single column to represent each connection as an individual link.

You can find full list of link properties here.