-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAmalvy2024.R
88 lines (53 loc) · 2.24 KB
/
Amalvy2024.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This script extracts the comics networks used in the following paper:
#
# Arthur Amalvy, Madeleine Janickyj, Shane Mannion, Pádraig MacCarron & Vincent Labatut,
# “Interconnected Kingdoms: comparing ‘A Song of Ice and Fire’ adaptations across media using complex networks,”
# Social Network Analysis and Mining 14:199, 2024.
# DOI: 10.1007/s13278-024-01365-z
#
# Vincent Labatut
# 02/2023
#
# setwd("~/vlabatut/Eclipse/workspaces/Networks/NaNet")
# setwd("C:/Users/Vincent/Eclipse/workspaces/Networks/NaNet")
# source("src/dev_ASOIAF.R")
###############################################################################
###############################################################################
# setup parameters
SERIES <- "ASOIAF"
# note on scene ordering: publication="as in comic books" vs. story="as in novel chapters"
###############################################################################
# load scripts
source("src/common/_include.R")
source("src/post/asoiaf/_all.R")
# start logging
start.rec.log(text=SERIES)
###############################################################################
# read raw data
data <- read.raw.data.asoiaf()
# OR, if already computed, read from file
#data <- read.corpus.data(char.det="implicit")
# compute corpus stats
data <- compute.corpus.stats(data=data, char.det="implicit")
# plot these stats
plot.corpus.stats(data=data, char.det="implicit")
###############################################################################
# extract scene-based networks
data <- extract.static.graphs.base(data=data)
# plot these graphs
plot.static.graphs(data=data)
###############################################################################
# compute scene-based graph stats
compute.static.statistics.base(data=data, char.det="implicit")
# plot these stats
generate.static.plots.base(data=data)
###############################################################################
# extract dynamic networks
extract.dyn.nets.asoiaf(data, narr.units=c("scene", "chapter"))
# plot these networks
# TODO
# compute and plot a few measures
plot.dyn.props.asoiaf(data, narr.units=c("scene", "chapter"))
###############################################################################
# stop logging
end.rec.log()