-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhack.R
More file actions
74 lines (55 loc) · 1.9 KB
/
hack.R
File metadata and controls
74 lines (55 loc) · 1.9 KB
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
library(visNetwork)
edges <- read_delim("~/Desktop/edges.csv",
";", escape_double = FALSE, locale = locale(encoding = "latin1"),
trim_ws = TRUE)
nodes <- read_delim("~/Desktop/nodes.csv",
";", escape_double = FALSE, locale = locale(encoding = "latin1"),
trim_ws = TRUE)
nodes$label <- paste(nodes$oeuvre,nodes$artiste,'►', sep = '\n')
edges$label <- edges$lien
# edges$length <- c(180,250,200,300,300,200,180,200,140,230)
# #####################
#
# visNetwork(nodes, edges,
# height = "800px", width = "1200px",
# main = 'Ballade Musicale dans les Trésors Sonores de la BnF') %>%
# visNodes(
# shape = "circle",
# color = list(background = "#50d0dc",
# border = "black",
# highlight = "yellow"),
# image = 'http://gallica.bnf.fr/ark:/12148/bpt6k88059859/f1.highres',
# shadow = list(enabled = TRUE, size = 10)
#
# ) %>%
#
# visOptions(collapse = TRUE) %>%
# visInteraction(navigationButtons = TRUE)
#####################
# WORKIN :
visNetwork(nodes, edges,
height = "800px", width = "640px",
) %>%
visNodes(
shape = "circle",
color = list(background = "#50d0dc",
border = "black",
highlight = "yellow"),
shadow = list(enabled = TRUE, size = 10)
) %>%
visEdges(shadow = TRUE,
color = list(color = "black", highlight = "red")) %>%
visOptions(collapse = TRUE) %>%
visInteraction(navigationButtons = TRUE) %>%
visHierarchicalLayout()
#####################
#
#
# visNetwork(nodes, edges, main = 'Ballade Musicale dans les Trésors Sonores de la BnF') %>%
#
# visNodes(
# shape = "circularImage",
# image = 'http://gallica.bnf.fr/ark:/12148/bpt6k88059859/f1.highres',
# shadow = list(enabled = TRUE, size = 10)
#
# )