Relational to Array Dialog

Revision as of 00:21, 9 February 2023 by Lchrisman (talk | contribs) (Created page with "category:Windows and dialogs ''New to Analytica 6.3'' This dialog is used to convert a relational table or "fact table" to a multi-dimensional array. <center>imag...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


New to Analytica 6.3

This dialog is used to convert a relational table or "fact table" to a multi-dimensional array.

MdTable Wizard Project Route Length.png

Relational tables

Relational tables are commonly used in databases and spreadsheets. A relational table is a two-dimensional heterogeneous tables with one "record" on each row, and different quantities relating to each record in a different column. They are often heterogeneous, with some columns containing index-like labels, and other columns containing numerical quantities with varying units of measurement and varying meanings.

A relational table often depicts quantities that are effectively multi-dimensional quantities. However, the multi-dimensionality is only implied, where some columns effectively specify the "coordinate" of the record in a multi-dimensional space. In such a case, it is usually far more convenient in Analytica to convert these into actual multi-dimensional arrays, which Analytica loves to manipulate directly. This accomplishes two things: (a) Is separates our heterogenous data into separate variables, where each variable represents one type of quantity only, with one consistent unit of measurement, and (b) turns the implicit "coordinates" that appear in the index-like columns of a relational table into actual explicit indexes. Once the quantities are in a homogeneous array form, they become really easy to manipulate using Analytica's various array functions.

It is worth noting, however, that for some extremely high-dimensional cases, a relational table can be a very space-efficient sparse representation.

Here is an example of a simple 3-column relational table.

Project Route Length relational table.png

The project and route columns are "index-like", where as the Length column contains quantitative data.

Accessing the dialog

To bring up the Relational table to array dialog, select Relational table to array... on the right-mouse context menu while viewing a relational table in a result window.

Relational table to array menu option.png

For the option to be present and enabled,

  • You must be in edit mode.
  • The module containing the table's variable must be editable (it cannot be locked, browse-only). This is where it will create new variables.
  • It must be a result table (not an edit table)
  • The table must appear to be a relational table.
    • The table must be pivoted with the columns horizontally and the records down the vertical rows.
    • Column names must be unique (no duplicates)
    • (A few others, TBD)
Comments


You are not allowed to post comments.