Data Manager

Omix 1.8 provides a new feature called the Data Manager sidebar. The Data Manager is the central unit to provide data for the visualization. If closed you can open the Data Manager sidebar by selecting the menu entry "View" => "Sidebars" => "Data Manager".

Data Manager sidebar
Data Manager sidebar

Loading Data

In order to load data into the Data Manager use the "Open" button in the bottom left corner. By default Omix has tha capability to load CSV files into the Data Manager.

Loading CSV Files

CSV is a popular format to store tables of data without using a proprietary file standard. CSV stands for character separated values. Each line of the file represents a table row whereas the individual columns within each row are separated by a specific delimiter character. Typical delimiters are the TAB or SPACE sign, komma or semicolon. The delimiter character can be specified in the CSV format dialog.

CSV format dialog
CSV format dialog

You can specify quoting characters like quotation marks. This allows, for instance, to separate cells by komma but however place text with a komma sign in one cell:
representing four cells

The escape character also allows to place the quotation sign itself in text:
"He said: \"Hello!\" to her."
is interpreted as one text object

With the start line attribute, you can deside with what line, Omix shall start to read the data table, for instance, if file starts with comment lines. It is also possible to skip empty lines.

In case, you use special characters like umlauts, greek letters or accents in the CSV file, you must specify the character set used by your file (cf. character encoding).

You can decide to convert the text content of each cell into numbers if possible. In that case, if the numbers in your CSV file do not use the scientific or english notation, you have to specify the decimal number format (cf. decimal mark).

Other Formats and Data Sources

A couple of plug-ins equip Omix with the capability to load data from other sources:
In each case, all data is provided as flat data tables. If an Excel or ODF file provides multiple sheets, each sheet is loaded as individual table. When loading HDF5 or FWDSIM, the complex data structures are represented by multiple different tables.

Data Representation

After loading a file, the data is displayed as plain table, i.e. without label information about the individual columns and rows. There are several options to change the representation of table data in the Data Manager (cf. button icons):
  • Transposed table
    Columns of the underlying data matrix are displayed as rows and rows as columns.
  • Horizontal header
    The first row of the underlying data matrix is used as header providing the labels of the individual columns.
  • Horizontal & vertical headers
    Additionally, the first column is used as vertical header describing the meaning of the individual rows.
a) TableManagerTranspose.png b) TableManagerHeaders.png b.1) TableManagerIcon.png b.2) TableManagerHHeader.png b.3) TableManagerHVHeader.png

Icons of the buttons for table representation: transposed (a) and table headers (b) with plain table (b.1), horizontal header (b.2) and horizontal & vertical headers (b.3)

For visualization purpose, especially when using the Quick Visualizer, Omix requires tables where each column provides the data for a network component. The table header should provide the names of the columns which must correspond to the names of the network items. Activate the horizontal header in the Data Manager. If necessary, you can transpose the table matrix fist.

In some cases, headers might already be activated after file loading. This applies each time, the file content explicitely declares table header information.

Using Tables in OVL

You can use the content of the Data Manager in OVL. In fact, the Data Manager shall replace the programming constructs CSVDoubleTable etc. Instead of programing the file load process in OVL, the Data Manager provides the data to be used in the visualization. The most important advantage is, the Data Manager provides data always in the same tabular format independent of the actual file format.

OVL provides a global variables called DataManager providing access to the content of the Data Manager sidebar:
  • getCurrentTable() returns the table currently open or null if no table is open.
  • getTable(String path) returns the table under the specified path or null if table is not available.
    For instance, "data.csv" refers to the corresponding file, "data.xlsx/table1" refers to the sheet "table1" in file "data.xlsx".
  • getTable(String source, String tableID) returns the table with the specified "tableID" within the specified data source or null if table is not available.
    For instance, getTable("data.xlsx", "table1") refers to the sheet "table1" within file "data.xlsx".
  • getTable(String source, int n) returns the n'th table within the specified data source or null if table is not available. The first sheet has index n=0.
    For instance, getTable("data.xlsx", 2) refers to the third(!) sheet in file "data.xlsx".
All of these functions return objects described by the type Table. The Table class provides all necessary information about the table and access to the table content:
  • rows() returns the number of table rows.
  • columns() returns the number of table columns.
  • getValue(int row, int column) returns the value in the corresponding table cell.
Example code visiting all table cells:
var table = DataManager.getCurrentTable();
for(int r=0; r<table.rows(); r++){
	for(int c=0; c<table.columns(); c++){
    	var cellContent = table.getValue(r, c);

Alternatively, you can use the array element operator:
var cellContent = table[r, c];

If the table in the Data Manager is equipped with headers, you can use the labels of the columns and rows, respectively.

Example code visiting all table cells in a table with horizontal header:
var table = DataManager.getCurrentTable();
for(int r=0; r<table.rows(); r++){
	for(column in table.columnLabels()){
    	var cellContent = table.getValueByColumn(column, r);

Example code visiting all table cells in a table with horizontal and vertical header:
var table = DataManager.getCurrentTable();
for(row in table.rowLabels()){
	for(column in table.columnLabels()){
    	var cellContent = table.getValue(row, column);

The table with horizontal header is represented by the type HHeaderTable which is a subclass of Table. The table with both, horizontal and vertical headers is represented by the type HVHeadersTable, a subclass of HHeaderTable.

Independent from their current representation in the Data Manager, tables in OVL can be explicitely converted to header tables or to plain tables and they can be transposed:
  • toPlainTable() returns a plain table, i.e. without headers.
  • toHorizontalHeaderTable() returns a table with a horizontal header.
  • toHVHeadersTable() returns a table with horizontal and vertical header.
  • transposed() returns the transposed table.
Calling these functions, does not change the actual representation in the Data Manager.