library(aion)
library(igraph)
A stratigraphic graph represents the directed relationships between temporal units (archaeological deposits), from the most recent to the oldest (Harris 1997). It can be formally defined as a directed acyclic graph (DAG), in which each vertex represents a layer and the edges represent stratigraphic relations.
At the most basic level, stratigraphic relations can be captured in a two-column matrix
(or data.frame
) of edges, where each row represents a relation element.
## Harris 1997, fig. 12
harris <- data.frame(
X = c(1, 1, 1, 2, 3, 4, 5, 6, 6, 7, 8),
Y = c(2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 9)
)
This table of relations can then be used to create a graph. Note that these relations are to be read from the top of the stratigraphic sequence to the bottom (“X is above/later than Y”), but the reverse is possible by changing the direction
argument in graph_create()
.
## Create a graph object
g <- graph_create(harris, direction = "above", type = "stratigraphy")
Multiple edges and loop edges may need to be removed, as well as redundant relations (by transitive reduction):
## Remove redundant relations
g <- graph_prune(g)
Finally, the graph can be plotted with an appropriate layout:
plot(g, layout = layout_with_sugiyama)
plot of chunk plot
A stratigraphic graph can also be used to represent temporal relations (posteriority) within a set of time intervals:
## Seven time intervals expressed in years CE
int <- intervals(
start = c(1, 2, 3, 6, 9, 13, 17),
end = c(7, 4, 15, 14, 11, 18, 19),
calendar = CE(),
names = c("A", "B", "C", "D", "E", "F", "G")
)
## Create a stratigraphic graph
strati <- graph_create(int, type = "stratigraphy")
## Remove redundant relations
strati <- graph_prune(strati)
Equivalence relations (i.e. at least partial contemporaneity) can also be represented with an interval graph:
## Create an interval graph
inter <- graph_create(int, type = "interval")
These two graphs therefore capture all temporal relations:
## Stratigraphic graph
plot(strati, layout = layout_with_sugiyama)
## Interval graph
plot(inter)
plot of chunk graphs
Harris, Edward C., 1997. Principles of Archaeological Stratigraphy. Seconde edition. Academic Press.