lesmis: Co-appearance network of characters in Les Miserables...

Description Usage Format References Examples

Description

A list of two datasets, vertices and edges, containing data on characters and their co-appearance in chapters in Victor Hugo's Les Miserables. The variables are as follows:

Usage

1

Format

A list of two data frames:

References

D. E. Knuth, The Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley, Reading, MA (1993).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# prep the data
lesmisnet <- merge(lesmis$edges, lesmis$vertices, by.x = "from",
                   by.y = "label", all = TRUE)
lesmisnet$degree[is.na(lesmisnet$degree)] <- 0

# create plot
library(geomnet)
library(dplyr)

ggplot(data = lesmisnet, aes(from_id = from, to_id = to,
                             linewidth = degree / 5 + 0.1 )) +
  geom_net(aes(size = degree, alpha = degree),
           colour = "grey30", ecolour = "grey60",
           layout.alg = "fruchtermanreingold", labelon = TRUE, vjust = -0.75) +
  scale_alpha(range = c(0.3, 1)) +
  theme_net()

sctyner/geomnet documentation built on Dec. 1, 2020, 5:30 p.m.