Using data from the well known dataset of relations between
Florentine families Padgett and Ansell
(1993), we will, in this vignette, correct the
betweenness centrality of the resulting social network. The new dataset,
which is included in this package, adds a self-loop that connects the
Medici family with itself; since it was a big family, it did have some
marriages, as reflected by the Medici family tree published in the
Wikipedia. We will use the dupNodes
package (Merelo and Molinari 2024) to compute the
betweenness centrality of the doges social network, which includes
self-loops (some doges married to members of the same extended
family).
This loads this library, as well as loads the igraph
object florentine.sn
, containing the data we’re interested
in.
library(igraph)
print(V(florentine.sn))
#> + 15/15 vertices, named, from f163606:
#> [1] ACCIAIUOL ALBIZZI BARBADORI BISCHERI CASTELLAN GUADAGNI MEDICI
#> [8] PAZZI PERUZZI RIDOLFI GINORI LAMBERTES STROZZI TORNABUON
#> [15] SALVIATI
print(E(florentine.sn))
#> + 36/36 edges from f163606 (vertex names):
#> [1] ACCIAIUOL--MEDICI ALBIZZI --GINORI ALBIZZI --GUADAGNI
#> [4] ALBIZZI --MEDICI BARBADORI--CASTELLAN BARBADORI--MEDICI
#> [7] BISCHERI --GUADAGNI BISCHERI --PERUZZI BISCHERI --STROZZI
#> [10] CASTELLAN--PERUZZI CASTELLAN--STROZZI GUADAGNI --LAMBERTES
#> [13] GUADAGNI --TORNABUON MEDICI --RIDOLFI MEDICI --SALVIATI
#> [16] MEDICI --TORNABUON PAZZI --SALVIATI PERUZZI --STROZZI
#> [19] RIDOLFI --STROZZI RIDOLFI --TORNABUON BARBADORI--CASTELLAN
#> [22] BARBADORI--GINORI BARBADORI--MEDICI BARBADORI--PERUZZI
#> [25] BISCHERI --GUADAGNI BISCHERI --LAMBERTES BISCHERI --PERUZZI
#> [28] CASTELLAN--LAMBERTES CASTELLAN--PERUZZI MEDICI --GINORI
#> + ... omitted several edges
plot(florentine.sn)
print(E(florentine.sn)[which_loop(florentine.sn)])
#> + 1/36 edge from f163606 (vertex names):
#> [1] MEDICI--MEDICI
We have a single self-loop, but in such a small network, it will prove enough to change the values of betweenness centrality. But first we have to convert this graph to another duplicating nodes, to then proceed and compute betweenness centrality.
dn.florentine.sn <- dup.nodes.from.graph(florentine.sn)
V(florentine.sn)$DNSLbetweenness <- betweenness.with.duplicated.nodes(dn.florentine.sn)
Which, shown sorted in a table, are:
DNSLBetweenness <- data.frame( family=V(florentine.sn)$name, betweenness=V(florentine.sn)$DNSLbetweenness)
knitr::kable(DNSLBetweenness[order(DNSLBetweenness$betweenness, decreasing=TRUE),])
family | betweenness | |
---|---|---|
7 | MEDICI | 22.713740 |
3 | BARBADORI | 20.681499 |
6 | GUADAGNI | 12.444657 |
14 | TORNABUON | 8.566008 |
10 | RIDOLFI | 7.473844 |
9 | PERUZZI | 6.679051 |
2 | ALBIZZI | 5.526482 |
5 | CASTELLAN | 4.507246 |
13 | STROZZI | 4.340510 |
4 | BISCHERI | 3.504216 |
12 | LAMBERTES | 2.347951 |
11 | GINORI | 0.501054 |
1 | ACCIAIUOL | 0.000000 |
8 | PAZZI | 0.000000 |
15 | SALVIATI | 0.000000 |
Intra-family links have its importance in the status achieved by a
family; not only supports its resilience, but also explains the position
they have achieved. dupNodes
enables computation of
betweenness with self-loops in a principled way, giving a more accurate
picture of the status of families in its social network. This status can
then be correlated successfully to wealth or position, but this is an
exercise left to the reader.