The aim of the package chessboard
is to provide tools to
work with directed (asymmetric) and
undirected (symmetrical) spatial (or non-spatial)
networks. It implements different methods to detect
neighbors, all based on the chess game (it goes beyond the rook and the
queen available in many R packages) to create complex connectivity
scenarios.
chessboard
aims to easily create various network
objects, including:
n x n
, where n
is the number of
nodes (sampling units) indicating the presence
(1
) or the absence (0
) of an
edge (link) between pairs of nodes.
chessboard
can handle spatial networks, but it does not
explicitly use geographical coordinates to find neighbors (it is not
based on spatial distance). Instead, it identifies neighbors according
to node labels (i.e. the node position on a
two-dimension chessboard) and a specific method (pawn, fool, rook,
bishop, knight, queen, wizard, etc.) derived from the chess game.
The package chessboard
is designed to work with
two-dimensional networks (i.e. sampling on a regular grid), where one
dimension is called transect and the other is called
quadrat. By convention, the dimension
transect corresponds to the x-axis, and the
quadrat corresponds to the y-axis (Fig. 1).
chessboard
can also deal with one-dimensional network
(either transect-only or
quadrat-only).
The network can be undirected or directed. If the network is directed, it will have (by default) these two orientations:
chessboard
implements the following rules to detect
neighbors and to create edges:
the degree of neighborhood: the number of adjacent nodes that will be used to create direct edges.
the orientation of neighborhood: can neighbors be detected horizontally, vertically and/or diagonally?
the direction of neighborhood: does the sampling has a main direction? This can be particularly relevant for directed networks (e.g. rivers).
The Figure 2 shows the general workflow and the main features of
chessboard
.
The package chessboard
comes with a real-world example:
a survey sampling along the French river L’Adour (Fig. 3).
L’Adour is a river in southwestern France. It rises in the
Pyrenees and flows into the Atlantic Ocean (Bay of Biscay). It’s
oriented from south-east (upstream) to north-west (downstream).