CSV File Format

ArkMatrix supports two versions of CSV file import/export, Simple Relationships and Tagged Relationships.

The Simple Relationship format consists of two columns representing an Above/Below stratigraphic relationship between two stratigraphic units.

The Tagged Relationship format consists of 3 columns, with the first two columns detailing the stratigraphic units and the third column describing the stratigraphic relationship them, such as above, same, or subgroup. This format also supports including site metadata.

Neither format supports a header row, i.e. every row will be interpreted as data.

Simple Relationship / Two Column Format

The simple relationship format consists of two columns representing an Above relationship, i.e. the Stratigraphic Unit in column A is Above the Stratigraphic Unit in column B. There is no header row.

Example:

Unit1 Unit2
Unit2 Unit3
Unit2 Unit4
Unit3 Unit5
Unit4 Unit5

Units may be chained to enter a sting of above/below relationships:

Unit1 Unit2
Unit3
Unit4
Unit5

Is the equivalent of the matrix chain:

Unit1 | Unit2 | Unit3 | Unit4 | Unit5

This would be the equivalent of the following:

Unit1 Unit2
Unit2 Unit3
Unit3 Unit4
Unit4 Unit5

See https://gitlab.com/arklab/ArkMatrix/-/blob/master/tests/harris/csv_simple.csv for another example.

Tagged Relationship / Three Column Format

The tagged relationship format supports more features by allowing relationships to be tagged in a third column, i.e. the tag in column C defines the relationship between the Stratigraphic Units in columns A and B. There is no header row defined.

File Metadata Tags:

  • site
  • dataset

Unit Metadata Tags:

  • label
  • status = allocated | assigned | void
  • type = undefined | deposit | fill | cut | masonry | skeleton | timber

Relationship Tags:

  • above - unit in column A is above unit in column B
  • below - unit in column A is below unit in column B (use discouraged, prefer using above)
  • same - unit in column A is same-as unit in column B
  • contemporary - unit in column A is contemporary-with unit in column B

Aggregation Tags:

  • subgroup - unit in column A is a member of subgroup in column B
  • group - subgroup in column A is a member of group in column B
  • landuse - group in column A is a member of landuse in column B

All Metadata and Aggregation tags are optional. Tags may be included in any order, except the 'site' and 'dataset' tags which if defined should be listed first so they can be used when processing the following units. It is recommended that the tags be written in the order listed above, i.e. File Metadata, Unit Metadata, Relationship, Aggregation.

Other tags may be included in the file, such as 'description' or 'location', but these will be ignored by ArkMatrix.

Example:

MNO12 site
Area A dataset
Unit1 assigned status
Unit1 fill class
Unit1 label Unit 1
Unit7 void status
Unit1 Unit2 above
Unit2 Unit3 above
Unit2 Unit4 above
Unit3 Unit5 above
Unit4 Unit5 above
Unit5 Unit6 same
Unit3 Unit4 contemporary
Unit1 Subgroup1 subgroup
Unit2 Subgroup2 subgroup
Unit3 Subgroup2 subgroup
Unit4 Subgroup3 subgroup
Unit5 Subgroup3 subgroup
Unit6 Subgroup3 subgroup
Subgroup1 Group1 group
Subgroup2 Group2 group
Subgroup3 Group2 group

Units may be chained the same as in the Simple Relationship Format.

Unit1 Unit2 above
Unit3 above
Unit4 above
Unit5 above

See https://gitlab.com/arklab/ArkMatrix/-/blob/master/tests/harris/csv_format.csv for another example.

yEd Graph Drawing

To generate a graphical version of smaller matrices, install yEd https://www.yworks.com/products/yed.

  • Create a GML output file
    • If using the web version, set the Graph Output dropdown to GML
    • If using the command line version then add the option '--graph gml'
  • Open mysite.gml in yEd
  • Choose Layout > Hierarchical and configure the following options:
    • General / Orientation = Top to Bottom
    • General / Symmetric Placement = Yes
    • General / Minimum Distances / Node to Node = 30
    • General / Minimum Distances / Node to Edge = 15
    • General / Minimum Distances / Edge to Edge = 15
    • General / Minimum Distances / Layer to Layer = 10
    • Edges / Routing Style = Orthogonal
    • Edges / Automatic Edge Grouping = Yes
    • Edges / Port Constraint Optimisation = Yes
    • Edges / Recursive Edge Routing = Directed
    • Edges / Consider Edge Thickness = Yes
    • Edges / Arrows Define Edge Direction = No
    • Layers / Layer Assignment Policy = Hierarchical - Topmost
    • Layers / Alignment Within Layer = Center of Nodes
    • Layers / Component Arrangement = Topmost
    • Labelling / Consider Node Labels = Yes
    • Grid / Enable Grid = Yes
    • Grid / Grid Spacing = 10
    • Grid / Port Assignment = On Grid
  • Choose Apply, then adjust layout as required
  • Save resulting graph in GraphML format to preserve layout, or export as PDF