Nodes and Edges #
Diagrams in yEd are composed of nodes and edges. For our purposes, each node represents a context; nodes can either be singular or group nodes. Edges represent the relationships between nodes; so, most nodes will have multiple edges leading to multiple other nodes.
It is important to remember that edges are directional; they connect a “source” node with a “target” node. So, you will need to make sure that your edges are moving in the correct direction. In the case of Harris matrix production, edges should flow upwards, from “earlier” nodes to “later” nodes. For “Equal to, same as” relationships, you should only include one edge that can move in either direction; this mirrors the database in which the “Equal to, same as” relationship is also only made in one direction. (Ideally, the direction of the edge in the matrix should be the same as the direction of the relationship in the database.)
If you do add edges that are moving in the wrong direction, you can reverse them by using the “Reverse Selected Edges” tool. Either select edges by hand, or go to Tools>Select Elements>Edges to select all edges or a group of edges according to their attributes. Then, go to Tools>Reverse Selected Edges.
There are many options for symbolizing nodes and edges in yEd. We have developed a standardized symbology that all excavators should use to build the Harris matrix for their excavation areas. Although the adopted scheme is more elaborate than that originally devised by Harris, we have tried to keep it relatively simple and designed for grayscale. (There are ways to temporarily enhance the visuals of the matrix if desired, as discussed below). The standard symbology can be imported to yEd on your account with the following steps:
- Open yEd and select Edit> Manage Palette.
- In the dialog box, click Import Section and navigate to and import the file named KAP_hm_symbol located in gygaia\gisgps\styles_and_templates\yEd_styles_and_templates\.
The symbols for nodes are correlated to sub-tables in the database. From left to right above, the symbols indicate deposits (dashed rectangle), positive features (rounded rectangle), negative features (circle), surfaces (trapezium), interpretive group contexts (dashed gray rectangle), and group contexts for features (rounded gray rectangle). The symbols for edges correlate to the broad types of stratigraphic relationships in the database: “earlier than” relationships (single line) and “equal to” relationships (double line).
Group nodes can contain as many additional nodes/edges as necessary, and can be expanded or condensed for ease of display. They can also be left empty, as in the case of walls that have been named with a group context number but not removed.
Tip: To add a node to a group node, hold down the shift key while you drag the node into the group node. Make sure that the group node is “open” (displaying a minus sign in the upper left-hand corner); if it is “closed” (displaying a plus sign in the upper left-hand corner) you will not be able to add nodes to it.
Properties and Other Data #
The nodes and edges—and the graph as a whole—are encoded with various types of data shown in the “Properties View” panel located on the lower left side of the interface. Most of these data describe the size, color, outline, label placement, label font, etc., of the object you are working on and will be changed minimally or not at all. Some properties can be changed in the main central interface (e.g., you can change the size of a node by clicking and dragging, or by adjusting the size under “General” in the Properties View), while other properties must be changed under the Properties View (e.g., the color of a node).
It is also possible to add properties and new types of data to the defaults. A template yEd document for use in making Harris matrices can be found at the following filepath: gygaia\gisgps\styles_and_templates\yEd_styles_and_templates. The template is already formatted with the necessary properties. If you need to add properties for some reason, however, you can do so by going to Edit>Manage Custom Properties. The Custom Properties apply only to the one document to which they are added, so they will need to be added again if you open a fresh document; they will not copy over if you copy nodes and edges from one document to another.
For our purposes, the following types of data are most important:
Text: this field (under “General”) is used to name and label nodes and edges. You should add the context number here for nodes, but nothing for edges. (Note that for group nodes, you will need to add the text when the node is both “open” and “closed.”)
Description: this describes the kind of node or edge that you are using, and correlates to the sub-table of the context in the database (for nodes) or the type of stratigraphic relationship (for edges). If you pull the shape in from the KAP_hm_symbol section, this field will populate automatically.
context_type: this is a property for nodes and correlates to the context type in the database and in the GIS. The template has been formatted with “Fill” as the default data in this field, so make sure that you change it to the correct context type for each context you add to the Harris matrix.
ea_phase: this is a property for nodes and correlates to the excavation area phase that has been assigned to each context in the database and GIS. Since you will likely be using the Harris matrix as a primary tool to determine phasing, this will be one of the first places that you assign a phase to a context. Phases are also indicated by a node’s position in the swimlane node (see below).
chron_confidence: this is a property for nodes that is meant to indicate the degree of confidence we have in using a given context to determine chronology. The default setting for this property is “Low” but you should indicate when you have “High” confidence in the chronological value of a context (e.g., if it is clearly a primary deposit).
Relationship: this is a property for edges. The edge symbols are limited to “Earlier than” or “Equal to” relationships, so you should use this field to indicate more detailed relationships (e.g., “Earlier than, filled by” as opposed to “Earlier than, covered by”). This field defaults to “Earlier than, covered by,” so make sure that you update it for all other relationships.
Visualizing Data with the Properties Mapper #
As mentioned above, it is possible to create more dynamic visualizations of the Harris matrix on demand by encoding nodes and edges with data and applying different conditions to the graph. To do this, you will go to Edit>Properties Mapper. In this interface, you can write different rules (e.g., turning all nodes coded with ea_phase = 3a to blue) and apply all rules or selected rules to the whole graph simultaneously. These rules apply to the version of yEd that is on your account (rather than to individual documents) and can be exported/imported as necessary.
One rule for this purpose has been developed thus far: a rule to check the direction of edges. To use this tool, go to Edit>Properties Mapper and click the green button in the upper left corner labeled “Imports additional configurations.” Navigate to gygaia\gisgps\kap\styles_and_templates\yEd_styles_and_templates and select “direction_check”. Once imported, the window should look similar to the image below:
Make sure to select the correct line in the “Mappings” table on top. In the “Conversion Details” table, change the style of the target arrow from a simple line to an arrow. Hit “Apply,” then check the matrix and make any necessary changes. When you are done, come back to the Properties Mapper and change the target arrow back to a simple line to make the matrix consistent with KAP’s standard symbology.
You are encouraged to experiment with the Properties Mapper, as long as the final Harris matrix included with your report is consistent with KAP’s standard symbology. If you develop a rule that you think will be helpful for others, let a supervisor know and we can discuss adding it to the Styles and Templates!
Phasing with Swimlane Nodes #
To assist in the process of determining and visualizing phases, we are using an additional tool referred to as a “swimlane node.” These function just like lanes in a swimming pool (hence the name); nodes can be easily dragged between lanes by hand, but will remain in their lane if the graph is reorganized algorithmically (see below).
The template in gygaia\gisgps\styles_and_templates\yEd_styles_and_templates already has a swimlane added and correctly symbolized. However, if you need to add a swimlane, you can do so by going to the “Swimlane Nodes and Table Nodes” section, and dragging the “Horizontal Swimlane” node into the main interface. It should then be recolored to display in white and grey in the Properties View under “General” (for the header) and “Shape” (for the lanes).
Each row in the swimlane should correlate to a phase or subphase, as seen in the example above. To add nodes to a swimlane, hold down shift while you drag the nodes into the correct lane (or phase). New lanes can be added by right clicking on the shape and selecting “Add row.”
Organizing the Harris Matrix #
yEd makes it easy to position nodes and edges in ways that make a complex graph more comprehensible. For example, clicking a spot along an edge and dragging will allow you to create a corner, so edges can be a series of straight lines that minimally overlap, helping to keep things organized.
In the panel on the left side of the screen, there are also multiple windows that enable you to see the data in different ways depending on your needs:
Structure view shows you a hierarchical folder view of all the nodes in the graph, and allows you to search based on different kinds of data.
The Neighborhood panel shows a diagram of everything that has an immediate relationship to the selected node.
The Predecessor panel shows a diagram of everything that comes before the selected node. In the case of Harris matrix production, these should be the contexts that are earlier than (below) the selected node.
The Successor panel shows a diagram of everything that comes after the selected node. In the case of Harris matrix production, these should be the contexts that are later than (above) the selected node.
Algorithmic Layouts #
Another powerful tool that makes yEd attractive for building Harris matrices is its built-in layout algorithms. This allows the software to automatically generate streamlined diagrams according to complex rules. For example, you could automatically change a diagram that was organized hierarchically to one that is organized radially, depending on your needs.
We have yet to establish best practices for algorithmic layouts for Harris matrices, so be on the lookout for updates in this area.