-
Notifications
You must be signed in to change notification settings - Fork 10
/
detangler_file_description
325 lines (293 loc) · 7.41 KB
/
detangler_file_description
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#############################################################################################
#
# Detangler JSON File Description, HowTo:
#
#############################################################################################
#############################################################################################
#
# {"nodes": [...], "links": []}
#
# The highest level contains the lists of nodes and links
#
#############################################################################################
#############################################################################################
#
# {"nodes":[
# {
# "id": 1,
# "label": "NodeLabel",
# "x": 123,
# "y": 456,
# "descriptors": "catalyst1;catalyst2;catalyst3"
# },
# ...
# ],
# ...}
#
# One node object, in the node list is described as follows:
# - It has a unique "id" to be recognizable later by edges
# - A label to be displayed
# - X and Y position (numerical values) for the graph's initial layout
# - descriptors: a list of catalysts separated by a semicolon ';'
# if catalysts do not apply to nodes, just concatenate the catalyst
# of the node's connecting edges
#
# Any other properties can be attached to nodes as well
# Alternative lists of catalysts can also be attached
#
#############################################################################################
#############################################################################################
#
# {...,
# "links":[
# {
# "id": 1,
# "source": 1,
# "target": 2,
# "descriptors": "catalyst3;catalyst4"
# },
# ...
# ]}
#
# One link object, in the links list, is described as follow:
# - It has a unique identifier 'id'
# - A node ID as the source, the link's source node
# - A node ID as the target, the link's target node
# - descriptors: the list of catalysts that connect the source node to the target node
#
#############################################################################################
#############################################################################################
#
# How to apply the model of the paper "Detangler: Visual Analytics for Multiplex Networks"?
#
#############################################################################################
In this model, we describe a multiplex networks where nodes (substrates) are connected
by different families of edges (catalysts).
To translate this data model to detangler's file description you need to 'flatten' the
multiplex network.
For every pair of nodes, you will create only 1 link that concatenates all the catalysts
joining the two nodes.
If catalysts are not natively attached to nodes, you can attach to every node its connecting
catalysts.
For example imagine you have the situation:
"node1 --- node2", where "node1" and "node2" are two different nodes, and "---" is a catalyst
connecting "node1" and "node2", we will refer to "---" as the 'catalyst(-)'
Now consider the following multiplex graph:
a- node1 --- node2
b- node1 +++ node2
c- node1 ~~~ node2
d- node1 === node3
e- node1 --- node3
f- node2 --- node3
"node1" and "node2" are connected through catalysts: catalyst(-), catalyst(+), and catalyst(~)
concatenating a-, b-, and c-
"node1" and "node3" are connected through catalysts: catalyst(+), and catalyst(=)
concatenating d-, e-
"node2" and "node3" are connected through catalysts: catalyst(-)
from f-
the surrounding catalysts of "node1" are: catalyst(-), catalyst(+), catalyst(~) and catalyst(=)
because of links a-, b-, c-, d-, and e-
the surrounding catalysts of "node2" are: catalyst(-), catalyst(+), and catalyst(~)
because of links a-, b-, and c-
the surrounding catalysts of "node3" are: catalyst(-), and catalyst(=)
because of links d-, e-, and f-
the description of this graph will be (available as toy_example.json):
{"nodes":[
{
"id":1,
"label":"node1",
"x":0,
"y":0,
"descriptors":"catalyst(-);catalyst(+);catalyst(~);catalyst(=)"
},
{
"id":2,
"label":"node2",
"x":1,
"y":1,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)"
},
{
"id":3,
"label":"node3",
"x":2,
"y":0,
"descriptors":"catalyst(-);catalyst(=)"
}],
"links":[
{
"id":1,
"source":1,
"target":2,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)"
},
{
"id":2,
"source":1,
"target":3,
"descriptors":"catalyst(-);catalyst(=)"
},
{
"id":3,
"source":2,
"target":3,
"descriptors":"catalyst(-)"
}]
}
#############################################################################################
#
# Additionnal information
#
#############################################################################################
#############################################################################################
# Multiple properties can be attached to nodes, links and layers.
# This is done with an additional "layers" dictionary such as:
{"nodes":[
{
"id":1,
"label":"node1",
"x":0,
"y":0,
"descriptors":"catalyst(-);catalyst(+);catalyst(~);catalyst(=)"
},
{
"id":2,
"label":"node2",
"x":1,
"y":1,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)"
},
{
"id":3,
"label":"node3",
"x":2,
"y":0,
"descriptors":"catalyst(-);catalyst(=)"
}],
"links":[
{
"id":1,
"source":1,
"target":2,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)"
},
{
"id":2,
"source":1,
"target":3,
"descriptors":"catalyst(-);catalyst(=)"
},
{
"id":3,
"source":2,
"target":3,
"descriptors":"catalyst(-)"
}],
"layers":{
"catalyst(-)":
{
"other":"minus",
"order":2
},
"catalyst(+)":
{
"other":"plus",
"order":2
},
"catalyst(~)":
{
"other":"tilde",
"order":2
},
"catalyst(=)":
{
"other":"equal",
"order":2
}}
}
#############################################################################################
# Multiple types of multilayer are supported (through the OpenView in the subtrate graph)
# Multiple multilayers can be coordinated together
# The file format should then be:
{"nodes":[
{
"id":1,
"label":"node1",
"x":0,
"y":0,
"descriptors":"catalyst(-);catalyst(+);catalyst(~);catalyst(=)",
"something_else":"(a);(b);(c);(d)"
},
{
"id":2,
"label":"node2",
"x":1,
"y":1,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)",
"something_else":"(a);(b);(c);(d)"
},
{
"id":3,
"label":"node3",
"x":2,
"y":0,
"descriptors":"catalyst(-);catalyst(=)",
"something_else":"(a);(b);(c);(d)"
}],
"links":[
{
"id":1,
"source":1,
"target":2,
"descriptors":"catalyst(-);catalyst(+);catalyst(~)",
"something_else":"(a);(b);(c);(d)"
},
{
"id":2,
"source":1,
"target":3,
"descriptors":"catalyst(-);catalyst(=)",
"something_else":"(a);(b);(c);(d)"
},
{
"id":3,
"source":2,
"target":3,
"descriptors":"catalyst(-)",
"something_else":"(a);(b);(c);(d)"
}],
"layers":{
"catalyst(-)":
{
"other":"minus",
"order":2
},
"catalyst(+)":
{
"other":"plus",
"order":2
},
"catalyst(~)":
{
"other":"tilde",
"order":2
},
"catalyst(=)":
{
"other":"equal",
"order":2
},
"(a)":
{
"other":"equal",
"order":2
}}
}
#############################################################################################
#
# Paper reference:
# "Detangler: Visual Analytics for Multiplex Networks"
# Benjamin Renoust, Guy Melançon, Tamara Munzner. Computer Graphics Forum, May. 2015.
# DOI: 10.1111/cgf.12644 http://renoust.com/pub/detangler.pdf
#
#############################################################################################