https://github.com/compnet/trajannet
Extraction and analysis of a Trajan-related social network
https://github.com/compnet/trajannet
history roman-empire signed-graph social-network trajan
Last synced: 5 months ago
JSON representation
Extraction and analysis of a Trajan-related social network
- Host: GitHub
- URL: https://github.com/compnet/trajannet
- Owner: CompNet
- License: gpl-3.0
- Created: 2019-01-09T12:28:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T09:25:41.000Z (over 1 year ago)
- Last Synced: 2025-09-10T05:06:36.277Z (9 months ago)
- Topics: history, roman-empire, signed-graph, social-network, trajan
- Language: R
- Homepage:
- Size: 38.9 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TrajanNet
=======
*Extraction and analysis of a [Trajan](https://en.wikipedia.org/wiki/Trajan)-related social network*
* Copyright 2019-2020 Vincent Labatut
TrajanNet is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For source availability and license information see `licence.txt`
* Lab site: http://lia.univ-avignon.fr/
* GitHub repo: https://github.com/CompNet/TrajanNet
* Data: https://doi.org/10.5281/zenodo.6814111
* Contact: Vincent Labatut
-----------------------------------------------------------------------

# Description
This set of R scripts aims at analyzing a historical dataset describing the relationships between the Roman emperor Trajan and his entourage. It does the following:
1. Extracts various networks based on some tabular data containing individual and relational attributes.
2. Computes a number of statistics and generates the corresponding plots, for both the tables and graphs.
3. Performs a sequence analysis of certain chronological attributes.
If you use these scripts or the associated data, please cite the reference [[V'20](#references)]:
```
@MastersThesis{Vallet2020,
author = {Vallet, Gaëtane},
title = {Les princes et les hommes : carrières et réseaux dans l'entourage de Trajan de 98 à 118 après J.-C.},
year = {2020},
type = {MA Thesis},
institution = {Avignon University},
}
```
# Data
The raw dataset was manually elaborated by Gaëtane Vallet during her Master's thesis in ancient history. See her thesis (in French) for more information [[V'18](#references), [V'20](#references)]. The files produced by the scripts (graphs, plots, tables...) can be obtained by executing them, but they are also directly available on [Zenodo](https://doi.org/10.5281/zenodo.6814111).
# Organization
Here are the folders composing the project:
* Folder `data`: contains the data used by the R scripts, as well as produced by them.
* Folder `tables`: input data presented as the following CSV tables
* `trajan_attributes.csv`: individual description of each historical character in the dataset.
* `trajan_careers.csv`: careers of the character, described as sequences of positions.
* `trajan_positions.csv`: list of professional positions a character can hold.
* `trajan_relations.csv`: connections between the characters.
* `trajan_typical_careers.csv`: ideal careers, described as sequences of positions.
* Folder `nets`: networks procuded by the scripts, and the associated plots and tables.
* Folder `all`: network containing all the types of links at once (multiplex signed network).
* Folder `family`: network with only the family ties (uniplex signed network).
* Folder `friend`: network with only the friendship ties (uniplex unsigned network).
* Folder `pro`: network with only the professional ties (uniplex signed network).
* Folder `unknown`: network with relationships whose exact nature is unknown (uniplex signed network).
* Folder `signed`: signed network with no distinction between relationship types (signed collapsed multiplex network).
* Folder `na-as-positive*`: network obtained by considering the links whose sign is unknown as positive ones.
* Folder `na-as-ignored*`: network obtained by discarding the links whose sign is unknown.
* Folder `*-closure`: closure of the signed network obtained using *strong* structural balance.
* Folder `*-closure-poly`: closure of the signed network obtained using *weak* structural balance.
* Folder `attributes`: descriptive results obtained for the individual attributes.
* Folder `sequences`: descriptive results obtained for the individual attributes.
* Folder `withNAs`: gaps in careers are explicitly represented as missing values.
* Folder `withoutNAs`: gaps in careers are not represented at all.
* Folder `src`: contains the `R` source code.
# Installation
You just need to install `R` and the required packages:
1. Install the [`R` language](https://www.r-project.org/)
2. Download this project from GitHub and unzip.
3. Install the required packages:
1. Open the `R` console.
2. Set the current directory as the working directory, using `setwd("")`.
3. Run the install script `src/install.R`.
# Use
In order to extract the networks from the raw data, compute the statistics, and generate the plots:
1. Open the `R` console.
2. Set the current directory as the working directory, using `setwd("")`.
3. Run the main script `src/main.R`.
The scripts will produce a number of files in the subfolders of folder `nets`. They are grouped in subsubfolders, each one corresponding to a specific topological measure (degree, closeness, etc.).
The `verification.R` was used to check the consistency of the raw data. The rest of the scripts are just secondary functions called by `main.R`.
# Dependencies
* [`igraph`](http://igraph.org/r/) package: build and handle graphs.
* [`signnet`](https://github.com/schochastics/signnet): analysis of signed graphs.
* [`graphlayouts`](https://cran.rstudio.com/web/packages/graphlayouts): plot graphs.
* [`ggraph`](https://cran.rstudio.com/web/packages/ggraph): plot graphs.
* [`TraMineR`](http://traminer.unige.ch/): sequence analysis.
* [`SDMTools`](https://cran.rstudio.com/web/packages/SDMTools): misc.
* [`scales`](https://cran.rstudio.com/web/packages/scales): color conversion.
* [`circlize`](https://cran.rstudio.com/web/packages/scales): circos-type plots.
* [`plot.matrix`](https://cran.rstudio.com/web/packages/scales): matrix plots.
* [`alluvial`](https://cran.rstudio.com/web/packages/scales): alluvial diagrams.
* [`cluster`](https://cran.rstudio.com/web/packages/scales): cluster analysis.
* [`dendextend`](https://cran.rstudio.com/web/packages/scales): dendrogram-related features.
# To-do List
* Signed nets:
* Consider the evolution of the relationships
* Synchronous closure, separate the different steps until complete graph
* Structural similarity between spaniards / the rest (and other attributes)
* Multiplex plot of the different types of links (didn't find an appropriate tool)
# References
* **[V'20]** Vallet, G. *Les princes et les hommes : carrières et réseaux dans l’entourage de Trajan de 98 à 118 après J.-C.*, Second part of the Master's thesis, Avignon University, Human and Social Sciences Faculty, History Department, Avignon, France.
* **[V'18]** Vallet, G. *L'entourage de Trajan : étude prosopographique de l'entourage du prince de 98-117 apr. J.-C.*, First part of the Master's thesis, Avignon University, Human and Social Sciences Faculty, History Department, Avignon, France.