Maps.knit

#
Cartographical maps and networks

####
Antonio Rivero Ostoic

#### August 2022

### Preliminaries

Install and load a version of `"sdam"` package.

    install.packages("sdam") # from CRAN
    devtools::install_github("sdam-au/sdam") # development version
    devtools::install_github("mplex/cedhar", subdir="pkg/sdam") # legacy version R 3.6.x

    # load and check versions
    library(sdam)
    packageVersion("sdam")

    [1] '1.1.4'

## Cartographical maps

Cartographical maps of Roman provinces under Emperors Trajan and Hadrian (year 117AD), and Italian regions under Emperor Augustus (year 27 BC) are part of the suite of datasets of the `"sdam"` package. For instance, four cartographical maps related to the Roman Empire in the antiquity period are available in dataset `"retn"` that is loaded by function `plot.map()` to depict cartographical maps and transportation systems. `plot.map()` is an interface that also invokes datasets `"rpmp"` for names and vector shapes of Roman provinces and regions, and dataset `"rpmcd"` for including map captions and dates in the plot.

### Political division

Plotting political divisions of the Roman Empire needs the `'type'` argument of function `plot.map()` as well.

    # Roman provinces
    plot.map(type="rp")

    # senatorial/imperial division
    plot.map(type="si", main="Roman Empire (AD 117)")

### Roman provinces and regions

- Roman provinces and regions shapes and colours for `plot.map()` are in dataset `"rpmp"`, while the acronyms in `x` are as in dataset `"rp"`.

    # Italian peninsula silhouette
    plot.map(x="Ita")

    # Roman province with establishment date
    plot.map(x="Bri", date=TRUE)

    # Italian region
    plot.map(x="VeH", cap=FALSE, fsize=12)

### Transportation system

A `plain` cartographical map with a Roman transportation system made of settlements and terrestrial and maritime routes is possible with the `type` argument in `plot.map()`, or else by specifying with arguments `settl`, `roads`, and `shipr` for the settlements and this routes in the transportation system.

    # settlements and main roads
    plot.map(type="plain", settl=TRUE, roads=TRUE)

    # settlements and main shipping routes
    plot.map(type="plain", settl=TRUE, shipr=TRUE)

## Graphs

### Shipwrecks network

Graph representations of the transport network is possible with packages `"multigraph"` and `"multiplex"`.

Access to the shipwrecks dataset.

    # shipwrecks dataset
    sw <- system.file("extdata","StraussShipwrecks.csv",package="sdam") |>
      read.csv(sep=";")

    # variables are checked
    colnames(sw)

     [1] "Wreck.ID"                "Strauss.ID"              "Name"
     [4] "Parker.Number"           "Sea.area"                "Country"
     [7] "Region"                  "Latitude"                "Longitude"
    [10] "Min.depth"               "Max.depth"               "Depth"
    [13] "Period"                  "Dating"                  "Earliest.date"
    [16] "Latest.date"             "Date.range"              "Mid.point.of.date.range"
    [19] "Probability"             "Place.of.origin"         "Place.of.destination"
    [22] "Reference"               "Comments"                "Amphorae"
    [25] "Marble"                  "Columns.etc"             "Sarcophagi"
    [28] "Blocks"                  "Marble.type"             "Other.cargo"
    [31] "Hull.remains"            "Shipboard.paraphernalia" "Ship.equipment"
    [34] "Estimated.tonnage"       "Amphora.type"

A system of maritime routes is found in variables `Place.of.origin` and `Place.of.destination`, which correspond to columns 20 to 21 in `sw`. This edge list needs some transformations with functions from packages `"sdam"` and `"multiplex"` to be able to plot the shipwrecks network as a directed graph with loops with a force directed layout.

    # graph of shipwrecks network
    sw[, 20:21] |>
      sdam::cln(level=2, what=c("(",")"), case=1, na.rm=TRUE) |>
      multiplex::transf(type="toarray") |>
      multigraph::multigraph(layout="force", seed=123, loops=TRUE, ecol=4, sel="Rome")

In this case, a single node is labeled in the graph that represents the shipwrecks network without missing information. To keep records with `NA` in the data, function `cln()` has the `'na.rm'` argument to be set to `FALSE`.

References for shipwrecks data are in

- Vignette Datasets in `"sdam"` package

¨

### See also

#### Vignettes

- Datasets in `"sdam"` package

- Re-encoding `people` in the `EDH` dataset

- Dates and missing dating data

#### Reference Manual

- sdam: Digital Tools for the SDAM Project at Aarhus University
- `"sdam"` manual

#### Project

- Release candidate version
- Code snippets using `"sdam"`
- Social Dynamics and complexity in the Ancient Mediterranean project