AseemD commited on
Commit
0ee871b
·
verified ·
1 Parent(s): 4ac1a8c

Upload 12 files

Browse files
app.py ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import streamlit as st
3
+ import plotly.express as px
4
+ import streamlit.components.v1 as components
5
+
6
+
7
+ def character_evolution(character_list):
8
+ index = ['Philosopher\'s Stone',
9
+ 'Chamber of Secrets',
10
+ 'Prisoner of Azkaban',
11
+ 'Goblet of Fire',
12
+ 'Order of the Phoenix',
13
+ 'Half-Blood Prince',
14
+ 'Deathly Hallows']
15
+
16
+ df = pd.read_csv('character_evolution.csv')
17
+ df = df.set_index(pd.Index(index))
18
+
19
+ fig = px.line(df[character_list], markers=True)
20
+ fig.update_layout(height=550,
21
+ width=1000,
22
+ xaxis_title="",
23
+ yaxis_title="Importance",
24
+ title={'text': "Evolution of Characters over the Books",
25
+ 'y': 0.95,
26
+ 'x': 0.5,
27
+ 'xanchor': 'center',
28
+ 'yanchor': 'top'})
29
+ left, middle, right = st.columns((2, 5, 2))
30
+ with middle:
31
+ st.plotly_chart(fig, theme=None, use_container_width=False)
32
+
33
+
34
+ def main():
35
+ df = pd.read_csv('character_evolution.csv')
36
+
37
+ st.set_page_config(layout="wide")
38
+ st.title("Relationship Extraction in Harry Potter Books")
39
+ st.write('')
40
+ st.write('')
41
+
42
+ # Select Type of Analysis
43
+ tab1, tab2 = st.tabs(['Network Graphs',
44
+ 'Evolution of Characters'
45
+ ])
46
+
47
+ # Network Graphs
48
+ with tab1:
49
+ st.write('')
50
+ book = st.selectbox('Pick a Book to generate its graph',
51
+ ['1. Philosopher\'s Stone',
52
+ '2. Chamber of Secrets',
53
+ '3. Prisoner of Azkaban',
54
+ '4. Goblet of Fire',
55
+ '5. Order of the Phoenix',
56
+ '6. Half-Blood Prince',
57
+ '7. Deathly Hallows',
58
+ 'All Books Combined'])
59
+
60
+ if st.button('Show Graph'):
61
+ left, middle, right = st.columns((1, 5, 1))
62
+ with middle:
63
+ st.write('')
64
+ HtmlFile = open(f'graphs/{book}.html', 'r', encoding='utf-8')
65
+ components.html(HtmlFile.read(), height=1500, width=1000)
66
+
67
+ # Evolution of Characters
68
+ with tab2:
69
+ st.write('')
70
+ character_list = st.multiselect('Select Characters', list(df.columns)[1:])
71
+ if st.button('Plot'):
72
+ st.write('')
73
+ character_evolution(character_list)
74
+
75
+
76
+ if __name__ == '__main__':
77
+ main()
character_evolution.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ ,Dumbledore,Voldemort,Godric,Albus,James,Harry,Hagrid,Dudley,Petunia,Vernon,Dennis,Marge,Griphook,Hedwig,Ginny,Percy,Fred,Ron,Lee,Bill,Charlie,Neville,Hermione,Scabbers,Malfoy,Goyle,Hannah,Susan,Terry,Bloody,Seamus,Snape,Peeves,Fang,Dean,Parvati,Oliver,Angelina,Fluffy,Norbert,Ronan,Bane,Firenze,Nicolas,Dobby,Errol,Arthur,Molly,Minerva,Colin,Crabbe,Alicia,Katie,Myrtle,Justin,Millicent,Ernie,Fawkes,Marvolo,Cornelius,Aragog,Salazar,Lily,Stan,Crookshanks,Lavender,Buckbeak,Pansy,Trevor,Sirius,Madam,Cho,Penelope,Peter,Remus,Poppy,Bertha,Frank,Nagini,Cedric,Amos,Ludo,Barty,Winky,Rita,Pigwidgeon,Thomas,Viktor,Fleur,Padma,Alastor,Aberforth,Gabrielle,Antonin,Lucius,Mafalda,Nymphadora,Kingsley,Kreacher,Andromeda,Bellatrix,Bob,Sturgis,Mundungus,Luna,Alice,Zacharias,Wilhelmina,Anthony,Marietta,Dolores,Olympe,Phineas,Gilderoy,Sybill,Grawp,Magorian,Narcissa,Horace,Blaise,Nott,Augusta,Morfin,Merope,Peverell,Romilda,Cormac,Argus,Fenrir,Hokey,Amycus,Alecto,Pius,Percival,Kendra,Ariana,Dedalus,Ted,Travers,Beedle,Xenophilius,Elphias,Bathilda,Albert,Dirk,Gornuk,Gellert,Scabior,Bogrod,Helena
2
+ 0,0.32558139534883723,0.18604651162790697,0.023255813953488372,0.046511627906976744,0.023255813953488372,0.8837209302325582,0.41860465116279066,0.20930232558139533,0.046511627906976744,0.023255813953488372,0.023255813953488372,0.046511627906976744,0.046511627906976744,0.11627906976744186,0.09302325581395349,0.23255813953488372,0.18604651162790697,0.5813953488372093,0.023255813953488372,0.09302325581395349,0.18604651162790697,0.3023255813953488,0.23255813953488372,0.046511627906976744,0.27906976744186046,0.16279069767441862,0.06976744186046512,0.046511627906976744,0.046511627906976744,0.11627906976744186,0.11627906976744186,0.3023255813953488,0.09302325581395349,0.11627906976744186,0.06976744186046512,0.046511627906976744,0.023255813953488372,0.06976744186046512,0.11627906976744186,0.16279069767441862,0.09302325581395349,0.13953488372093023,0.09302325581395349,0.046511627906976744,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3
+ 1,0.3333333333333333,0.08333333333333333,,0.041666666666666664,,0.8333333333333333,0.35416666666666663,0.08333333333333333,0.08333333333333333,0.041666666666666664,,,,0.08333333333333333,0.2708333333333333,0.20833333333333331,0.22916666666666666,0.6041666666666666,0.020833333333333332,0.10416666666666666,0.0625,0.22916666666666666,0.375,0.041666666666666664,0.35416666666666663,0.16666666666666666,0.0625,,,0.041666666666666664,0.10416666666666666,0.22916666666666666,0.08333333333333333,0.08333333333333333,0.125,0.020833333333333332,0.020833333333333332,0.020833333333333332,,,,,,,0.22916666666666666,0.08333333333333333,0.08333333333333333,0.041666666666666664,0.041666666666666664,0.20833333333333331,0.08333333333333333,0.0625,0.020833333333333332,0.14583333333333331,0.1875,0.020833333333333332,0.125,0.10416666666666666,0.020833333333333332,0.041666666666666664,0.08333333333333333,0.020833333333333332,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4
+ 2,0.3137254901960784,0.1764705882352941,,,0.21568627450980393,0.9411764705882353,0.27450980392156865,0.0784313725490196,0.0784313725490196,0.058823529411764705,,0.058823529411764705,,0.11764705882352941,0.09803921568627451,0.1764705882352941,0.27450980392156865,0.5294117647058824,0.0784313725490196,0.058823529411764705,,0.21568627450980393,0.39215686274509803,0.1568627450980392,0.37254901960784315,0.19607843137254902,,,,,0.0784313725490196,0.3137254901960784,0.058823529411764705,0.0784313725490196,0.0784313725490196,0.11764705882352941,0.0392156862745098,0.11764705882352941,,0.0196078431372549,,,,,,0.0784313725490196,0.0196078431372549,0.0196078431372549,0.0196078431372549,0.0196078431372549,,0.11764705882352941,0.11764705882352941,,,,0.0392156862745098,,,,,,0.058823529411764705,0.0784313725490196,0.13725490196078433,0.09803921568627451,0.21568627450980393,0.09803921568627451,0.0392156862745098,0.21568627450980393,0.0392156862745098,0.058823529411764705,0.0784313725490196,0.1764705882352941,0.0784313725490196,0.0392156862745098,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5
+ 3,0.5074626865671642,0.2537313432835821,,0.029850746268656716,,0.8059701492537313,0.3731343283582089,0.1044776119402985,0.05970149253731343,,0.029850746268656716,,,0.1791044776119403,0.14925373134328357,0.2537313432835821,0.31343283582089554,0.6268656716417911,0.05970149253731343,0.14925373134328357,0.11940298507462686,0.22388059701492538,0.43283582089552236,0.029850746268656716,0.23880597014925373,0.1044776119402985,,,,0.04477611940298507,0.11940298507462686,0.31343283582089554,0.04477611940298507,0.05970149253731343,0.1044776119402985,0.16417910447761194,,0.08955223880597014,,0.04477611940298507,,,,,0.13432835820895522,0.029850746268656716,0.04477611940298507,0.014925373134328358,0.05970149253731343,0.05970149253731343,,0.029850746268656716,,0.05970149253731343,,,0.029850746268656716,0.014925373134328358,,0.029850746268656716,,,,,0.029850746268656716,0.05970149253731343,0.08955223880597014,0.05970149253731343,0.029850746268656716,0.1791044776119403,,0.13432835820895522,,0.014925373134328358,,,0.08955223880597014,0.05970149253731343,0.029850746268656716,0.11940298507462686,0.014925373134328358,0.014925373134328358,0.11940298507462686,0.13432835820895522,0.13432835820895522,0.07462686567164178,0.029850746268656716,0.08955223880597014,0.16417910447761194,0.1044776119402985,0.029850746268656716,0.014925373134328358,0.04477611940298507,0.014925373134328358,0.029850746268656716,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6
+ 4,0.4606741573033708,0.21348314606741572,,,0.0898876404494382,0.8314606741573034,0.3033707865168539,0.12359550561797752,0.0449438202247191,0.033707865168539325,0.02247191011235955,0.02247191011235955,,0.10112359550561797,0.2584269662921348,0.0898876404494382,0.2696629213483146,0.6067415730337078,0.12359550561797752,0.10112359550561797,0.033707865168539325,0.2696629213483146,0.4157303370786517,,0.2808988764044944,0.10112359550561797,0.033707865168539325,,,0.033707865168539325,0.10112359550561797,0.23595505617977527,0.11235955056179775,0.033707865168539325,0.0898876404494382,0.1348314606741573,0.02247191011235955,0.16853932584269662,,0.0449438202247191,0.02247191011235955,0.056179775280898875,0.10112359550561797,,0.11235955056179775,,0.1348314606741573,0.10112359550561797,0.056179775280898875,0.0449438202247191,0.033707865168539325,0.0898876404494382,0.07865168539325842,,0.02247191011235955,,0.10112359550561797,0.02247191011235955,,0.02247191011235955,0.02247191011235955,,0.011235955056179775,0.02247191011235955,0.033707865168539325,0.033707865168539325,0.0449438202247191,0.0898876404494382,0.02247191011235955,0.2584269662921348,,0.20224719101123595,,,0.011235955056179775,,,0.02247191011235955,,0.02247191011235955,,,,0.011235955056179775,0.056179775280898875,0.02247191011235955,,0.011235955056179775,,,0.033707865168539325,0.02247191011235955,,,0.02247191011235955,0.011235955056179775,0.02247191011235955,0.11235955056179775,0.1348314606741573,0.033707865168539325,0.1348314606741573,0.02247191011235955,0.0898876404494382,0.02247191011235955,0.23595505617977527,0.033707865168539325,0.07865168539325842,0.011235955056179775,0.02247191011235955,0.06741573033707865,0.011235955056179775,0.033707865168539325,0.02247191011235955,0.033707865168539325,0.033707865168539325,0.07865168539325842,0.06741573033707865,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7
+ 5,0.5194805194805195,0.25974025974025977,,0.025974025974025976,0.05194805194805195,0.8831168831168832,0.25974025974025977,0.05194805194805195,0.03896103896103896,,,,,0.05194805194805195,0.2337662337662338,0.07792207792207792,0.12987012987012989,0.5064935064935066,,0.18181818181818182,0.03896103896103896,0.2207792207792208,0.37662337662337664,,0.27272727272727276,0.07792207792207792,0.025974025974025976,,,0.012987012987012988,0.09090909090909091,0.33766233766233766,0.03896103896103896,0.05194805194805195,0.1168831168831169,0.1038961038961039,,,,,,,0.06493506493506494,,0.06493506493506494,,0.09090909090909091,0.03896103896103896,,,0.025974025974025976,,0.12987012987012989,0.025974025974025976,,,0.05194805194805195,0.025974025974025976,0.06493506493506494,0.012987012987012988,0.05194805194805195,,0.03896103896103896,0.025974025974025976,,0.06493506493506494,0.05194805194805195,0.03896103896103896,0.025974025974025976,0.12987012987012989,0.05194805194805195,0.05194805194805195,,,0.025974025974025976,,,,0.012987012987012988,,,,0.012987012987012988,,,,,,0.16883116883116883,,,,0.03896103896103896,,0.025974025974025976,,0.025974025974025976,,0.09090909090909091,,0.07792207792207792,0.012987012987012988,,0.025974025974025976,0.1168831168831169,,0.025974025974025976,,,0.025974025974025976,,,,,,0.05194805194805195,,0.012987012987012988,0.03896103896103896,0.06493506493506494,0.03896103896103896,0.012987012987012988,0.07792207792207792,0.06493506493506494,0.012987012987012988,0.025974025974025976,0.025974025974025976,0.012987012987012988,0.03896103896103896,0.05194805194805195,0.05194805194805195,0.03896103896103896,,,,,,,,,,,,,,,,,,
8
+ 6,0.4222222222222222,0.33333333333333337,0.1,0.18888888888888888,0.13333333333333333,0.888888888888889,0.22222222222222224,0.08888888888888889,0.08888888888888889,0.044444444444444446,,,0.23333333333333334,0.07777777777777778,0.22222222222222224,0.13333333333333333,0.14444444444444446,0.6222222222222222,0.06666666666666667,0.23333333333333334,0.08888888888888889,0.18888888888888888,0.4444444444444445,,0.1,0.07777777777777778,,,0.022222222222222223,,0.05555555555555556,0.3,0.05555555555555556,0.03333333333333333,0.15555555555555556,0.03333333333333333,,,,0.03333333333333333,0.022222222222222223,0.022222222222222223,0.044444444444444446,,0.11111111111111112,,0.044444444444444446,0.03333333333333333,0.05555555555555556,0.022222222222222223,,,,,,,0.044444444444444446,,,,0.022222222222222223,,0.1,0.05555555555555556,,,0.022222222222222223,0.011111111111111112,,0.12222222222222223,0.06666666666666667,0.05555555555555556,,,0.08888888888888889,,,,0.1,,,,,,0.044444444444444446,0.022222222222222223,,0.022222222222222223,0.23333333333333334,0.011111111111111112,,0.16666666666666669,0.03333333333333333,,0.11111111111111112,0.044444444444444446,0.011111111111111112,0.14444444444444446,0.06666666666666667,0.022222222222222223,0.2111111111111111,,,0.022222222222222223,0.2888888888888889,,,,,,,,,,,0.03333333333333333,0.022222222222222223,0.022222222222222223,0.022222222222222223,,,,,,0.05555555555555556,,,,,,0.06666666666666667,0.044444444444444446,0.022222222222222223,0.06666666666666667,0.1,0.14444444444444446,0.022222222222222223,0.08888888888888889,0.12222222222222223,0.044444444444444446,0.12222222222222223,0.05555555555555556,0.12222222222222223,0.03333333333333333,0.11111111111111112,0.07777777777777778,0.044444444444444446,0.05555555555555556,0.06666666666666667,0.011111111111111112
graphs/1. Philosopher's Stone.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 0, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 0, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 2, "id": "Harry", "label": "Harry", "shape": "dot", "size": 38}, {"font": {"color": "white"}, "group": 3, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 4, "id": "Ron", "label": "Ron", "shape": "dot", "size": 25}, {"font": {"color": "white"}, "group": 3, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 3, "id": "Neville", "label": "Neville", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 3, "id": "Snape", "label": "Snape", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 4, "id": "Percy", "label": "Percy", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 2, "id": "Fred", "label": "Fred", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 3, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 0, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Bane", "label": "Bane", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Nicolas", "label": "Nicolas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Godric", "label": "Godric", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Albus", "label": "Albus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "James", "label": "James", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 2, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Marge", "label": "Marge", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Griphook", "label": "Griphook", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Lee", "label": "Lee", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Bill", "label": "Bill", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Susan", "label": "Susan", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Terry", "label": "Terry", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Fang", "label": "Fang", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Dean", "label": "Dean", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Fluffy", "label": "Fluffy", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 3, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Dumbledore", "to": "Voldemort", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Harry", "value": 297, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 56, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 92, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 17, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 48, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Bane", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Hedwig", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Nicolas", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Godric", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Harry", "value": 119, "width": 1}, {"from": "Voldemort", "to": "Snape", "value": 35, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Bane", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 11, "width": 1}, {"from": "Albus", "to": "James", "value": 4, "width": 1}, {"from": "Albus", "to": "Dudley", "value": 3, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 835, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 659, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 17, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 42, "width": 1}, {"from": "Harry", "to": "Marge", "value": 10, "width": 1}, {"from": "Harry", "to": "Griphook", "value": 31, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 44, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 14, "width": 1}, {"from": "Harry", "to": "Percy", "value": 82, "width": 1}, {"from": "Harry", "to": "Fred", "value": 70, "width": 1}, {"from": "Harry", "to": "Ron", "value": 1912, "width": 1}, {"from": "Harry", "to": "Lee", "value": 14, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 212, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 6, "width": 1}, {"from": "Harry", "to": "Bill", "value": 5, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 274, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 59, "width": 1}, {"from": "Harry", "to": "Neville", "value": 286, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 5, "width": 1}, {"from": "Harry", "to": "Susan", "value": 5, "width": 1}, {"from": "Harry", "to": "Terry", "value": 5, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 11, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 40, "width": 1}, {"from": "Harry", "to": "Snape", "value": 501, "width": 1}, {"from": "Harry", "to": "Fang", "value": 39, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 36, "width": 1}, {"from": "Harry", "to": "Dean", "value": 28, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 16, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 9, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 9, "width": 1}, {"from": "Harry", "to": "Fluffy", "value": 15, "width": 1}, {"from": "Harry", "to": "Norbert", "value": 54, "width": 1}, {"from": "Harry", "to": "Ronan", "value": 13, "width": 1}, {"from": "Harry", "to": "Bane", "value": 26, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 35, "width": 1}, {"from": "Harry", "to": "Nicolas", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Dudley", "value": 19, "width": 1}, {"from": "Hagrid", "to": "Griphook", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Hermione", "value": 66, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 26, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Snape", "value": 81, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 117, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 30, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 35, "width": 1}, {"from": "Hagrid", "to": "Angelina", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 14, "width": 1}, {"from": "Hagrid", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 33, "width": 1}, {"from": "Hagrid", "to": "Ronan", "value": 64, "width": 1}, {"from": "Hagrid", "to": "Bane", "value": 5, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 26, "width": 1}, {"from": "Dudley", "to": "Dennis", "value": 11, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 11, "width": 1}, {"from": "Dudley", "to": "Hedwig", "value": 3, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 11, "width": 1}, {"from": "Dudley", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 14, "width": 1}, {"from": "Hedwig", "to": "Snape", "value": 5, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 5, "width": 1}, {"from": "Ginny", "to": "Fred", "value": 6, "width": 1}, {"from": "Ginny", "to": "Ron", "value": 4, "width": 1}, {"from": "Percy", "to": "Ron", "value": 25, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 11, "width": 1}, {"from": "Percy", "to": "Bill", "value": 2, "width": 1}, {"from": "Percy", "to": "Snape", "value": 1, "width": 1}, {"from": "Percy", "to": "Bloody", "value": 10, "width": 1}, {"from": "Percy", "to": "Peeves", "value": 6, "width": 1}, {"from": "Percy", "to": "Neville", "value": 9, "width": 1}, {"from": "Fred", "to": "Ron", "value": 13, "width": 1}, {"from": "Fred", "to": "Charlie", "value": 5, "width": 1}, {"from": "Fred", "to": "Oliver", "value": 6, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 6, "width": 1}, {"from": "Fred", "to": "Goyle", "value": 4, "width": 1}, {"from": "Ron", "to": "Bill", "value": 14, "width": 1}, {"from": "Ron", "to": "Neville", "value": 129, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 4, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 26, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 154, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 235, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 3, "width": 1}, {"from": "Ron", "to": "Snape", "value": 133, "width": 1}, {"from": "Ron", "to": "Fang", "value": 17, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 49, "width": 1}, {"from": "Ron", "to": "Dean", "value": 12, "width": 1}, {"from": "Ron", "to": "Bloody", "value": 11, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 14, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 11, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 13, "width": 1}, {"from": "Ron", "to": "Fluffy", "value": 9, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 24, "width": 1}, {"from": "Charlie", "to": "Norbert", "value": 24, "width": 1}, {"from": "Charlie", "to": "Malfoy", "value": 6, "width": 1}, {"from": "Neville", "to": "Hermione", "value": 29, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 23, "width": 1}, {"from": "Neville", "to": "Malfoy", "value": 64, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 23, "width": 1}, {"from": "Neville", "to": "Snape", "value": 20, "width": 1}, {"from": "Neville", "to": "Bloody", "value": 6, "width": 1}, {"from": "Neville", "to": "Norbert", "value": 5, "width": 1}, {"from": "Neville", "to": "Fang", "value": 16, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 10, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 48, "width": 1}, {"from": "Hermione", "to": "Norbert", "value": 2, "width": 1}, {"from": "Hermione", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hermione", "to": "Ronan", "value": 11, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 19, "width": 1}, {"from": "Malfoy", "to": "Snape", "value": 47, "width": 1}, {"from": "Malfoy", "to": "Norbert", "value": 26, "width": 1}, {"from": "Malfoy", "to": "Fang", "value": 18, "width": 1}, {"from": "Goyle", "to": "Snape", "value": 9, "width": 1}, {"from": "Hannah", "to": "Susan", "value": 6, "width": 1}, {"from": "Hannah", "to": "Terry", "value": 5, "width": 1}, {"from": "Bloody", "to": "Peeves", "value": 1, "width": 1}, {"from": "Seamus", "to": "Snape", "value": 4, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 12, "width": 1}, {"from": "Snape", "to": "Fluffy", "value": 11, "width": 1}, {"from": "Ronan", "to": "Bane", "value": 24, "width": 1}, {"from": "Bane", "to": "Firenze", "value": 40, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/2. Chamber of Secrets.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 0, "id": "Harry", "label": "Harry", "shape": "dot", "size": 40}, {"font": {"color": "white"}, "group": 0, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Snape", "label": "Snape", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 1, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 0, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Ron", "label": "Ron", "shape": "dot", "size": 29}, {"font": {"color": "white"}, "group": 0, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 4, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 3, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 0, "id": "Fred", "label": "Fred", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 3, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 2, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 3, "id": "Percy", "label": "Percy", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 3, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Molly", "label": "Molly", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Neville", "label": "Neville", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 4, "id": "Colin", "label": "Colin", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Dean", "label": "Dean", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Fang", "label": "Fang", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Myrtle", "label": "Myrtle", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 3, "id": "Bill", "label": "Bill", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Justin", "label": "Justin", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 2, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 2, "id": "Fawkes", "label": "Fawkes", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Crabbe", "label": "Crabbe", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Marvolo", "label": "Marvolo", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Lee", "label": "Lee", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Aragog", "label": "Aragog", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Salazar", "label": "Salazar", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Cornelius", "label": "Cornelius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Errol", "label": "Errol", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Alicia", "label": "Alicia", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Albus", "label": "Albus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Millicent", "label": "Millicent", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Katie", "label": "Katie", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Harry", "to": "Petunia", "value": 52, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 195, "width": 1}, {"from": "Harry", "to": "Snape", "value": 276, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 398, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 86, "width": 1}, {"from": "Harry", "to": "Voldemort", "value": 103, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 5, "width": 1}, {"from": "Harry", "to": "Ron", "value": 2945, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 478, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 384, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 288, "width": 1}, {"from": "Harry", "to": "Fred", "value": 326, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 509, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 5, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 213, "width": 1}, {"from": "Harry", "to": "Percy", "value": 130, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 18, "width": 1}, {"from": "Harry", "to": "Molly", "value": 10, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 3, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 18, "width": 1}, {"from": "Harry", "to": "Neville", "value": 64, "width": 1}, {"from": "Harry", "to": "Colin", "value": 164, "width": 1}, {"from": "Harry", "to": "Dean", "value": 19, "width": 1}, {"from": "Harry", "to": "Fang", "value": 111, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 41, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 6, "width": 1}, {"from": "Harry", "to": "Myrtle", "value": 147, "width": 1}, {"from": "Harry", "to": "Bill", "value": 4, "width": 1}, {"from": "Harry", "to": "Justin", "value": 134, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 7, "width": 1}, {"from": "Harry", "to": "Oliver", "value": 8, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 112, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 26, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 109, "width": 1}, {"from": "Harry", "to": "Fawkes", "value": 32, "width": 1}, {"from": "Harry", "to": "Crabbe", "value": 5, "width": 1}, {"from": "Harry", "to": "Marvolo", "value": 3, "width": 1}, {"from": "Harry", "to": "Lee", "value": 3, "width": 1}, {"from": "Harry", "to": "Aragog", "value": 72, "width": 1}, {"from": "Harry", "to": "Salazar", "value": 7, "width": 1}, {"from": "Petunia", "to": "Dudley", "value": 11, "width": 1}, {"from": "Petunia", "to": "Vernon", "value": 1, "width": 1}, {"from": "Petunia", "to": "Dobby", "value": 4, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 20, "width": 1}, {"from": "Dudley", "to": "Dobby", "value": 5, "width": 1}, {"from": "Snape", "to": "Hagrid", "value": 12, "width": 1}, {"from": "Snape", "to": "Ron", "value": 91, "width": 1}, {"from": "Snape", "to": "Dumbledore", "value": 25, "width": 1}, {"from": "Snape", "to": "Minerva", "value": 5, "width": 1}, {"from": "Snape", "to": "Hermione", "value": 22, "width": 1}, {"from": "Snape", "to": "Malfoy", "value": 30, "width": 1}, {"from": "Snape", "to": "Neville", "value": 21, "width": 1}, {"from": "Snape", "to": "Goyle", "value": 6, "width": 1}, {"from": "Snape", "to": "Justin", "value": 10, "width": 1}, {"from": "Snape", "to": "Dean", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 144, "width": 1}, {"from": "Hagrid", "to": "Dobby", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Fred", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Ginny", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 34, "width": 1}, {"from": "Hagrid", "to": "Dumbledore", "value": 58, "width": 1}, {"from": "Hagrid", "to": "Hermione", "value": 26, "width": 1}, {"from": "Hagrid", "to": "Percy", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Ernie", "value": 9, "width": 1}, {"from": "Hagrid", "to": "Justin", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Cornelius", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Dean", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Aragog", "value": 20, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 59, "width": 1}, {"from": "Hedwig", "to": "Dobby", "value": 4, "width": 1}, {"from": "Hedwig", "to": "Fred", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Dumbledore", "value": 23, "width": 1}, {"from": "Voldemort", "to": "Ginny", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Ron", "to": "Dobby", "value": 20, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 409, "width": 1}, {"from": "Ron", "to": "Fred", "value": 110, "width": 1}, {"from": "Ron", "to": "Errol", "value": 21, "width": 1}, {"from": "Ron", "to": "Percy", "value": 156, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 6, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 106, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 212, "width": 1}, {"from": "Ron", "to": "Dumbledore", "value": 65, "width": 1}, {"from": "Ron", "to": "Neville", "value": 22, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 70, "width": 1}, {"from": "Ron", "to": "Alicia", "value": 6, "width": 1}, {"from": "Ron", "to": "Colin", "value": 16, "width": 1}, {"from": "Ron", "to": "Fang", "value": 41, "width": 1}, {"from": "Ron", "to": "Myrtle", "value": 62, "width": 1}, {"from": "Ron", "to": "Bill", "value": 5, "width": 1}, {"from": "Ron", "to": "Crabbe", "value": 19, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 13, "width": 1}, {"from": "Ron", "to": "Justin", "value": 22, "width": 1}, {"from": "Ron", "to": "Dean", "value": 24, "width": 1}, {"from": "Ron", "to": "Ernie", "value": 16, "width": 1}, {"from": "Ron", "to": "Hannah", "value": 5, "width": 1}, {"from": "Ron", "to": "Aragog", "value": 29, "width": 1}, {"from": "Ron", "to": "Fawkes", "value": 7, "width": 1}, {"from": "Dobby", "to": "Dumbledore", "value": 16, "width": 1}, {"from": "Dobby", "to": "Fred", "value": 5, "width": 1}, {"from": "Dobby", "to": "Colin", "value": 6, "width": 1}, {"from": "Dobby", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dobby", "to": "Malfoy", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 90, "width": 1}, {"from": "Dumbledore", "to": "Minerva", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 8, "width": 1}, {"from": "Dumbledore", "to": "Parvati", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Albus", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Colin", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Fawkes", "value": 3, "width": 1}, {"from": "Dumbledore", "to": "Cornelius", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fang", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Goyle", "value": 4, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 11, "width": 1}, {"from": "Hermione", "to": "Errol", "value": 11, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 12, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 21, "width": 1}, {"from": "Hermione", "to": "Bloody", "value": 5, "width": 1}, {"from": "Hermione", "to": "Peeves", "value": 17, "width": 1}, {"from": "Hermione", "to": "Myrtle", "value": 26, "width": 1}, {"from": "Hermione", "to": "Colin", "value": 6, "width": 1}, {"from": "Hermione", "to": "Seamus", "value": 6, "width": 1}, {"from": "Hermione", "to": "Millicent", "value": 12, "width": 1}, {"from": "Hermione", "to": "Justin", "value": 10, "width": 1}, {"from": "Hermione", "to": "Goyle", "value": 10, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 6, "width": 1}, {"from": "Fred", "to": "Percy", "value": 43, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 13, "width": 1}, {"from": "Fred", "to": "Malfoy", "value": 21, "width": 1}, {"from": "Fred", "to": "Arthur", "value": 7, "width": 1}, {"from": "Fred", "to": "Colin", "value": 10, "width": 1}, {"from": "Fred", "to": "Alicia", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Ginny", "value": 39, "width": 1}, {"from": "Malfoy", "to": "Arthur", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Colin", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Neville", "value": 9, "width": 1}, {"from": "Malfoy", "to": "Myrtle", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 31, "width": 1}, {"from": "Malfoy", "to": "Percy", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Ernie", "value": 6, "width": 1}, {"from": "Errol", "to": "Percy", "value": 3, "width": 1}, {"from": "Errol", "to": "Neville", "value": 5, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 6, "width": 1}, {"from": "Percy", "to": "Ginny", "value": 20, "width": 1}, {"from": "Percy", "to": "Bill", "value": 5, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 12, "width": 1}, {"from": "Bill", "to": "Ginny", "value": 9, "width": 1}, {"from": "Arthur", "to": "Molly", "value": 6, "width": 1}, {"from": "Ginny", "to": "Neville", "value": 3, "width": 1}, {"from": "Ginny", "to": "Myrtle", "value": 5, "width": 1}, {"from": "Ginny", "to": "Fawkes", "value": 4, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 28, "width": 1}, {"from": "Seamus", "to": "Neville", "value": 5, "width": 1}, {"from": "Dean", "to": "Neville", "value": 17, "width": 1}, {"from": "Neville", "to": "Justin", "value": 6, "width": 1}, {"from": "Colin", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Colin", "to": "Albus", "value": 6, "width": 1}, {"from": "Colin", "to": "Justin", "value": 5, "width": 1}, {"from": "Crabbe", "to": "Goyle", "value": 8, "width": 1}, {"from": "Goyle", "to": "Myrtle", "value": 4, "width": 1}, {"from": "Alicia", "to": "Katie", "value": 6, "width": 1}, {"from": "Peeves", "to": "Myrtle", "value": 15, "width": 1}, {"from": "Peeves", "to": "Justin", "value": 10, "width": 1}, {"from": "Justin", "to": "Ernie", "value": 11, "width": 1}, {"from": "Ernie", "to": "Hannah", "value": 6, "width": 1}, {"from": "Fawkes", "to": "Aragog", "value": 5, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/3. Prisoner of Azkaban.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 4, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Harry", "label": "Harry", "shape": "dot", "size": 48}, {"font": {"color": "white"}, "group": 4, "id": "Marge", "label": "Marge", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Snape", "label": "Snape", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 2, "id": "Ron", "label": "Ron", "shape": "dot", "size": 27}, {"font": {"color": "white"}, "group": 0, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 20}, {"font": {"color": "white"}, "group": 4, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 5, "id": "Lily", "label": "Lily", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 5, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 4, "id": "Errol", "label": "Errol", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Bill", "label": "Bill", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 4, "id": "Stan", "label": "Stan", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Neville", "label": "Neville", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 2, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 2, "id": "Percy", "label": "Percy", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Fred", "label": "Fred", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 4, "id": "Molly", "label": "Molly", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 3, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 0, "id": "Fang", "label": "Fang", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 2, "id": "Lavender", "label": "Lavender", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 0, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 1, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Colin", "label": "Colin", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Alicia", "label": "Alicia", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 2, "id": "Madam", "label": "Madam", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "James", "label": "James", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 2, "id": "Crookshanks", "label": "Crookshanks", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 3, "id": "Katie", "label": "Katie", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 3, "id": "Cho", "label": "Cho", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Dean", "label": "Dean", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Lee", "label": "Lee", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 5, "id": "Peter", "label": "Peter", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 5, "id": "Remus", "label": "Remus", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Poppy", "label": "Poppy", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Penelope", "label": "Penelope", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Dudley", "to": "Harry", "value": 164, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 4, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 7, "width": 1}, {"from": "Dudley", "to": "Vernon", "value": 4, "width": 1}, {"from": "Harry", "to": "Snape", "value": 658, "width": 1}, {"from": "Harry", "to": "Ron", "value": 2806, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 703, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 121, "width": 1}, {"from": "Harry", "to": "Lily", "value": 9, "width": 1}, {"from": "Harry", "to": "Voldemort", "value": 148, "width": 1}, {"from": "Harry", "to": "Errol", "value": 54, "width": 1}, {"from": "Harry", "to": "Bill", "value": 20, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 15, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 497, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 56, "width": 1}, {"from": "Harry", "to": "Marge", "value": 64, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 9, "width": 1}, {"from": "Harry", "to": "Stan", "value": 298, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 24, "width": 1}, {"from": "Harry", "to": "Neville", "value": 167, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 119, "width": 1}, {"from": "Harry", "to": "Percy", "value": 152, "width": 1}, {"from": "Harry", "to": "Fred", "value": 263, "width": 1}, {"from": "Harry", "to": "Molly", "value": 14, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 9, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 278, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 438, "width": 1}, {"from": "Harry", "to": "Fang", "value": 9, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 75, "width": 1}, {"from": "Harry", "to": "Lavender", "value": 5, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 42, "width": 1}, {"from": "Harry", "to": "Buckbeak", "value": 255, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 11, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 15, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 22, "width": 1}, {"from": "Harry", "to": "Colin", "value": 10, "width": 1}, {"from": "Harry", "to": "Oliver", "value": 10, "width": 1}, {"from": "Harry", "to": "Alicia", "value": 27, "width": 1}, {"from": "Harry", "to": "Madam", "value": 3, "width": 1}, {"from": "Harry", "to": "James", "value": 53, "width": 1}, {"from": "Harry", "to": "Crookshanks", "value": 12, "width": 1}, {"from": "Harry", "to": "Katie", "value": 31, "width": 1}, {"from": "Harry", "to": "Cho", "value": 69, "width": 1}, {"from": "Harry", "to": "Dean", "value": 4, "width": 1}, {"from": "Harry", "to": "Lee", "value": 20, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 21, "width": 1}, {"from": "Harry", "to": "Peter", "value": 45, "width": 1}, {"from": "Harry", "to": "Remus", "value": 8, "width": 1}, {"from": "Harry", "to": "Poppy", "value": 3, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 5, "width": 1}, {"from": "Harry", "to": "Penelope", "value": 5, "width": 1}, {"from": "Snape", "to": "Pansy", "value": 5, "width": 1}, {"from": "Snape", "to": "Ron", "value": 161, "width": 1}, {"from": "Snape", "to": "Malfoy", "value": 53, "width": 1}, {"from": "Snape", "to": "Neville", "value": 91, "width": 1}, {"from": "Snape", "to": "Goyle", "value": 6, "width": 1}, {"from": "Snape", "to": "Trevor", "value": 15, "width": 1}, {"from": "Snape", "to": "Parvati", "value": 13, "width": 1}, {"from": "Snape", "to": "Dumbledore", "value": 105, "width": 1}, {"from": "Snape", "to": "Percy", "value": 12, "width": 1}, {"from": "Snape", "to": "Hermione", "value": 50, "width": 1}, {"from": "Snape", "to": "Voldemort", "value": 5, "width": 1}, {"from": "Snape", "to": "Scabbers", "value": 24, "width": 1}, {"from": "Snape", "to": "James", "value": 5, "width": 1}, {"from": "Snape", "to": "Sirius", "value": 4, "width": 1}, {"from": "Snape", "to": "Buckbeak", "value": 1, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 671, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 280, "width": 1}, {"from": "Ron", "to": "Percy", "value": 112, "width": 1}, {"from": "Ron", "to": "Hagrid", "value": 187, "width": 1}, {"from": "Ron", "to": "Hedwig", "value": 33, "width": 1}, {"from": "Ron", "to": "Errol", "value": 11, "width": 1}, {"from": "Ron", "to": "Fred", "value": 32, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 15, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 47, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 189, "width": 1}, {"from": "Ron", "to": "Neville", "value": 38, "width": 1}, {"from": "Ron", "to": "Dumbledore", "value": 43, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 17, "width": 1}, {"from": "Ron", "to": "Dean", "value": 3, "width": 1}, {"from": "Ron", "to": "Lavender", "value": 14, "width": 1}, {"from": "Ron", "to": "Madam", "value": 6, "width": 1}, {"from": "Ron", "to": "Voldemort", "value": 22, "width": 1}, {"from": "Ron", "to": "Buckbeak", "value": 35, "width": 1}, {"from": "Ron", "to": "Crookshanks", "value": 68, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 16, "width": 1}, {"from": "Ron", "to": "Bill", "value": 6, "width": 1}, {"from": "Ron", "to": "Remus", "value": 8, "width": 1}, {"from": "Ron", "to": "Sirius", "value": 10, "width": 1}, {"from": "Ron", "to": "Peter", "value": 10, "width": 1}, {"from": "Ron", "to": "James", "value": 1, "width": 1}, {"from": "Hermione", "to": "Scabbers", "value": 21, "width": 1}, {"from": "Hermione", "to": "Fred", "value": 11, "width": 1}, {"from": "Hermione", "to": "Errol", "value": 10, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 34, "width": 1}, {"from": "Hermione", "to": "Hagrid", "value": 123, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 17, "width": 1}, {"from": "Hermione", "to": "Parvati", "value": 27, "width": 1}, {"from": "Hermione", "to": "Lavender", "value": 11, "width": 1}, {"from": "Hermione", "to": "Dumbledore", "value": 16, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 6, "width": 1}, {"from": "Hermione", "to": "Voldemort", "value": 6, "width": 1}, {"from": "Hermione", "to": "Crookshanks", "value": 9, "width": 1}, {"from": "Hermione", "to": "Buckbeak", "value": 33, "width": 1}, {"from": "Hermione", "to": "Peter", "value": 3, "width": 1}, {"from": "Hermione", "to": "James", "value": 4, "width": 1}, {"from": "Hermione", "to": "Fang", "value": 6, "width": 1}, {"from": "Hermione", "to": "Sirius", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Errol", "value": 15, "width": 1}, {"from": "Hedwig", "to": "Fred", "value": 4, "width": 1}, {"from": "Hedwig", "to": "Stan", "value": 19, "width": 1}, {"from": "Hedwig", "to": "Neville", "value": 6, "width": 1}, {"from": "Lily", "to": "Voldemort", "value": 5, "width": 1}, {"from": "Lily", "to": "James", "value": 18, "width": 1}, {"from": "Voldemort", "to": "Dumbledore", "value": 20, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Peter", "value": 13, "width": 1}, {"from": "Voldemort", "to": "James", "value": 3, "width": 1}, {"from": "Bill", "to": "Fred", "value": 5, "width": 1}, {"from": "Scabbers", "to": "Ginny", "value": 6, "width": 1}, {"from": "Scabbers", "to": "Percy", "value": 13, "width": 1}, {"from": "Scabbers", "to": "Crookshanks", "value": 18, "width": 1}, {"from": "Scabbers", "to": "Peter", "value": 8, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 6, "width": 1}, {"from": "Ginny", "to": "Dumbledore", "value": 8, "width": 1}, {"from": "Fred", "to": "Percy", "value": 61, "width": 1}, {"from": "Fred", "to": "Malfoy", "value": 24, "width": 1}, {"from": "Fred", "to": "Oliver", "value": 16, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 20, "width": 1}, {"from": "Fred", "to": "Katie", "value": 9, "width": 1}, {"from": "Fred", "to": "Alicia", "value": 11, "width": 1}, {"from": "Fred", "to": "Hagrid", "value": 5, "width": 1}, {"from": "Fred", "to": "Goyle", "value": 5, "width": 1}, {"from": "Fred", "to": "Crookshanks", "value": 4, "width": 1}, {"from": "Percy", "to": "Dumbledore", "value": 49, "width": 1}, {"from": "Percy", "to": "Penelope", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Dumbledore", "value": 58, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 60, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Buckbeak", "value": 108, "width": 1}, {"from": "Hagrid", "to": "Pansy", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 18, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Penelope", "value": 5, "width": 1}, {"from": "Hagrid", "to": "James", "value": 7, "width": 1}, {"from": "Hagrid", "to": "Sirius", "value": 5, "width": 1}, {"from": "Petunia", "to": "Marge", "value": 10, "width": 1}, {"from": "Petunia", "to": "Vernon", "value": 6, "width": 1}, {"from": "Stan", "to": "Ernie", "value": 25, "width": 1}, {"from": "Stan", "to": "Neville", "value": 11, "width": 1}, {"from": "Neville", "to": "Parvati", "value": 1, "width": 1}, {"from": "Neville", "to": "Malfoy", "value": 4, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 6, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 5, "width": 1}, {"from": "Neville", "to": "Buckbeak", "value": 2, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Peeves", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Sirius", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Buckbeak", "value": 16, "width": 1}, {"from": "Dumbledore", "to": "Minerva", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Goyle", "value": 1, "width": 1}, {"from": "Dumbledore", "to": "Poppy", "value": 6, "width": 1}, {"from": "Goyle", "to": "Malfoy", "value": 67, "width": 1}, {"from": "Goyle", "to": "Buckbeak", "value": 6, "width": 1}, {"from": "Goyle", "to": "Pansy", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Crookshanks", "value": 8, "width": 1}, {"from": "Malfoy", "to": "Buckbeak", "value": 33, "width": 1}, {"from": "Malfoy", "to": "Pansy", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Seamus", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Cho", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Lee", "value": 10, "width": 1}, {"from": "Malfoy", "to": "Alicia", "value": 14, "width": 1}, {"from": "Malfoy", "to": "Katie", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Angelina", "value": 7, "width": 1}, {"from": "Crookshanks", "to": "Peter", "value": 4, "width": 1}, {"from": "Parvati", "to": "Lavender", "value": 12, "width": 1}, {"from": "Fang", "to": "Buckbeak", "value": 5, "width": 1}, {"from": "Lavender", "to": "Dean", "value": 5, "width": 1}, {"from": "Buckbeak", "to": "Sirius", "value": 12, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 5, "width": 1}, {"from": "Angelina", "to": "Alicia", "value": 31, "width": 1}, {"from": "Angelina", "to": "Katie", "value": 15, "width": 1}, {"from": "Angelina", "to": "Lee", "value": 3, "width": 1}, {"from": "Peeves", "to": "Sirius", "value": 8, "width": 1}, {"from": "Sirius", "to": "Peter", "value": 3, "width": 1}, {"from": "Sirius", "to": "James", "value": 6, "width": 1}, {"from": "Sirius", "to": "Penelope", "value": 5, "width": 1}, {"from": "Alicia", "to": "Katie", "value": 22, "width": 1}, {"from": "Alicia", "to": "Lee", "value": 5, "width": 1}, {"from": "Katie", "to": "Cho", "value": 5, "width": 1}, {"from": "James", "to": "Peter", "value": 23, "width": 1}, {"from": "James", "to": "Remus", "value": 5, "width": 1}, {"from": "Peter", "to": "Remus", "value": 7, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/4. Goblet of Fire.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 0, "id": "Bertha", "label": "Bertha", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Frank", "label": "Frank", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Percy", "label": "Percy", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 0, "id": "Fred", "label": "Fred", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 2, "id": "Harry", "label": "Harry", "shape": "dot", "size": 54}, {"font": {"color": "white"}, "group": 1, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 34}, {"font": {"color": "white"}, "group": 4, "id": "Winky", "label": "Winky", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 1, "id": "Nagini", "label": "Nagini", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 1, "id": "Peter", "label": "Peter", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 1, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 4, "id": "Ron", "label": "Ron", "shape": "dot", "size": 42}, {"font": {"color": "white"}, "group": 4, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 4, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Snape", "label": "Snape", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 1, "id": "Albus", "label": "Albus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Lucius", "label": "Lucius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 4, "id": "Cedric", "label": "Cedric", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Cornelius", "label": "Cornelius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 25}, {"font": {"color": "white"}, "group": 4, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 29}, {"font": {"color": "white"}, "group": 2, "id": "Errol", "label": "Errol", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Bill", "label": "Bill", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 0, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 0, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 2, "id": "Crookshanks", "label": "Crookshanks", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Amos", "label": "Amos", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 5, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 4, "id": "Barty", "label": "Barty", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Pigwidgeon", "label": "Pigwidgeon", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 5, "id": "Neville", "label": "Neville", "shape": "dot", "size": 15}, {"font": {"color": "white"}, "group": 4, "id": "Colin", "label": "Colin", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Cho", "label": "Cho", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 2, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Fang", "label": "Fang", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Dean", "label": "Dean", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 0, "id": "Lee", "label": "Lee", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Thomas", "label": "Thomas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 5, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 4, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Viktor", "label": "Viktor", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 3, "id": "Fleur", "label": "Fleur", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 0, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Rita", "label": "Rita", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 2, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Lavender", "label": "Lavender", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Padma", "label": "Padma", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Myrtle", "label": "Myrtle", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Gabrielle", "label": "Gabrielle", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Fawkes", "label": "Fawkes", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Antonin", "label": "Antonin", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Alastor", "label": "Alastor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Aberforth", "label": "Aberforth", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Molly", "label": "Molly", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Alicia", "label": "Alicia", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Ludo", "label": "Ludo", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 5, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 2}]);
100
+ edges = new vis.DataSet([{"from": "Bertha", "to": "Frank", "value": 3, "width": 1}, {"from": "Bertha", "to": "Percy", "value": 12, "width": 1}, {"from": "Bertha", "to": "Fred", "value": 1, "width": 1}, {"from": "Bertha", "to": "Harry", "value": 29, "width": 1}, {"from": "Bertha", "to": "Dumbledore", "value": 24, "width": 1}, {"from": "Bertha", "to": "Winky", "value": 2, "width": 1}, {"from": "Frank", "to": "Nagini", "value": 9, "width": 1}, {"from": "Frank", "to": "Dumbledore", "value": 5, "width": 1}, {"from": "Frank", "to": "Voldemort", "value": 5, "width": 1}, {"from": "Nagini", "to": "Dumbledore", "value": 4, "width": 1}, {"from": "Peter", "to": "Voldemort", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Harry", "value": 796, "width": 1}, {"from": "Voldemort", "to": "Hedwig", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Dudley", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 21, "width": 1}, {"from": "Voldemort", "to": "Sirius", "value": 7, "width": 1}, {"from": "Voldemort", "to": "Dumbledore", "value": 131, "width": 1}, {"from": "Voldemort", "to": "Buckbeak", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Snape", "value": 20, "width": 1}, {"from": "Voldemort", "to": "Albus", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Lucius", "value": 2, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Cedric", "value": 42, "width": 1}, {"from": "Voldemort", "to": "Minerva", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Cornelius", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 4, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 162, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 237, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 1363, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 812, "width": 1}, {"from": "Harry", "to": "Ron", "value": 4122, "width": 1}, {"from": "Harry", "to": "Fred", "value": 387, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 243, "width": 1}, {"from": "Harry", "to": "Buckbeak", "value": 30, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 707, "width": 1}, {"from": "Harry", "to": "Errol", "value": 4, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 15, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 16, "width": 1}, {"from": "Harry", "to": "Percy", "value": 171, "width": 1}, {"from": "Harry", "to": "Bill", "value": 206, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 62, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 109, "width": 1}, {"from": "Harry", "to": "Crookshanks", "value": 6, "width": 1}, {"from": "Harry", "to": "Amos", "value": 17, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 22, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 410, "width": 1}, {"from": "Harry", "to": "Winky", "value": 146, "width": 1}, {"from": "Harry", "to": "Barty", "value": 10, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 206, "width": 1}, {"from": "Harry", "to": "Pigwidgeon", "value": 26, "width": 1}, {"from": "Harry", "to": "Neville", "value": 168, "width": 1}, {"from": "Harry", "to": "Colin", "value": 44, "width": 1}, {"from": "Harry", "to": "Snape", "value": 630, "width": 1}, {"from": "Harry", "to": "Cho", "value": 216, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 1, "width": 1}, {"from": "Harry", "to": "Fang", "value": 36, "width": 1}, {"from": "Harry", "to": "Dean", "value": 41, "width": 1}, {"from": "Harry", "to": "Lee", "value": 28, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 47, "width": 1}, {"from": "Harry", "to": "Thomas", "value": 5, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 5, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 163, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 84, "width": 1}, {"from": "Harry", "to": "Norbert", "value": 5, "width": 1}, {"from": "Harry", "to": "Viktor", "value": 8, "width": 1}, {"from": "Harry", "to": "Fleur", "value": 278, "width": 1}, {"from": "Harry", "to": "Cedric", "value": 240, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 9, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 16, "width": 1}, {"from": "Harry", "to": "Rita", "value": 36, "width": 1}, {"from": "Harry", "to": "Trevor", "value": 5, "width": 1}, {"from": "Harry", "to": "Lavender", "value": 1, "width": 1}, {"from": "Harry", "to": "Padma", "value": 10, "width": 1}, {"from": "Harry", "to": "Myrtle", "value": 93, "width": 1}, {"from": "Harry", "to": "Gabrielle", "value": 12, "width": 1}, {"from": "Harry", "to": "Fawkes", "value": 21, "width": 1}, {"from": "Harry", "to": "Antonin", "value": 1, "width": 1}, {"from": "Harry", "to": "Minerva", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Buckbeak", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Hermione", "value": 10, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 62, "width": 1}, {"from": "Hedwig", "to": "Sirius", "value": 28, "width": 1}, {"from": "Hedwig", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Fred", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Neville", "value": 6, "width": 1}, {"from": "Hedwig", "to": "Hagrid", "value": 12, "width": 1}, {"from": "Hedwig", "to": "Dobby", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Cedric", "value": 6, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 32, "width": 1}, {"from": "Dudley", "to": "Fred", "value": 6, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 5, "width": 1}, {"from": "Dudley", "to": "Hagrid", "value": 4, "width": 1}, {"from": "Dudley", "to": "Dumbledore", "value": 2, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 19, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 133, "width": 1}, {"from": "Dumbledore", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Bill", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Charlie", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 49, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 118, "width": 1}, {"from": "Dumbledore", "to": "Lavender", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Lee", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 145, "width": 1}, {"from": "Dumbledore", "to": "Fleur", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Rita", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Sirius", "value": 19, "width": 1}, {"from": "Dumbledore", "to": "Dobby", "value": 52, "width": 1}, {"from": "Dumbledore", "to": "Winky", "value": 35, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Padma", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Alastor", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Aberforth", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Viktor", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Fang", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Barty", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Albus", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Minerva", "value": 20, "width": 1}, {"from": "Dumbledore", "to": "Cornelius", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Arthur", "value": 5, "width": 1}, {"from": "Hermione", "to": "Ron", "value": 1031, "width": 1}, {"from": "Hermione", "to": "Hagrid", "value": 105, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 24, "width": 1}, {"from": "Hermione", "to": "Fred", "value": 48, "width": 1}, {"from": "Hermione", "to": "Scabbers", "value": 6, "width": 1}, {"from": "Hermione", "to": "Bill", "value": 35, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 52, "width": 1}, {"from": "Hermione", "to": "Dobby", "value": 18, "width": 1}, {"from": "Hermione", "to": "Cedric", "value": 8, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 15, "width": 1}, {"from": "Hermione", "to": "Molly", "value": 3, "width": 1}, {"from": "Hermione", "to": "Winky", "value": 28, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 29, "width": 1}, {"from": "Hermione", "to": "Goyle", "value": 7, "width": 1}, {"from": "Hermione", "to": "Angelina", "value": 10, "width": 1}, {"from": "Hermione", "to": "Norbert", "value": 5, "width": 1}, {"from": "Hermione", "to": "Sirius", "value": 30, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 27, "width": 1}, {"from": "Hermione", "to": "Padma", "value": 11, "width": 1}, {"from": "Hermione", "to": "Parvati", "value": 4, "width": 1}, {"from": "Hermione", "to": "Myrtle", "value": 6, "width": 1}, {"from": "Hermione", "to": "Cho", "value": 10, "width": 1}, {"from": "Hermione", "to": "Rita", "value": 11, "width": 1}, {"from": "Hermione", "to": "Buckbeak", "value": 5, "width": 1}, {"from": "Hermione", "to": "Viktor", "value": 10, "width": 1}, {"from": "Hermione", "to": "Fleur", "value": 6, "width": 1}, {"from": "Ron", "to": "Fred", "value": 250, "width": 1}, {"from": "Ron", "to": "Percy", "value": 107, "width": 1}, {"from": "Ron", "to": "Petunia", "value": 5, "width": 1}, {"from": "Ron", "to": "Bill", "value": 100, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 98, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 17, "width": 1}, {"from": "Ron", "to": "Sirius", "value": 70, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 14, "width": 1}, {"from": "Ron", "to": "Crookshanks", "value": 5, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 42, "width": 1}, {"from": "Ron", "to": "Dobby", "value": 52, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 105, "width": 1}, {"from": "Ron", "to": "Winky", "value": 37, "width": 1}, {"from": "Ron", "to": "Barty", "value": 5, "width": 1}, {"from": "Ron", "to": "Pigwidgeon", "value": 28, "width": 1}, {"from": "Ron", "to": "Neville", "value": 105, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 48, "width": 1}, {"from": "Ron", "to": "Dean", "value": 23, "width": 1}, {"from": "Ron", "to": "Hagrid", "value": 200, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 10, "width": 1}, {"from": "Ron", "to": "Lee", "value": 14, "width": 1}, {"from": "Ron", "to": "Snape", "value": 129, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 55, "width": 1}, {"from": "Ron", "to": "Lavender", "value": 6, "width": 1}, {"from": "Ron", "to": "Angelina", "value": 17, "width": 1}, {"from": "Ron", "to": "Viktor", "value": 21, "width": 1}, {"from": "Ron", "to": "Pansy", "value": 9, "width": 1}, {"from": "Ron", "to": "Colin", "value": 5, "width": 1}, {"from": "Ron", "to": "Fleur", "value": 55, "width": 1}, {"from": "Ron", "to": "Cedric", "value": 9, "width": 1}, {"from": "Ron", "to": "Bloody", "value": 6, "width": 1}, {"from": "Ron", "to": "Cho", "value": 15, "width": 1}, {"from": "Ron", "to": "Padma", "value": 58, "width": 1}, {"from": "Ron", "to": "Fang", "value": 5, "width": 1}, {"from": "Ron", "to": "Myrtle", "value": 6, "width": 1}, {"from": "Ron", "to": "Rita", "value": 20, "width": 1}, {"from": "Fred", "to": "Sirius", "value": 6, "width": 1}, {"from": "Fred", "to": "Petunia", "value": 16, "width": 1}, {"from": "Fred", "to": "Charlie", "value": 30, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 23, "width": 1}, {"from": "Fred", "to": "Percy", "value": 58, "width": 1}, {"from": "Fred", "to": "Cedric", "value": 5, "width": 1}, {"from": "Fred", "to": "Barty", "value": 5, "width": 1}, {"from": "Fred", "to": "Bill", "value": 7, "width": 1}, {"from": "Fred", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Fred", "to": "Hagrid", "value": 10, "width": 1}, {"from": "Fred", "to": "Lee", "value": 26, "width": 1}, {"from": "Fred", "to": "Neville", "value": 10, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 10, "width": 1}, {"from": "Fred", "to": "Alicia", "value": 5, "width": 1}, {"from": "Sirius", "to": "Hagrid", "value": 10, "width": 1}, {"from": "Sirius", "to": "Snape", "value": 18, "width": 1}, {"from": "Sirius", "to": "Malfoy", "value": 3, "width": 1}, {"from": "Sirius", "to": "Buckbeak", "value": 6, "width": 1}, {"from": "Sirius", "to": "Percy", "value": 6, "width": 1}, {"from": "Buckbeak", "to": "Barty", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Errol", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 62, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Seamus", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Dean", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 49, "width": 1}, {"from": "Hagrid", "to": "Bill", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 23, "width": 1}, {"from": "Hagrid", "to": "Fleur", "value": 8, "width": 1}, {"from": "Hagrid", "to": "Rita", "value": 15, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Alastor", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Snape", "value": 21, "width": 1}, {"from": "Hagrid", "to": "Parvati", "value": 3, "width": 1}, {"from": "Hagrid", "to": "Pansy", "value": 7, "width": 1}, {"from": "Hagrid", "to": "Winky", "value": 14, "width": 1}, {"from": "Arthur", "to": "Malfoy", "value": 7, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 79, "width": 1}, {"from": "Percy", "to": "Bill", "value": 43, "width": 1}, {"from": "Percy", "to": "Barty", "value": 12, "width": 1}, {"from": "Percy", "to": "Ginny", "value": 11, "width": 1}, {"from": "Percy", "to": "Rita", "value": 4, "width": 1}, {"from": "Percy", "to": "Cho", "value": 3, "width": 1}, {"from": "Percy", "to": "Neville", "value": 4, "width": 1}, {"from": "Percy", "to": "Padma", "value": 6, "width": 1}, {"from": "Percy", "to": "Myrtle", "value": 4, "width": 1}, {"from": "Percy", "to": "Gabrielle", "value": 3, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 122, "width": 1}, {"from": "Bill", "to": "Ginny", "value": 14, "width": 1}, {"from": "Bill", "to": "Rita", "value": 6, "width": 1}, {"from": "Charlie", "to": "Ginny", "value": 18, "width": 1}, {"from": "Ginny", "to": "Ludo", "value": 5, "width": 1}, {"from": "Ginny", "to": "Neville", "value": 22, "width": 1}, {"from": "Cedric", "to": "Fleur", "value": 11, "width": 1}, {"from": "Cedric", "to": "Cho", "value": 5, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 70, "width": 1}, {"from": "Seamus", "to": "Malfoy", "value": 4, "width": 1}, {"from": "Seamus", "to": "Thomas", "value": 1, "width": 1}, {"from": "Seamus", "to": "Angelina", "value": 7, "width": 1}, {"from": "Seamus", "to": "Neville", "value": 6, "width": 1}, {"from": "Barty", "to": "Snape", "value": 5, "width": 1}, {"from": "Barty", "to": "Winky", "value": 5, "width": 1}, {"from": "Dobby", "to": "Malfoy", "value": 16, "width": 1}, {"from": "Dobby", "to": "Winky", "value": 153, "width": 1}, {"from": "Dobby", "to": "Snape", "value": 9, "width": 1}, {"from": "Dobby", "to": "Cho", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Pigwidgeon", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 60, "width": 1}, {"from": "Malfoy", "to": "Snape", "value": 23, "width": 1}, {"from": "Malfoy", "to": "Parvati", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Lucius", "value": 7, "width": 1}, {"from": "Malfoy", "to": "Rita", "value": 5, "width": 1}, {"from": "Winky", "to": "Snape", "value": 25, "width": 1}, {"from": "Rita", "to": "Viktor", "value": 5, "width": 1}, {"from": "Neville", "to": "Dean", "value": 28, "width": 1}, {"from": "Neville", "to": "Snape", "value": 16, "width": 1}, {"from": "Neville", "to": "Dennis", "value": 4, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 6, "width": 1}, {"from": "Neville", "to": "Parvati", "value": 4, "width": 1}, {"from": "Goyle", "to": "Dean", "value": 5, "width": 1}, {"from": "Goyle", "to": "Snape", "value": 5, "width": 1}, {"from": "Dean", "to": "Parvati", "value": 9, "width": 1}, {"from": "Colin", "to": "Dennis", "value": 5, "width": 1}, {"from": "Colin", "to": "Snape", "value": 10, "width": 1}, {"from": "Snape", "to": "Ernie", "value": 1, "width": 1}, {"from": "Snape", "to": "Fleur", "value": 3, "width": 1}, {"from": "Snape", "to": "Cho", "value": 4, "width": 1}, {"from": "Snape", "to": "Peeves", "value": 7, "width": 1}, {"from": "Snape", "to": "Parvati", "value": 4, "width": 1}, {"from": "Snape", "to": "Pansy", "value": 3, "width": 1}, {"from": "Snape", "to": "Minerva", "value": 3, "width": 1}, {"from": "Cho", "to": "Fleur", "value": 5, "width": 1}, {"from": "Cho", "to": "Parvati", "value": 5, "width": 1}, {"from": "Bloody", "to": "Peeves", "value": 5, "width": 1}, {"from": "Parvati", "to": "Lavender", "value": 12, "width": 1}, {"from": "Parvati", "to": "Padma", "value": 24, "width": 1}, {"from": "Angelina", "to": "Alicia", "value": 5, "width": 1}, {"from": "Viktor", "to": "Fleur", "value": 6, "width": 1}, {"from": "Fleur", "to": "Padma", "value": 4, "width": 1}, {"from": "Fleur", "to": "Gabrielle", "value": 9, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/5. Order of the Phoenix.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 0, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 0, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Harry", "label": "Harry", "shape": "dot", "size": 74}, {"font": {"color": "white"}, "group": 2, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 1, "id": "Ron", "label": "Ron", "shape": "dot", "size": 54}, {"font": {"color": "white"}, "group": 0, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 41}, {"font": {"color": "white"}, "group": 2, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 23}, {"font": {"color": "white"}, "group": 0, "id": "Marge", "label": "Marge", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Bill", "label": "Bill", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 23}, {"font": {"color": "white"}, "group": 4, "id": "Snape", "label": "Snape", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 1, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 0, "id": "Mafalda", "label": "Mafalda", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Nymphadora", "label": "Nymphadora", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Kingsley", "label": "Kingsley", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 4, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 37}, {"font": {"color": "white"}, "group": 3, "id": "Fred", "label": "Fred", "shape": "dot", "size": 24}, {"font": {"color": "white"}, "group": 0, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Percy", "label": "Percy", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Kreacher", "label": "Kreacher", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Molly", "label": "Molly", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 1, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Andromeda", "label": "Andromeda", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Bob", "label": "Bob", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 25}, {"font": {"color": "white"}, "group": 4, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 27}, {"font": {"color": "white"}, "group": 2, "id": "James", "label": "James", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 3, "id": "Lee", "label": "Lee", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 2, "id": "Mundungus", "label": "Mundungus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Neville", "label": "Neville", "shape": "dot", "size": 24}, {"font": {"color": "white"}, "group": 2, "id": "Luna", "label": "Luna", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 3, "id": "Cho", "label": "Cho", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 4, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 4, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 4, "id": "Alice", "label": "Alice", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Dean", "label": "Dean", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 15}, {"font": {"color": "white"}, "group": 3, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 0, "id": "Cedric", "label": "Cedric", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Lavender", "label": "Lavender", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 1, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Sturgis", "label": "Sturgis", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 3, "id": "Alicia", "label": "Alicia", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 3, "id": "Katie", "label": "Katie", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Crookshanks", "label": "Crookshanks", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Viktor", "label": "Viktor", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Colin", "label": "Colin", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Zacharias", "label": "Zacharias", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 0, "id": "Wilhelmina", "label": "Wilhelmina", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Anthony", "label": "Anthony", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Marietta", "label": "Marietta", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Fang", "label": "Fang", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Olympe", "label": "Olympe", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Phineas", "label": "Phineas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Gilderoy", "label": "Gilderoy", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Stan", "label": "Stan", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Frank", "label": "Frank", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Bellatrix", "label": "Bellatrix", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Rita", "label": "Rita", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 4, "id": "Bane", "label": "Bane", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Grawp", "label": "Grawp", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 4, "id": "Magorian", "label": "Magorian", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 0, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Crabbe", "label": "Crabbe", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Fawkes", "label": "Fawkes", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Sybill", "label": "Sybill", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Winky", "label": "Winky", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Aberforth", "label": "Aberforth", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Pigwidgeon", "label": "Pigwidgeon", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Alastor", "label": "Alastor", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Cornelius", "label": "Cornelius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Lucius", "label": "Lucius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Remus", "label": "Remus", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Lily", "label": "Lily", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Justin", "label": "Justin", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Aragog", "label": "Aragog", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Dolores", "label": "Dolores", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Dudley", "to": "Vernon", "value": 10, "width": 1}, {"from": "Dudley", "to": "Harry", "value": 451, "width": 1}, {"from": "Dudley", "to": "Voldemort", "value": 2, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 13, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 25, "width": 1}, {"from": "Dudley", "to": "Dumbledore", "value": 17, "width": 1}, {"from": "Dudley", "to": "Sirius", "value": 2, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 6, "width": 1}, {"from": "Dudley", "to": "Bill", "value": 5, "width": 1}, {"from": "Dudley", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dudley", "to": "Snape", "value": 10, "width": 1}, {"from": "Vernon", "to": "Harry", "value": 16, "width": 1}, {"from": "Vernon", "to": "Petunia", "value": 3, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 52, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 186, "width": 1}, {"from": "Harry", "to": "Voldemort", "value": 536, "width": 1}, {"from": "Harry", "to": "Ron", "value": 4169, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 479, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 1437, "width": 1}, {"from": "Harry", "to": "Mafalda", "value": 2, "width": 1}, {"from": "Harry", "to": "Marge", "value": 5, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 252, "width": 1}, {"from": "Harry", "to": "Nymphadora", "value": 3, "width": 1}, {"from": "Harry", "to": "Kingsley", "value": 96, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 1211, "width": 1}, {"from": "Harry", "to": "Fred", "value": 565, "width": 1}, {"from": "Harry", "to": "Snape", "value": 1174, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 278, "width": 1}, {"from": "Harry", "to": "Bill", "value": 51, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 4, "width": 1}, {"from": "Harry", "to": "Percy", "value": 132, "width": 1}, {"from": "Harry", "to": "Kreacher", "value": 167, "width": 1}, {"from": "Harry", "to": "Molly", "value": 41, "width": 1}, {"from": "Harry", "to": "Buckbeak", "value": 42, "width": 1}, {"from": "Harry", "to": "Andromeda", "value": 25, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 120, "width": 1}, {"from": "Harry", "to": "Bob", "value": 1, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 420, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 770, "width": 1}, {"from": "Harry", "to": "James", "value": 119, "width": 1}, {"from": "Harry", "to": "Lee", "value": 55, "width": 1}, {"from": "Harry", "to": "Mundungus", "value": 3, "width": 1}, {"from": "Harry", "to": "Trevor", "value": 33, "width": 1}, {"from": "Harry", "to": "Neville", "value": 782, "width": 1}, {"from": "Harry", "to": "Luna", "value": 335, "width": 1}, {"from": "Harry", "to": "Cho", "value": 478, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 72, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 64, "width": 1}, {"from": "Harry", "to": "Alice", "value": 11, "width": 1}, {"from": "Harry", "to": "Dean", "value": 108, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 114, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 206, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 45, "width": 1}, {"from": "Harry", "to": "Cedric", "value": 4, "width": 1}, {"from": "Harry", "to": "Lavender", "value": 15, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 52, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 4, "width": 1}, {"from": "Harry", "to": "Sturgis", "value": 15, "width": 1}, {"from": "Harry", "to": "Alicia", "value": 33, "width": 1}, {"from": "Harry", "to": "Katie", "value": 31, "width": 1}, {"from": "Harry", "to": "Crookshanks", "value": 4, "width": 1}, {"from": "Harry", "to": "Viktor", "value": 8, "width": 1}, {"from": "Harry", "to": "Colin", "value": 6, "width": 1}, {"from": "Harry", "to": "Zacharias", "value": 7, "width": 1}, {"from": "Harry", "to": "Wilhelmina", "value": 7, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 25, "width": 1}, {"from": "Harry", "to": "Anthony", "value": 5, "width": 1}, {"from": "Harry", "to": "Marietta", "value": 92, "width": 1}, {"from": "Harry", "to": "Fang", "value": 44, "width": 1}, {"from": "Harry", "to": "Olympe", "value": 4, "width": 1}, {"from": "Harry", "to": "Phineas", "value": 12, "width": 1}, {"from": "Harry", "to": "Gilderoy", "value": 16, "width": 1}, {"from": "Harry", "to": "Stan", "value": 24, "width": 1}, {"from": "Harry", "to": "Frank", "value": 6, "width": 1}, {"from": "Harry", "to": "Bellatrix", "value": 109, "width": 1}, {"from": "Harry", "to": "Rita", "value": 67, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 67, "width": 1}, {"from": "Harry", "to": "Bane", "value": 50, "width": 1}, {"from": "Harry", "to": "Minerva", "value": 14, "width": 1}, {"from": "Harry", "to": "Grawp", "value": 91, "width": 1}, {"from": "Harry", "to": "Magorian", "value": 22, "width": 1}, {"from": "Harry", "to": "Ronan", "value": 8, "width": 1}, {"from": "Harry", "to": "Crabbe", "value": 9, "width": 1}, {"from": "Harry", "to": "Fawkes", "value": 11, "width": 1}, {"from": "Harry", "to": "Sybill", "value": 4, "width": 1}, {"from": "Petunia", "to": "Voldemort", "value": 5, "width": 1}, {"from": "Dobby", "to": "Hermione", "value": 8, "width": 1}, {"from": "Dobby", "to": "Hedwig", "value": 10, "width": 1}, {"from": "Dobby", "to": "Winky", "value": 17, "width": 1}, {"from": "Dobby", "to": "Dumbledore", "value": 10, "width": 1}, {"from": "Dobby", "to": "Snape", "value": 5, "width": 1}, {"from": "Dobby", "to": "Ron", "value": 15, "width": 1}, {"from": "Dobby", "to": "Kreacher", "value": 9, "width": 1}, {"from": "Dobby", "to": "Luna", "value": 5, "width": 1}, {"from": "Dobby", "to": "Malfoy", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 69, "width": 1}, {"from": "Voldemort", "to": "Dumbledore", "value": 299, "width": 1}, {"from": "Voldemort", "to": "Percy", "value": 20, "width": 1}, {"from": "Voldemort", "to": "Hermione", "value": 35, "width": 1}, {"from": "Voldemort", "to": "Sirius", "value": 24, "width": 1}, {"from": "Voldemort", "to": "Arthur", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Aberforth", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Neville", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Snape", "value": 67, "width": 1}, {"from": "Voldemort", "to": "Rita", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Luna", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Sturgis", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Bellatrix", "value": 33, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Sybill", "value": 18, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 2, "width": 1}, {"from": "Ron", "to": "Dumbledore", "value": 242, "width": 1}, {"from": "Ron", "to": "Sirius", "value": 59, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 653, "width": 1}, {"from": "Ron", "to": "Hedwig", "value": 44, "width": 1}, {"from": "Ron", "to": "Pigwidgeon", "value": 11, "width": 1}, {"from": "Ron", "to": "Fred", "value": 374, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 257, "width": 1}, {"from": "Ron", "to": "Percy", "value": 89, "width": 1}, {"from": "Ron", "to": "Kreacher", "value": 25, "width": 1}, {"from": "Ron", "to": "Bill", "value": 33, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 8, "width": 1}, {"from": "Ron", "to": "Arthur", "value": 14, "width": 1}, {"from": "Ron", "to": "Neville", "value": 210, "width": 1}, {"from": "Ron", "to": "Luna", "value": 103, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 41, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 66, "width": 1}, {"from": "Ron", "to": "Kingsley", "value": 4, "width": 1}, {"from": "Ron", "to": "Hagrid", "value": 255, "width": 1}, {"from": "Ron", "to": "Alice", "value": 1, "width": 1}, {"from": "Ron", "to": "Bloody", "value": 2, "width": 1}, {"from": "Ron", "to": "Colin", "value": 5, "width": 1}, {"from": "Ron", "to": "Dennis", "value": 5, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 62, "width": 1}, {"from": "Ron", "to": "Angelina", "value": 145, "width": 1}, {"from": "Ron", "to": "Snape", "value": 144, "width": 1}, {"from": "Ron", "to": "Cho", "value": 98, "width": 1}, {"from": "Ron", "to": "Dean", "value": 48, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 27, "width": 1}, {"from": "Ron", "to": "Ernie", "value": 36, "width": 1}, {"from": "Ron", "to": "Oliver", "value": 11, "width": 1}, {"from": "Ron", "to": "Katie", "value": 19, "width": 1}, {"from": "Ron", "to": "Crookshanks", "value": 8, "width": 1}, {"from": "Ron", "to": "Lee", "value": 20, "width": 1}, {"from": "Ron", "to": "Zacharias", "value": 15, "width": 1}, {"from": "Ron", "to": "Hannah", "value": 3, "width": 1}, {"from": "Ron", "to": "Sturgis", "value": 13, "width": 1}, {"from": "Ron", "to": "Alicia", "value": 28, "width": 1}, {"from": "Ron", "to": "Anthony", "value": 4, "width": 1}, {"from": "Ron", "to": "Fang", "value": 19, "width": 1}, {"from": "Ron", "to": "Buckbeak", "value": 1, "width": 1}, {"from": "Ron", "to": "Gilderoy", "value": 6, "width": 1}, {"from": "Ron", "to": "Stan", "value": 16, "width": 1}, {"from": "Ron", "to": "Bellatrix", "value": 9, "width": 1}, {"from": "Ron", "to": "Pansy", "value": 6, "width": 1}, {"from": "Ron", "to": "Marietta", "value": 8, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 21, "width": 1}, {"from": "Ron", "to": "Firenze", "value": 31, "width": 1}, {"from": "Ron", "to": "James", "value": 1, "width": 1}, {"from": "Ron", "to": "Grawp", "value": 11, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 1, "width": 1}, {"from": "Sirius", "to": "Dumbledore", "value": 67, "width": 1}, {"from": "Sirius", "to": "Hedwig", "value": 6, "width": 1}, {"from": "Sirius", "to": "Fred", "value": 27, "width": 1}, {"from": "Sirius", "to": "Molly", "value": 10, "width": 1}, {"from": "Sirius", "to": "Alastor", "value": 7, "width": 1}, {"from": "Sirius", "to": "Kingsley", "value": 19, "width": 1}, {"from": "Sirius", "to": "Kreacher", "value": 45, "width": 1}, {"from": "Sirius", "to": "Ginny", "value": 8, "width": 1}, {"from": "Sirius", "to": "Hermione", "value": 17, "width": 1}, {"from": "Sirius", "to": "Luna", "value": 13, "width": 1}, {"from": "Sirius", "to": "Percy", "value": 10, "width": 1}, {"from": "Sirius", "to": "Hagrid", "value": 21, "width": 1}, {"from": "Sirius", "to": "Crookshanks", "value": 6, "width": 1}, {"from": "Sirius", "to": "Arthur", "value": 1, "width": 1}, {"from": "Sirius", "to": "Snape", "value": 85, "width": 1}, {"from": "Sirius", "to": "James", "value": 21, "width": 1}, {"from": "Sirius", "to": "Lee", "value": 6, "width": 1}, {"from": "Sirius", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Sirius", "to": "Cho", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 20, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 28, "width": 1}, {"from": "Dumbledore", "to": "Kreacher", "value": 52, "width": 1}, {"from": "Dumbledore", "to": "Arthur", "value": 18, "width": 1}, {"from": "Dumbledore", "to": "Bill", "value": 14, "width": 1}, {"from": "Dumbledore", "to": "Cornelius", "value": 27, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 3, "width": 1}, {"from": "Dumbledore", "to": "Kingsley", "value": 36, "width": 1}, {"from": "Dumbledore", "to": "Aberforth", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Alastor", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Parvati", "value": 17, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 71, "width": 1}, {"from": "Dumbledore", "to": "Cho", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 29, "width": 1}, {"from": "Dumbledore", "to": "Seamus", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 56, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 114, "width": 1}, {"from": "Dumbledore", "to": "Cedric", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Ernie", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Zacharias", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Angelina", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Peeves", "value": 2, "width": 1}, {"from": "Dumbledore", "to": "Minerva", "value": 23, "width": 1}, {"from": "Dumbledore", "to": "Fawkes", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Phineas", "value": 40, "width": 1}, {"from": "Dumbledore", "to": "Ginny", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Molly", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Sybill", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Lucius", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Marietta", "value": 37, "width": 1}, {"from": "Dumbledore", "to": "Dean", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Luna", "value": 3, "width": 1}, {"from": "Dumbledore", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Hermione", "to": "Hedwig", "value": 16, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 3, "width": 1}, {"from": "Hermione", "to": "Rita", "value": 5, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 47, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 85, "width": 1}, {"from": "Hermione", "to": "Fred", "value": 110, "width": 1}, {"from": "Hermione", "to": "Kreacher", "value": 31, "width": 1}, {"from": "Hermione", "to": "Buckbeak", "value": 8, "width": 1}, {"from": "Hermione", "to": "Luna", "value": 56, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 36, "width": 1}, {"from": "Hermione", "to": "Hagrid", "value": 205, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 142, "width": 1}, {"from": "Hermione", "to": "Lee", "value": 9, "width": 1}, {"from": "Hermione", "to": "Goyle", "value": 4, "width": 1}, {"from": "Hermione", "to": "Cho", "value": 40, "width": 1}, {"from": "Hermione", "to": "Angelina", "value": 5, "width": 1}, {"from": "Hermione", "to": "Ernie", "value": 12, "width": 1}, {"from": "Hermione", "to": "Olympe", "value": 4, "width": 1}, {"from": "Hermione", "to": "Peeves", "value": 7, "width": 1}, {"from": "Hermione", "to": "Firenze", "value": 32, "width": 1}, {"from": "Hermione", "to": "Minerva", "value": 3, "width": 1}, {"from": "Hermione", "to": "Seamus", "value": 6, "width": 1}, {"from": "Hermione", "to": "James", "value": 1, "width": 1}, {"from": "Hermione", "to": "Norbert", "value": 5, "width": 1}, {"from": "Hermione", "to": "Grawp", "value": 24, "width": 1}, {"from": "Hermione", "to": "Parvati", "value": 11, "width": 1}, {"from": "Hermione", "to": "Bane", "value": 4, "width": 1}, {"from": "Hermione", "to": "Magorian", "value": 6, "width": 1}, {"from": "Hermione", "to": "Ronan", "value": 5, "width": 1}, {"from": "Hermione", "to": "Bellatrix", "value": 5, "width": 1}, {"from": "Hermione", "to": "Arthur", "value": 4, "width": 1}, {"from": "Hedwig", "to": "Alastor", "value": 1, "width": 1}, {"from": "Hedwig", "to": "Neville", "value": 6, "width": 1}, {"from": "Hedwig", "to": "Luna", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Hagrid", "value": 21, "width": 1}, {"from": "Nymphadora", "to": "Remus", "value": 9, "width": 1}, {"from": "Kingsley", "to": "Fred", "value": 1, "width": 1}, {"from": "Kingsley", "to": "Bill", "value": 4, "width": 1}, {"from": "Kingsley", "to": "Marietta", "value": 6, "width": 1}, {"from": "Kingsley", "to": "Cornelius", "value": 1, "width": 1}, {"from": "Kingsley", "to": "Minerva", "value": 3, "width": 1}, {"from": "Kingsley", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Pigwidgeon", "to": "Luna", "value": 6, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 49, "width": 1}, {"from": "Fred", "to": "Bill", "value": 19, "width": 1}, {"from": "Fred", "to": "Percy", "value": 29, "width": 1}, {"from": "Fred", "to": "Molly", "value": 9, "width": 1}, {"from": "Fred", "to": "Kreacher", "value": 8, "width": 1}, {"from": "Fred", "to": "Sturgis", "value": 1, "width": 1}, {"from": "Fred", "to": "Lee", "value": 30, "width": 1}, {"from": "Fred", "to": "Neville", "value": 4, "width": 1}, {"from": "Fred", "to": "Snape", "value": 10, "width": 1}, {"from": "Fred", "to": "Alicia", "value": 18, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 45, "width": 1}, {"from": "Fred", "to": "Katie", "value": 32, "width": 1}, {"from": "Fred", "to": "Zacharias", "value": 9, "width": 1}, {"from": "Fred", "to": "Cho", "value": 4, "width": 1}, {"from": "Fred", "to": "Malfoy", "value": 15, "width": 1}, {"from": "Fred", "to": "Arthur", "value": 16, "width": 1}, {"from": "Fred", "to": "Luna", "value": 12, "width": 1}, {"from": "Fred", "to": "Peeves", "value": 13, "width": 1}, {"from": "Ginny", "to": "Snape", "value": 1, "width": 1}, {"from": "Ginny", "to": "Molly", "value": 7, "width": 1}, {"from": "Ginny", "to": "Arthur", "value": 12, "width": 1}, {"from": "Ginny", "to": "Luna", "value": 105, "width": 1}, {"from": "Ginny", "to": "Neville", "value": 104, "width": 1}, {"from": "Ginny", "to": "Hagrid", "value": 3, "width": 1}, {"from": "Ginny", "to": "Angelina", "value": 13, "width": 1}, {"from": "Ginny", "to": "Hannah", "value": 3, "width": 1}, {"from": "Ginny", "to": "Cho", "value": 4, "width": 1}, {"from": "Ginny", "to": "Alicia", "value": 3, "width": 1}, {"from": "Ginny", "to": "Kreacher", "value": 5, "width": 1}, {"from": "Ginny", "to": "Gilderoy", "value": 5, "width": 1}, {"from": "Ginny", "to": "Peeves", "value": 1, "width": 1}, {"from": "Ginny", "to": "Grawp", "value": 5, "width": 1}, {"from": "Ginny", "to": "Malfoy", "value": 6, "width": 1}, {"from": "Ginny", "to": "Bellatrix", "value": 5, "width": 1}, {"from": "Snape", "to": "Cho", "value": 36, "width": 1}, {"from": "Snape", "to": "Neville", "value": 26, "width": 1}, {"from": "Snape", "to": "Seamus", "value": 9, "width": 1}, {"from": "Snape", "to": "Pansy", "value": 3, "width": 1}, {"from": "Snape", "to": "Malfoy", "value": 42, "width": 1}, {"from": "Snape", "to": "Marietta", "value": 4, "width": 1}, {"from": "Snape", "to": "James", "value": 121, "width": 1}, {"from": "Snape", "to": "Hagrid", "value": 5, "width": 1}, {"from": "Snape", "to": "Luna", "value": 4, "width": 1}, {"from": "Snape", "to": "Kreacher", "value": 6, "width": 1}, {"from": "Snape", "to": "Crabbe", "value": 2, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 14, "width": 1}, {"from": "Bill", "to": "Molly", "value": 15, "width": 1}, {"from": "Bill", "to": "Percy", "value": 6, "width": 1}, {"from": "Rita", "to": "Cho", "value": 6, "width": 1}, {"from": "Rita", "to": "Luna", "value": 9, "width": 1}, {"from": "Kreacher", "to": "Hagrid", "value": 6, "width": 1}, {"from": "Kreacher", "to": "Buckbeak", "value": 4, "width": 1}, {"from": "Kreacher", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Molly", "to": "James", "value": 6, "width": 1}, {"from": "Molly", "to": "Arthur", "value": 10, "width": 1}, {"from": "Molly", "to": "Sturgis", "value": 3, "width": 1}, {"from": "James", "to": "Lily", "value": 5, "width": 1}, {"from": "Arthur", "to": "Andromeda", "value": 1, "width": 1}, {"from": "Arthur", "to": "Bob", "value": 4, "width": 1}, {"from": "Arthur", "to": "Sturgis", "value": 11, "width": 1}, {"from": "Andromeda", "to": "Bellatrix", "value": 11, "width": 1}, {"from": "Bellatrix", "to": "Neville", "value": 45, "width": 1}, {"from": "Bellatrix", "to": "Malfoy", "value": 17, "width": 1}, {"from": "Bellatrix", "to": "Luna", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 36, "width": 1}, {"from": "Malfoy", "to": "Neville", "value": 46, "width": 1}, {"from": "Malfoy", "to": "Luna", "value": 9, "width": 1}, {"from": "Malfoy", "to": "Parvati", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Hagrid", "value": 65, "width": 1}, {"from": "Malfoy", "to": "Angelina", "value": 16, "width": 1}, {"from": "Malfoy", "to": "Katie", "value": 16, "width": 1}, {"from": "Malfoy", "to": "Lee", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Pansy", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Sturgis", "value": 15, "width": 1}, {"from": "Malfoy", "to": "Lucius", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Ernie", "value": 29, "width": 1}, {"from": "Malfoy", "to": "Cho", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Justin", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 11, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 59, "width": 1}, {"from": "Hagrid", "to": "Olympe", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Lee", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Parvati", "value": 31, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Pansy", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Firenze", "value": 46, "width": 1}, {"from": "Hagrid", "to": "Dean", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Grawp", "value": 48, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 3, "width": 1}, {"from": "Hagrid", "to": "Magorian", "value": 32, "width": 1}, {"from": "Hagrid", "to": "Bane", "value": 17, "width": 1}, {"from": "Hagrid", "to": "Aragog", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Seamus", "value": 3, "width": 1}, {"from": "Hagrid", "to": "Luna", "value": 6, "width": 1}, {"from": "Frank", "to": "Neville", "value": 6, "width": 1}, {"from": "Neville", "to": "Luna", "value": 93, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 7, "width": 1}, {"from": "Neville", "to": "Cho", "value": 15, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 16, "width": 1}, {"from": "Neville", "to": "Parvati", "value": 18, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 35, "width": 1}, {"from": "Neville", "to": "Dean", "value": 56, "width": 1}, {"from": "Neville", "to": "Lavender", "value": 6, "width": 1}, {"from": "Neville", "to": "Pansy", "value": 5, "width": 1}, {"from": "Neville", "to": "Alicia", "value": 4, "width": 1}, {"from": "Neville", "to": "Alice", "value": 9, "width": 1}, {"from": "Sturgis", "to": "Mundungus", "value": 5, "width": 1}, {"from": "Lee", "to": "Zacharias", "value": 1, "width": 1}, {"from": "Lee", "to": "Cho", "value": 4, "width": 1}, {"from": "Lee", "to": "Alicia", "value": 10, "width": 1}, {"from": "Lee", "to": "Angelina", "value": 20, "width": 1}, {"from": "Luna", "to": "Parvati", "value": 17, "width": 1}, {"from": "Luna", "to": "Angelina", "value": 14, "width": 1}, {"from": "Luna", "to": "Cho", "value": 5, "width": 1}, {"from": "Luna", "to": "Grawp", "value": 4, "width": 1}, {"from": "Cho", "to": "Colin", "value": 5, "width": 1}, {"from": "Cho", "to": "Angelina", "value": 8, "width": 1}, {"from": "Cho", "to": "Zacharias", "value": 5, "width": 1}, {"from": "Cho", "to": "Marietta", "value": 37, "width": 1}, {"from": "Cho", "to": "Seamus", "value": 1, "width": 1}, {"from": "Goyle", "to": "Pansy", "value": 6, "width": 1}, {"from": "Goyle", "to": "Ernie", "value": 4, "width": 1}, {"from": "Goyle", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Parvati", "to": "Lavender", "value": 46, "width": 1}, {"from": "Parvati", "to": "Dean", "value": 19, "width": 1}, {"from": "Parvati", "to": "Peeves", "value": 4, "width": 1}, {"from": "Parvati", "to": "Firenze", "value": 53, "width": 1}, {"from": "Bloody", "to": "Peeves", "value": 5, "width": 1}, {"from": "Colin", "to": "Dennis", "value": 6, "width": 1}, {"from": "Dean", "to": "Seamus", "value": 65, "width": 1}, {"from": "Dean", "to": "Firenze", "value": 4, "width": 1}, {"from": "Angelina", "to": "Oliver", "value": 6, "width": 1}, {"from": "Angelina", "to": "Alicia", "value": 48, "width": 1}, {"from": "Angelina", "to": "Pansy", "value": 9, "width": 1}, {"from": "Angelina", "to": "Katie", "value": 48, "width": 1}, {"from": "Angelina", "to": "Peeves", "value": 5, "width": 1}, {"from": "Peeves", "to": "Katie", "value": 6, "width": 1}, {"from": "Ernie", "to": "Zacharias", "value": 5, "width": 1}, {"from": "Ernie", "to": "Hannah", "value": 12, "width": 1}, {"from": "Ernie", "to": "Justin", "value": 6, "width": 1}, {"from": "Alicia", "to": "Katie", "value": 41, "width": 1}, {"from": "Dolores", "to": "Minerva", "value": 4, "width": 1}, {"from": "Firenze", "to": "Bane", "value": 21, "width": 1}, {"from": "Firenze", "to": "Magorian", "value": 14, "width": 1}, {"from": "Bane", "to": "Magorian", "value": 23, "width": 1}, {"from": "Grawp", "to": "Magorian", "value": 5, "width": 1}, {"from": "Norbert", "to": "Aragog", "value": 5, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/6. Half-Blood Prince.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 0, "id": "Bellatrix", "label": "Bellatrix", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Snape", "label": "Snape", "shape": "dot", "size": 26}, {"font": {"color": "white"}, "group": 2, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 40}, {"font": {"color": "white"}, "group": 1, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 0, "id": "Kreacher", "label": "Kreacher", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 0, "id": "Harry", "label": "Harry", "shape": "dot", "size": 68}, {"font": {"color": "white"}, "group": 3, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 29}, {"font": {"color": "white"}, "group": 1, "id": "Narcissa", "label": "Narcissa", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Lucius", "label": "Lucius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Nymphadora", "label": "Nymphadora", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 20}, {"font": {"color": "white"}, "group": 4, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 20}, {"font": {"color": "white"}, "group": 3, "id": "Ron", "label": "Ron", "shape": "dot", "size": 39}, {"font": {"color": "white"}, "group": 0, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 3, "id": "Dean", "label": "Dean", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Katie", "label": "Katie", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 4, "id": "Fred", "label": "Fred", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 3, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Marvolo", "label": "Marvolo", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Cho", "label": "Cho", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 1, "id": "Amycus", "label": "Amycus", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Fang", "label": "Fang", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Luna", "label": "Luna", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 2, "id": "James", "label": "James", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Bill", "label": "Bill", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 3, "id": "Neville", "label": "Neville", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 0, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Madam", "label": "Madam", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Horace", "label": "Horace", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Albus", "label": "Albus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Molly", "label": "Molly", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Fawkes", "label": "Fawkes", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Bob", "label": "Bob", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Merope", "label": "Merope", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Morfin", "label": "Morfin", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 2, "id": "Stan", "label": "Stan", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Fleur", "label": "Fleur", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 3, "id": "Lavender", "label": "Lavender", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Hokey", "label": "Hokey", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Alecto", "label": "Alecto", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Fenrir", "label": "Fenrir", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Gabrielle", "label": "Gabrielle", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Lily", "label": "Lily", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Marietta", "label": "Marietta", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Blaise", "label": "Blaise", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Crabbe", "label": "Crabbe", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Nott", "label": "Nott", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Peverell", "label": "Peverell", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Aragog", "label": "Aragog", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Mundungus", "label": "Mundungus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Zacharias", "label": "Zacharias", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Romilda", "label": "Romilda", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Argus", "label": "Argus", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Percy", "label": "Percy", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 0, "id": "Barty", "label": "Barty", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Cornelius", "label": "Cornelius", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Myrtle", "label": "Myrtle", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Nagini", "label": "Nagini", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Grawp", "label": "Grawp", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Remus", "label": "Remus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Cormac", "label": "Cormac", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Augusta", "label": "Augusta", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Bellatrix", "to": "Snape", "value": 107, "width": 1}, {"from": "Bellatrix", "to": "Dumbledore", "value": 35, "width": 1}, {"from": "Bellatrix", "to": "Sirius", "value": 16, "width": 1}, {"from": "Bellatrix", "to": "Kreacher", "value": 10, "width": 1}, {"from": "Bellatrix", "to": "Harry", "value": 5, "width": 1}, {"from": "Bellatrix", "to": "Hermione", "value": 6, "width": 1}, {"from": "Snape", "to": "Narcissa", "value": 6, "width": 1}, {"from": "Snape", "to": "Dumbledore", "value": 276, "width": 1}, {"from": "Snape", "to": "Lucius", "value": 10, "width": 1}, {"from": "Snape", "to": "Harry", "value": 982, "width": 1}, {"from": "Snape", "to": "Nymphadora", "value": 11, "width": 1}, {"from": "Snape", "to": "Voldemort", "value": 79, "width": 1}, {"from": "Snape", "to": "Hagrid", "value": 16, "width": 1}, {"from": "Snape", "to": "Ron", "value": 148, "width": 1}, {"from": "Snape", "to": "Hermione", "value": 62, "width": 1}, {"from": "Snape", "to": "Malfoy", "value": 238, "width": 1}, {"from": "Snape", "to": "Dean", "value": 6, "width": 1}, {"from": "Snape", "to": "Katie", "value": 2, "width": 1}, {"from": "Snape", "to": "Fred", "value": 3, "width": 1}, {"from": "Snape", "to": "Goyle", "value": 6, "width": 1}, {"from": "Snape", "to": "Seamus", "value": 15, "width": 1}, {"from": "Snape", "to": "Marvolo", "value": 4, "width": 1}, {"from": "Snape", "to": "Sirius", "value": 6, "width": 1}, {"from": "Snape", "to": "Cho", "value": 4, "width": 1}, {"from": "Snape", "to": "Ginny", "value": 5, "width": 1}, {"from": "Snape", "to": "Amycus", "value": 6, "width": 1}, {"from": "Snape", "to": "Fang", "value": 11, "width": 1}, {"from": "Snape", "to": "Luna", "value": 12, "width": 1}, {"from": "Snape", "to": "James", "value": 16, "width": 1}, {"from": "Snape", "to": "Bill", "value": 3, "width": 1}, {"from": "Snape", "to": "Neville", "value": 8, "width": 1}, {"from": "Dumbledore", "to": "Harry", "value": 3249, "width": 1}, {"from": "Dumbledore", "to": "Petunia", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Dudley", "value": 32, "width": 1}, {"from": "Dumbledore", "to": "Sirius", "value": 49, "width": 1}, {"from": "Dumbledore", "to": "Kreacher", "value": 27, "width": 1}, {"from": "Dumbledore", "to": "Buckbeak", "value": 16, "width": 1}, {"from": "Dumbledore", "to": "Hedwig", "value": 14, "width": 1}, {"from": "Dumbledore", "to": "Voldemort", "value": 396, "width": 1}, {"from": "Dumbledore", "to": "Madam", "value": 21, "width": 1}, {"from": "Dumbledore", "to": "Horace", "value": 34, "width": 1}, {"from": "Dumbledore", "to": "Albus", "value": 28, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 174, "width": 1}, {"from": "Dumbledore", "to": "Arthur", "value": 19, "width": 1}, {"from": "Dumbledore", "to": "Molly", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 53, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 217, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 79, "width": 1}, {"from": "Dumbledore", "to": "Fawkes", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Bob", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Merope", "value": 31, "width": 1}, {"from": "Dumbledore", "to": "Morfin", "value": 38, "width": 1}, {"from": "Dumbledore", "to": "Ginny", "value": 20, "width": 1}, {"from": "Dumbledore", "to": "Katie", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Marvolo", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Luna", "value": 3, "width": 1}, {"from": "Dumbledore", "to": "Stan", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Fleur", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Lavender", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Hokey", "value": 19, "width": 1}, {"from": "Dumbledore", "to": "Amycus", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Alecto", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Fenrir", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Bill", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Seamus", "value": 4, "width": 1}, {"from": "Lucius", "to": "Voldemort", "value": 21, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 24, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 73, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 4, "width": 1}, {"from": "Harry", "to": "Kreacher", "value": 91, "width": 1}, {"from": "Harry", "to": "Buckbeak", "value": 20, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 487, "width": 1}, {"from": "Harry", "to": "Voldemort", "value": 639, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 14, "width": 1}, {"from": "Harry", "to": "Horace", "value": 48, "width": 1}, {"from": "Harry", "to": "Albus", "value": 12, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 51, "width": 1}, {"from": "Harry", "to": "Fred", "value": 132, "width": 1}, {"from": "Harry", "to": "Ron", "value": 3210, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 833, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 437, "width": 1}, {"from": "Harry", "to": "Gabrielle", "value": 4, "width": 1}, {"from": "Harry", "to": "Fleur", "value": 112, "width": 1}, {"from": "Harry", "to": "Bill", "value": 64, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 10, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 1011, "width": 1}, {"from": "Harry", "to": "Luna", "value": 215, "width": 1}, {"from": "Harry", "to": "Neville", "value": 227, "width": 1}, {"from": "Harry", "to": "Lily", "value": 9, "width": 1}, {"from": "Harry", "to": "Marietta", "value": 15, "width": 1}, {"from": "Harry", "to": "Blaise", "value": 13, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 47, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 15, "width": 1}, {"from": "Harry", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 44, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 32, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 48, "width": 1}, {"from": "Harry", "to": "Nott", "value": 2, "width": 1}, {"from": "Harry", "to": "Fawkes", "value": 20, "width": 1}, {"from": "Harry", "to": "Morfin", "value": 63, "width": 1}, {"from": "Harry", "to": "Peverell", "value": 4, "width": 1}, {"from": "Harry", "to": "Merope", "value": 27, "width": 1}, {"from": "Harry", "to": "Marvolo", "value": 51, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 4, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 31, "width": 1}, {"from": "Harry", "to": "Fang", "value": 57, "width": 1}, {"from": "Harry", "to": "Aragog", "value": 50, "width": 1}, {"from": "Harry", "to": "Dean", "value": 129, "width": 1}, {"from": "Harry", "to": "Mundungus", "value": 12, "width": 1}, {"from": "Harry", "to": "Katie", "value": 80, "width": 1}, {"from": "Harry", "to": "Madam", "value": 9, "width": 1}, {"from": "Harry", "to": "Cho", "value": 10, "width": 1}, {"from": "Harry", "to": "Zacharias", "value": 23, "width": 1}, {"from": "Harry", "to": "Romilda", "value": 14, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 36, "width": 1}, {"from": "Harry", "to": "Argus", "value": 3, "width": 1}, {"from": "Harry", "to": "Stan", "value": 20, "width": 1}, {"from": "Harry", "to": "James", "value": 23, "width": 1}, {"from": "Harry", "to": "Percy", "value": 45, "width": 1}, {"from": "Harry", "to": "Barty", "value": 9, "width": 1}, {"from": "Harry", "to": "Fenrir", "value": 34, "width": 1}, {"from": "Harry", "to": "Cornelius", "value": 9, "width": 1}, {"from": "Harry", "to": "Lavender", "value": 20, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 74, "width": 1}, {"from": "Harry", "to": "Hokey", "value": 13, "width": 1}, {"from": "Harry", "to": "Myrtle", "value": 24, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 22, "width": 1}, {"from": "Harry", "to": "Nagini", "value": 5, "width": 1}, {"from": "Harry", "to": "Amycus", "value": 17, "width": 1}, {"from": "Harry", "to": "Alecto", "value": 6, "width": 1}, {"from": "Harry", "to": "Grawp", "value": 11, "width": 1}, {"from": "Hedwig", "to": "Hermione", "value": 6, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 6, "width": 1}, {"from": "Petunia", "to": "Dudley", "value": 11, "width": 1}, {"from": "Dudley", "to": "Kreacher", "value": 6, "width": 1}, {"from": "Sirius", "to": "Voldemort", "value": 6, "width": 1}, {"from": "Sirius", "to": "Ron", "value": 10, "width": 1}, {"from": "Sirius", "to": "Hermione", "value": 7, "width": 1}, {"from": "Sirius", "to": "Bill", "value": 6, "width": 1}, {"from": "Sirius", "to": "Madam", "value": 6, "width": 1}, {"from": "Sirius", "to": "Cho", "value": 4, "width": 1}, {"from": "Kreacher", "to": "Ron", "value": 11, "width": 1}, {"from": "Kreacher", "to": "Dobby", "value": 79, "width": 1}, {"from": "Kreacher", "to": "Malfoy", "value": 17, "width": 1}, {"from": "Buckbeak", "to": "Hagrid", "value": 17, "width": 1}, {"from": "Buckbeak", "to": "Ron", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Molly", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Ginny", "value": 3, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 115, "width": 1}, {"from": "Hagrid", "to": "Madam", "value": 9, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Hagrid", "to": "Hermione", "value": 62, "width": 1}, {"from": "Hagrid", "to": "Fleur", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Voldemort", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 2, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Aragog", "value": 70, "width": 1}, {"from": "Hagrid", "to": "Katie", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Remus", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Bill", "value": 1, "width": 1}, {"from": "Hagrid", "to": "Percy", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Grawp", "value": 12, "width": 1}, {"from": "Voldemort", "to": "Hermione", "value": 29, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 38, "width": 1}, {"from": "Voldemort", "to": "Fleur", "value": 7, "width": 1}, {"from": "Voldemort", "to": "Neville", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Merope", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Morfin", "value": 36, "width": 1}, {"from": "Voldemort", "to": "Ginny", "value": 14, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Hokey", "value": 26, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Horace", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Arthur", "value": 7, "width": 1}, {"from": "Voldemort", "to": "Lily", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Grawp", "value": 3, "width": 1}, {"from": "Ron", "to": "Arthur", "value": 8, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 336, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 726, "width": 1}, {"from": "Ron", "to": "Bill", "value": 58, "width": 1}, {"from": "Ron", "to": "Fleur", "value": 44, "width": 1}, {"from": "Ron", "to": "Fred", "value": 132, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 17, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 215, "width": 1}, {"from": "Ron", "to": "Neville", "value": 41, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 20, "width": 1}, {"from": "Ron", "to": "Dean", "value": 66, "width": 1}, {"from": "Ron", "to": "Ernie", "value": 34, "width": 1}, {"from": "Ron", "to": "Nott", "value": 3, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 42, "width": 1}, {"from": "Ron", "to": "Fang", "value": 9, "width": 1}, {"from": "Ron", "to": "Aragog", "value": 19, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 11, "width": 1}, {"from": "Ron", "to": "Mundungus", "value": 3, "width": 1}, {"from": "Ron", "to": "Katie", "value": 92, "width": 1}, {"from": "Ron", "to": "Cho", "value": 12, "width": 1}, {"from": "Ron", "to": "Lavender", "value": 35, "width": 1}, {"from": "Ron", "to": "Cormac", "value": 6, "width": 1}, {"from": "Ron", "to": "Percy", "value": 12, "width": 1}, {"from": "Ron", "to": "Romilda", "value": 4, "width": 1}, {"from": "Ron", "to": "Luna", "value": 32, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 12, "width": 1}, {"from": "Ron", "to": "Dobby", "value": 12, "width": 1}, {"from": "Ron", "to": "Myrtle", "value": 30, "width": 1}, {"from": "Ron", "to": "Amycus", "value": 6, "width": 1}, {"from": "Ron", "to": "Grawp", "value": 5, "width": 1}, {"from": "Arthur", "to": "Molly", "value": 6, "width": 1}, {"from": "Arthur", "to": "Fleur", "value": 6, "width": 1}, {"from": "Arthur", "to": "Bill", "value": 6, "width": 1}, {"from": "Fred", "to": "Fleur", "value": 5, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 56, "width": 1}, {"from": "Fred", "to": "Dean", "value": 4, "width": 1}, {"from": "Fred", "to": "Hermione", "value": 4, "width": 1}, {"from": "Fred", "to": "Malfoy", "value": 3, "width": 1}, {"from": "Fred", "to": "Percy", "value": 10, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 54, "width": 1}, {"from": "Hermione", "to": "Fleur", "value": 12, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 82, "width": 1}, {"from": "Hermione", "to": "Goyle", "value": 14, "width": 1}, {"from": "Hermione", "to": "Hannah", "value": 4, "width": 1}, {"from": "Hermione", "to": "Katie", "value": 20, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 10, "width": 1}, {"from": "Hermione", "to": "Dean", "value": 22, "width": 1}, {"from": "Hermione", "to": "Seamus", "value": 6, "width": 1}, {"from": "Hermione", "to": "Parvati", "value": 10, "width": 1}, {"from": "Hermione", "to": "Fenrir", "value": 12, "width": 1}, {"from": "Hermione", "to": "Ernie", "value": 6, "width": 1}, {"from": "Hermione", "to": "Blaise", "value": 4, "width": 1}, {"from": "Hermione", "to": "Peeves", "value": 2, "width": 1}, {"from": "Hermione", "to": "Luna", "value": 22, "width": 1}, {"from": "Hermione", "to": "Lavender", "value": 5, "width": 1}, {"from": "Hermione", "to": "Dobby", "value": 6, "width": 1}, {"from": "Hermione", "to": "Aragog", "value": 14, "width": 1}, {"from": "Hermione", "to": "Bill", "value": 6, "width": 1}, {"from": "Ginny", "to": "Bill", "value": 25, "width": 1}, {"from": "Ginny", "to": "Fleur", "value": 36, "width": 1}, {"from": "Ginny", "to": "Dean", "value": 64, "width": 1}, {"from": "Ginny", "to": "Gabrielle", "value": 10, "width": 1}, {"from": "Ginny", "to": "Blaise", "value": 9, "width": 1}, {"from": "Ginny", "to": "Neville", "value": 47, "width": 1}, {"from": "Ginny", "to": "Malfoy", "value": 35, "width": 1}, {"from": "Ginny", "to": "Zacharias", "value": 10, "width": 1}, {"from": "Ginny", "to": "Luna", "value": 6, "width": 1}, {"from": "Ginny", "to": "Katie", "value": 10, "width": 1}, {"from": "Gabrielle", "to": "Fleur", "value": 4, "width": 1}, {"from": "Fleur", "to": "Bill", "value": 131, "width": 1}, {"from": "Fleur", "to": "Percy", "value": 4, "width": 1}, {"from": "Fleur", "to": "Remus", "value": 4, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 5, "width": 1}, {"from": "Bill", "to": "Nymphadora", "value": 6, "width": 1}, {"from": "Bill", "to": "Neville", "value": 6, "width": 1}, {"from": "Bill", "to": "Malfoy", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 114, "width": 1}, {"from": "Malfoy", "to": "Pansy", "value": 59, "width": 1}, {"from": "Malfoy", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Blaise", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Nott", "value": 2, "width": 1}, {"from": "Malfoy", "to": "Katie", "value": 12, "width": 1}, {"from": "Malfoy", "to": "Dobby", "value": 22, "width": 1}, {"from": "Malfoy", "to": "Marietta", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Ernie", "value": 21, "width": 1}, {"from": "Malfoy", "to": "Neville", "value": 9, "width": 1}, {"from": "Dean", "to": "Neville", "value": 18, "width": 1}, {"from": "Dean", "to": "Seamus", "value": 59, "width": 1}, {"from": "Dean", "to": "Katie", "value": 5, "width": 1}, {"from": "Luna", "to": "Neville", "value": 34, "width": 1}, {"from": "Luna", "to": "Trevor", "value": 6, "width": 1}, {"from": "Luna", "to": "Firenze", "value": 6, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 12, "width": 1}, {"from": "Neville", "to": "Augusta", "value": 6, "width": 1}, {"from": "Neville", "to": "Parvati", "value": 5, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 6, "width": 1}, {"from": "Neville", "to": "Alecto", "value": 4, "width": 1}, {"from": "Lily", "to": "James", "value": 6, "width": 1}, {"from": "Blaise", "to": "Pansy", "value": 6, "width": 1}, {"from": "Goyle", "to": "Percy", "value": 5, "width": 1}, {"from": "Parvati", "to": "Firenze", "value": 6, "width": 1}, {"from": "Parvati", "to": "Lavender", "value": 12, "width": 1}, {"from": "Parvati", "to": "Katie", "value": 10, "width": 1}, {"from": "Parvati", "to": "Cormac", "value": 4, "width": 1}, {"from": "Morfin", "to": "Merope", "value": 30, "width": 1}, {"from": "Morfin", "to": "Marvolo", "value": 28, "width": 1}, {"from": "Morfin", "to": "Hokey", "value": 6, "width": 1}, {"from": "Merope", "to": "Marvolo", "value": 15, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/7. Deathly Hallows.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 3, "id": "Lucius", "label": "Lucius", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 4, "id": "Snape", "label": "Snape", "shape": "dot", "size": 27}, {"font": {"color": "white"}, "group": 3, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 4, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 30}, {"font": {"color": "white"}, "group": 5, "id": "Harry", "label": "Harry", "shape": "dot", "size": 80}, {"font": {"color": "white"}, "group": 3, "id": "Ron", "label": "Ron", "shape": "dot", "size": 56}, {"font": {"color": "white"}, "group": 1, "id": "Bellatrix", "label": "Bellatrix", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 1, "id": "Griphook", "label": "Griphook", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 0, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 38}, {"font": {"color": "white"}, "group": 3, "id": "Percy", "label": "Percy", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Kingsley", "label": "Kingsley", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 4, "id": "Pius", "label": "Pius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 40}, {"font": {"color": "white"}, "group": 4, "id": "Amycus", "label": "Amycus", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Kreacher", "label": "Kreacher", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Dirk", "label": "Dirk", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Ted", "label": "Ted", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Luna", "label": "Luna", "shape": "dot", "size": 26}, {"font": {"color": "white"}, "group": 2, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 20}, {"font": {"color": "white"}, "group": 4, "id": "Nagini", "label": "Nagini", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Aberforth", "label": "Aberforth", "shape": "dot", "size": 15}, {"font": {"color": "white"}, "group": 4, "id": "Neville", "label": "Neville", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 4, "id": "Alecto", "label": "Alecto", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Albus", "label": "Albus", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 0, "id": "Lily", "label": "Lily", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 0, "id": "James", "label": "James", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Fleur", "label": "Fleur", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 4, "id": "Mundungus", "label": "Mundungus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 2, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 20}, {"font": {"color": "white"}, "group": 1, "id": "Stan", "label": "Stan", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Godric", "label": "Godric", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Bathilda", "label": "Bathilda", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 1, "id": "Xenophilius", "label": "Xenophilius", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 2, "id": "Bill", "label": "Bill", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 1, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 4, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 5, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 4, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Scabior", "label": "Scabior", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Remus", "label": "Remus", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Narcissa", "label": "Narcissa", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Travers", "label": "Travers", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 1, "id": "Madam", "label": "Madam", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Molly", "label": "Molly", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 5, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 0, "id": "Rita", "label": "Rita", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Dedalus", "label": "Dedalus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Fred", "label": "Fred", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 3, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Gabrielle", "label": "Gabrielle", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 5, "id": "Pigwidgeon", "label": "Pigwidgeon", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Elphias", "label": "Elphias", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 0, "id": "Ariana", "label": "Ariana", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 0, "id": "Kendra", "label": "Kendra", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 5, "id": "Nymphadora", "label": "Nymphadora", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Percival", "label": "Percival", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 5, "id": "Mafalda", "label": "Mafalda", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 5, "id": "Albert", "label": "Albert", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 1, "id": "Dean", "label": "Dean", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 4, "id": "Beedle", "label": "Beedle", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Peverell", "label": "Peverell", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Gornuk", "label": "Gornuk", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Lee", "label": "Lee", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 5, "id": "Andromeda", "label": "Andromeda", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Bogrod", "label": "Bogrod", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Cho", "label": "Cho", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 5, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 5, "id": "Helena", "label": "Helena", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Fang", "label": "Fang", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 5, "id": "Aragog", "label": "Aragog", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 1, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Grawp", "label": "Grawp", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 5, "id": "Colin", "label": "Colin", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Bane", "label": "Bane", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Magorian", "label": "Magorian", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 0, "id": "Gellert", "label": "Gellert", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Viktor", "label": "Viktor", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Horace", "label": "Horace", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Padma", "label": "Padma", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Terry", "label": "Terry", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 2}]);
100
+ edges = new vis.DataSet([{"from": "Lucius", "to": "Snape", "value": 14, "width": 1}, {"from": "Lucius", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Lucius", "to": "Voldemort", "value": 28, "width": 1}, {"from": "Lucius", "to": "Harry", "value": 44, "width": 1}, {"from": "Lucius", "to": "Ron", "value": 6, "width": 1}, {"from": "Lucius", "to": "Bellatrix", "value": 23, "width": 1}, {"from": "Lucius", "to": "Griphook", "value": 5, "width": 1}, {"from": "Lucius", "to": "Dumbledore", "value": 8, "width": 1}, {"from": "Lucius", "to": "Percy", "value": 6, "width": 1}, {"from": "Lucius", "to": "Kingsley", "value": 5, "width": 1}, {"from": "Snape", "to": "Voldemort", "value": 233, "width": 1}, {"from": "Snape", "to": "Pius", "value": 1, "width": 1}, {"from": "Snape", "to": "Harry", "value": 512, "width": 1}, {"from": "Snape", "to": "Ron", "value": 55, "width": 1}, {"from": "Snape", "to": "Dumbledore", "value": 251, "width": 1}, {"from": "Snape", "to": "Hermione", "value": 20, "width": 1}, {"from": "Snape", "to": "Amycus", "value": 5, "width": 1}, {"from": "Snape", "to": "Kreacher", "value": 5, "width": 1}, {"from": "Snape", "to": "Dirk", "value": 17, "width": 1}, {"from": "Snape", "to": "Ted", "value": 9, "width": 1}, {"from": "Snape", "to": "Griphook", "value": 3, "width": 1}, {"from": "Snape", "to": "Luna", "value": 23, "width": 1}, {"from": "Snape", "to": "Ginny", "value": 15, "width": 1}, {"from": "Snape", "to": "Nagini", "value": 9, "width": 1}, {"from": "Snape", "to": "Aberforth", "value": 3, "width": 1}, {"from": "Snape", "to": "Neville", "value": 3, "width": 1}, {"from": "Snape", "to": "Alecto", "value": 6, "width": 1}, {"from": "Snape", "to": "Minerva", "value": 4, "width": 1}, {"from": "Snape", "to": "Albus", "value": 6, "width": 1}, {"from": "Snape", "to": "Lily", "value": 41, "width": 1}, {"from": "Snape", "to": "Petunia", "value": 46, "width": 1}, {"from": "Snape", "to": "James", "value": 24, "width": 1}, {"from": "Snape", "to": "Fleur", "value": 6, "width": 1}, {"from": "Snape", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Snape", "to": "Mundungus", "value": 12, "width": 1}, {"from": "Snape", "to": "Sirius", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Pius", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 35, "width": 1}, {"from": "Voldemort", "to": "Bellatrix", "value": 74, "width": 1}, {"from": "Voldemort", "to": "Harry", "value": 1431, "width": 1}, {"from": "Voldemort", "to": "Dumbledore", "value": 166, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 65, "width": 1}, {"from": "Voldemort", "to": "Stan", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Fleur", "value": 7, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 212, "width": 1}, {"from": "Voldemort", "to": "Ginny", "value": 23, "width": 1}, {"from": "Voldemort", "to": "Hermione", "value": 70, "width": 1}, {"from": "Voldemort", "to": "Godric", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Sirius", "value": 28, "width": 1}, {"from": "Voldemort", "to": "Nagini", "value": 33, "width": 1}, {"from": "Voldemort", "to": "Kreacher", "value": 34, "width": 1}, {"from": "Voldemort", "to": "Bathilda", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Xenophilius", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Griphook", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Bill", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Dobby", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Seamus", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Luna", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Albus", "value": 2, "width": 1}, {"from": "Voldemort", "to": "Hedwig", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Neville", "value": 41, "width": 1}, {"from": "Voldemort", "to": "Buckbeak", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Kingsley", "value": 12, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Harry", "value": 82, "width": 1}, {"from": "Malfoy", "to": "Scabior", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Ron", "value": 21, "width": 1}, {"from": "Malfoy", "to": "Griphook", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 69, "width": 1}, {"from": "Malfoy", "to": "Hermione", "value": 11, "width": 1}, {"from": "Malfoy", "to": "Albus", "value": 4, "width": 1}, {"from": "Bellatrix", "to": "Harry", "value": 201, "width": 1}, {"from": "Bellatrix", "to": "Remus", "value": 5, "width": 1}, {"from": "Bellatrix", "to": "Ron", "value": 83, "width": 1}, {"from": "Bellatrix", "to": "Narcissa", "value": 22, "width": 1}, {"from": "Bellatrix", "to": "Luna", "value": 11, "width": 1}, {"from": "Bellatrix", "to": "Griphook", "value": 44, "width": 1}, {"from": "Bellatrix", "to": "Dobby", "value": 9, "width": 1}, {"from": "Bellatrix", "to": "Hermione", "value": 37, "width": 1}, {"from": "Bellatrix", "to": "Fleur", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Dumbledore", "value": 8, "width": 1}, {"from": "Bellatrix", "to": "Bill", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Xenophilius", "value": 2, "width": 1}, {"from": "Bellatrix", "to": "Travers", "value": 23, "width": 1}, {"from": "Bellatrix", "to": "Madam", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Hagrid", "value": 5, "width": 1}, {"from": "Bellatrix", "to": "Molly", "value": 6, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 217, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 1608, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 540, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 66, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 1352, "width": 1}, {"from": "Harry", "to": "Rita", "value": 30, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 33, "width": 1}, {"from": "Harry", "to": "Kingsley", "value": 168, "width": 1}, {"from": "Harry", "to": "Dedalus", "value": 58, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 41, "width": 1}, {"from": "Harry", "to": "Ron", "value": 4449, "width": 1}, {"from": "Harry", "to": "Fred", "value": 161, "width": 1}, {"from": "Harry", "to": "Fleur", "value": 150, "width": 1}, {"from": "Harry", "to": "Bill", "value": 275, "width": 1}, {"from": "Harry", "to": "Ted", "value": 47, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 248, "width": 1}, {"from": "Harry", "to": "Stan", "value": 7, "width": 1}, {"from": "Harry", "to": "Remus", "value": 17, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 35, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 106, "width": 1}, {"from": "Harry", "to": "Molly", "value": 9, "width": 1}, {"from": "Harry", "to": "Godric", "value": 47, "width": 1}, {"from": "Harry", "to": "Gabrielle", "value": 14, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 26, "width": 1}, {"from": "Harry", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Harry", "to": "Luna", "value": 417, "width": 1}, {"from": "Harry", "to": "Xenophilius", "value": 192, "width": 1}, {"from": "Harry", "to": "Elphias", "value": 20, "width": 1}, {"from": "Harry", "to": "Albus", "value": 135, "width": 1}, {"from": "Harry", "to": "Ariana", "value": 46, "width": 1}, {"from": "Harry", "to": "Kendra", "value": 6, "width": 1}, {"from": "Harry", "to": "Aberforth", "value": 149, "width": 1}, {"from": "Harry", "to": "Bathilda", "value": 166, "width": 1}, {"from": "Harry", "to": "James", "value": 115, "width": 1}, {"from": "Harry", "to": "Nagini", "value": 65, "width": 1}, {"from": "Harry", "to": "Lily", "value": 42, "width": 1}, {"from": "Harry", "to": "Kreacher", "value": 339, "width": 1}, {"from": "Harry", "to": "Nymphadora", "value": 11, "width": 1}, {"from": "Harry", "to": "Percival", "value": 6, "width": 1}, {"from": "Harry", "to": "Mundungus", "value": 21, "width": 1}, {"from": "Harry", "to": "Mafalda", "value": 39, "width": 1}, {"from": "Harry", "to": "Albert", "value": 19, "width": 1}, {"from": "Harry", "to": "Percy", "value": 36, "width": 1}, {"from": "Harry", "to": "Dirk", "value": 21, "width": 1}, {"from": "Harry", "to": "Griphook", "value": 439, "width": 1}, {"from": "Harry", "to": "Dean", "value": 91, "width": 1}, {"from": "Harry", "to": "Neville", "value": 210, "width": 1}, {"from": "Harry", "to": "Beedle", "value": 11, "width": 1}, {"from": "Harry", "to": "Peverell", "value": 20, "width": 1}, {"from": "Harry", "to": "Gornuk", "value": 6, "width": 1}, {"from": "Harry", "to": "Lee", "value": 9, "width": 1}, {"from": "Harry", "to": "Scabior", "value": 22, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 132, "width": 1}, {"from": "Harry", "to": "Narcissa", "value": 4, "width": 1}, {"from": "Harry", "to": "Andromeda", "value": 1, "width": 1}, {"from": "Harry", "to": "Madam", "value": 5, "width": 1}, {"from": "Harry", "to": "Travers", "value": 46, "width": 1}, {"from": "Harry", "to": "Bogrod", "value": 34, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 27, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 10, "width": 1}, {"from": "Harry", "to": "Cho", "value": 16, "width": 1}, {"from": "Harry", "to": "Amycus", "value": 15, "width": 1}, {"from": "Harry", "to": "Minerva", "value": 6, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 3, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 10, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 21, "width": 1}, {"from": "Harry", "to": "Helena", "value": 9, "width": 1}, {"from": "Harry", "to": "Fang", "value": 28, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 53, "width": 1}, {"from": "Harry", "to": "Aragog", "value": 11, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 5, "width": 1}, {"from": "Harry", "to": "Grawp", "value": 22, "width": 1}, {"from": "Harry", "to": "Colin", "value": 2, "width": 1}, {"from": "Harry", "to": "Bane", "value": 4, "width": 1}, {"from": "Harry", "to": "Magorian", "value": 6, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 37, "width": 1}, {"from": "Dudley", "to": "Dedalus", "value": 10, "width": 1}, {"from": "Dudley", "to": "Vernon", "value": 12, "width": 1}, {"from": "Dudley", "to": "Hedwig", "value": 8, "width": 1}, {"from": "Dudley", "to": "Dumbledore", "value": 12, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 5, "width": 1}, {"from": "Dudley", "to": "Scabior", "value": 5, "width": 1}, {"from": "Hermione", "to": "Ron", "value": 1170, "width": 1}, {"from": "Hermione", "to": "Bill", "value": 39, "width": 1}, {"from": "Hermione", "to": "Fred", "value": 19, "width": 1}, {"from": "Hermione", "to": "Fleur", "value": 42, "width": 1}, {"from": "Hermione", "to": "Hedwig", "value": 5, "width": 1}, {"from": "Hermione", "to": "Kingsley", "value": 17, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 42, "width": 1}, {"from": "Hermione", "to": "Dumbledore", "value": 113, "width": 1}, {"from": "Hermione", "to": "Hagrid", "value": 26, "width": 1}, {"from": "Hermione", "to": "Sirius", "value": 15, "width": 1}, {"from": "Hermione", "to": "Charlie", "value": 11, "width": 1}, {"from": "Hermione", "to": "Luna", "value": 18, "width": 1}, {"from": "Hermione", "to": "Bathilda", "value": 39, "width": 1}, {"from": "Hermione", "to": "Kreacher", "value": 34, "width": 1}, {"from": "Hermione", "to": "Remus", "value": 5, "width": 1}, {"from": "Hermione", "to": "James", "value": 7, "width": 1}, {"from": "Hermione", "to": "Mafalda", "value": 12, "width": 1}, {"from": "Hermione", "to": "Dean", "value": 8, "width": 1}, {"from": "Hermione", "to": "Godric", "value": 15, "width": 1}, {"from": "Hermione", "to": "Nagini", "value": 8, "width": 1}, {"from": "Hermione", "to": "Rita", "value": 1, "width": 1}, {"from": "Hermione", "to": "Xenophilius", "value": 93, "width": 1}, {"from": "Hermione", "to": "Lily", "value": 6, "width": 1}, {"from": "Hermione", "to": "Gornuk", "value": 6, "width": 1}, {"from": "Hermione", "to": "Lee", "value": 5, "width": 1}, {"from": "Hermione", "to": "Griphook", "value": 22, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 11, "width": 1}, {"from": "Hermione", "to": "Travers", "value": 25, "width": 1}, {"from": "Hermione", "to": "Madam", "value": 6, "width": 1}, {"from": "Hermione", "to": "Bogrod", "value": 4, "width": 1}, {"from": "Hermione", "to": "Aberforth", "value": 12, "width": 1}, {"from": "Hermione", "to": "Ariana", "value": 6, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 3, "width": 1}, {"from": "Hermione", "to": "Ernie", "value": 5, "width": 1}, {"from": "Hermione", "to": "Albus", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Hedwig", "value": 21, "width": 1}, {"from": "Hagrid", "to": "Petunia", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 39, "width": 1}, {"from": "Hagrid", "to": "Kingsley", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Fleur", "value": 23, "width": 1}, {"from": "Hagrid", "to": "Bill", "value": 8, "width": 1}, {"from": "Hagrid", "to": "Ginny", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Fred", "value": 15, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Dumbledore", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Sirius", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Luna", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Lee", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Peeves", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Dumbledore", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Sirius", "value": 4, "width": 1}, {"from": "Albus", "to": "Percival", "value": 16, "width": 1}, {"from": "Albus", "to": "Dumbledore", "value": 44, "width": 1}, {"from": "Albus", "to": "Aberforth", "value": 129, "width": 1}, {"from": "Albus", "to": "Kendra", "value": 25, "width": 1}, {"from": "Albus", "to": "Ariana", "value": 47, "width": 1}, {"from": "Albus", "to": "Elphias", "value": 10, "width": 1}, {"from": "Albus", "to": "Bathilda", "value": 26, "width": 1}, {"from": "Albus", "to": "Gellert", "value": 16, "width": 1}, {"from": "Albus", "to": "Ron", "value": 34, "width": 1}, {"from": "Albus", "to": "James", "value": 20, "width": 1}, {"from": "Albus", "to": "Ginny", "value": 16, "width": 1}, {"from": "Albus", "to": "Lily", "value": 6, "width": 1}, {"from": "Percival", "to": "Godric", "value": 11, "width": 1}, {"from": "Percival", "to": "Ariana", "value": 11, "width": 1}, {"from": "Percival", "to": "Dumbledore", "value": 6, "width": 1}, {"from": "Percival", "to": "Kendra", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Ariana", "value": 41, "width": 1}, {"from": "Dumbledore", "to": "Aberforth", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 258, "width": 1}, {"from": "Dumbledore", "to": "Bill", "value": 38, "width": 1}, {"from": "Dumbledore", "to": "Beedle", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Charlie", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Xenophilius", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Elphias", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Kendra", "value": 26, "width": 1}, {"from": "Dumbledore", "to": "Bathilda", "value": 80, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Kreacher", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Sirius", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Remus", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Rita", "value": 21, "width": 1}, {"from": "Dumbledore", "to": "Viktor", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Vernon", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fleur", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Dobby", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Griphook", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Nagini", "value": 1, "width": 1}, {"from": "Dumbledore", "to": "Luna", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Petunia", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Peverell", "value": 9, "width": 1}, {"from": "Aberforth", "to": "Ariana", "value": 34, "width": 1}, {"from": "Aberforth", "to": "Bathilda", "value": 11, "width": 1}, {"from": "Aberforth", "to": "Kendra", "value": 6, "width": 1}, {"from": "Aberforth", "to": "Sirius", "value": 6, "width": 1}, {"from": "Aberforth", "to": "Ron", "value": 23, "width": 1}, {"from": "Aberforth", "to": "Dobby", "value": 6, "width": 1}, {"from": "Aberforth", "to": "Seamus", "value": 3, "width": 1}, {"from": "Aberforth", "to": "Neville", "value": 8, "width": 1}, {"from": "Aberforth", "to": "Percy", "value": 10, "width": 1}, {"from": "Aberforth", "to": "Ginny", "value": 11, "width": 1}, {"from": "Kendra", "to": "Elphias", "value": 11, "width": 1}, {"from": "Kendra", "to": "Ariana", "value": 55, "width": 1}, {"from": "Kendra", "to": "Bathilda", "value": 18, "width": 1}, {"from": "Kendra", "to": "Gellert", "value": 5, "width": 1}, {"from": "Ariana", "to": "Elphias", "value": 11, "width": 1}, {"from": "Ariana", "to": "Bathilda", "value": 26, "width": 1}, {"from": "Ariana", "to": "Rita", "value": 6, "width": 1}, {"from": "Ariana", "to": "Gellert", "value": 4, "width": 1}, {"from": "Ariana", "to": "Ron", "value": 2, "width": 1}, {"from": "Ariana", "to": "Neville", "value": 8, "width": 1}, {"from": "Vernon", "to": "Scabior", "value": 5, "width": 1}, {"from": "Kingsley", "to": "Fleur", "value": 24, "width": 1}, {"from": "Kingsley", "to": "Stan", "value": 5, "width": 1}, {"from": "Kingsley", "to": "Fred", "value": 20, "width": 1}, {"from": "Kingsley", "to": "Ginny", "value": 6, "width": 1}, {"from": "Kingsley", "to": "Ron", "value": 14, "width": 1}, {"from": "Kingsley", "to": "Bill", "value": 32, "width": 1}, {"from": "Kingsley", "to": "Lee", "value": 4, "width": 1}, {"from": "Kingsley", "to": "Luna", "value": 6, "width": 1}, {"from": "Petunia", "to": "Ron", "value": 6, "width": 1}, {"from": "Petunia", "to": "James", "value": 5, "width": 1}, {"from": "Petunia", "to": "Lily", "value": 38, "width": 1}, {"from": "Ron", "to": "Fleur", "value": 58, "width": 1}, {"from": "Ron", "to": "Fred", "value": 124, "width": 1}, {"from": "Ron", "to": "Bill", "value": 62, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 107, "width": 1}, {"from": "Ron", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 2, "width": 1}, {"from": "Ron", "to": "Beedle", "value": 18, "width": 1}, {"from": "Ron", "to": "Luna", "value": 76, "width": 1}, {"from": "Ron", "to": "Xenophilius", "value": 87, "width": 1}, {"from": "Ron", "to": "Sirius", "value": 4, "width": 1}, {"from": "Ron", "to": "Godric", "value": 14, "width": 1}, {"from": "Ron", "to": "Kreacher", "value": 53, "width": 1}, {"from": "Ron", "to": "Arthur", "value": 6, "width": 1}, {"from": "Ron", "to": "Remus", "value": 6, "width": 1}, {"from": "Ron", "to": "James", "value": 3, "width": 1}, {"from": "Ron", "to": "Amycus", "value": 8, "width": 1}, {"from": "Ron", "to": "Mafalda", "value": 6, "width": 1}, {"from": "Ron", "to": "Bathilda", "value": 5, "width": 1}, {"from": "Ron", "to": "Nagini", "value": 14, "width": 1}, {"from": "Ron", "to": "Stan", "value": 9, "width": 1}, {"from": "Ron", "to": "Viktor", "value": 5, "width": 1}, {"from": "Ron", "to": "Peverell", "value": 9, "width": 1}, {"from": "Ron", "to": "Lily", "value": 12, "width": 1}, {"from": "Ron", "to": "Lee", "value": 18, "width": 1}, {"from": "Ron", "to": "Dirk", "value": 9, "width": 1}, {"from": "Ron", "to": "Scabior", "value": 14, "width": 1}, {"from": "Ron", "to": "Dean", "value": 59, "width": 1}, {"from": "Ron", "to": "Griphook", "value": 78, "width": 1}, {"from": "Ron", "to": "Dobby", "value": 29, "width": 1}, {"from": "Ron", "to": "Gabrielle", "value": 3, "width": 1}, {"from": "Ron", "to": "Travers", "value": 50, "width": 1}, {"from": "Ron", "to": "Bogrod", "value": 18, "width": 1}, {"from": "Ron", "to": "Neville", "value": 80, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 17, "width": 1}, {"from": "Ron", "to": "Cho", "value": 9, "width": 1}, {"from": "Ron", "to": "Fang", "value": 4, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 31, "width": 1}, {"from": "Ron", "to": "Percy", "value": 34, "width": 1}, {"from": "Ron", "to": "Aragog", "value": 5, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 6, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 10, "width": 1}, {"from": "Bill", "to": "Fleur", "value": 283, "width": 1}, {"from": "Bill", "to": "Fred", "value": 15, "width": 1}, {"from": "Bill", "to": "Ginny", "value": 11, "width": 1}, {"from": "Bill", "to": "Percy", "value": 6, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 12, "width": 1}, {"from": "Bill", "to": "Luna", "value": 25, "width": 1}, {"from": "Bill", "to": "Dirk", "value": 4, "width": 1}, {"from": "Bill", "to": "Xenophilius", "value": 6, "width": 1}, {"from": "Bill", "to": "Dean", "value": 5, "width": 1}, {"from": "Bill", "to": "Dobby", "value": 22, "width": 1}, {"from": "Bill", "to": "Griphook", "value": 37, "width": 1}, {"from": "Bill", "to": "Ted", "value": 2, "width": 1}, {"from": "Bill", "to": "Andromeda", "value": 5, "width": 1}, {"from": "Fleur", "to": "Fred", "value": 40, "width": 1}, {"from": "Fleur", "to": "Remus", "value": 5, "width": 1}, {"from": "Fleur", "to": "Ginny", "value": 6, "width": 1}, {"from": "Fleur", "to": "Gabrielle", "value": 28, "width": 1}, {"from": "Fleur", "to": "Percy", "value": 17, "width": 1}, {"from": "Fleur", "to": "Charlie", "value": 7, "width": 1}, {"from": "Fleur", "to": "Luna", "value": 36, "width": 1}, {"from": "Fleur", "to": "Xenophilius", "value": 11, "width": 1}, {"from": "Fleur", "to": "Dean", "value": 6, "width": 1}, {"from": "Fleur", "to": "Griphook", "value": 23, "width": 1}, {"from": "Fleur", "to": "Ted", "value": 4, "width": 1}, {"from": "Fred", "to": "Remus", "value": 5, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 16, "width": 1}, {"from": "Fred", "to": "Percy", "value": 39, "width": 1}, {"from": "Fred", "to": "Luna", "value": 6, "width": 1}, {"from": "Fred", "to": "Lee", "value": 3, "width": 1}, {"from": "Remus", "to": "Travers", "value": 5, "width": 1}, {"from": "Ted", "to": "Gornuk", "value": 4, "width": 1}, {"from": "Ted", "to": "Griphook", "value": 22, "width": 1}, {"from": "Ted", "to": "Dirk", "value": 31, "width": 1}, {"from": "Ted", "to": "Dean", "value": 10, "width": 1}, {"from": "Ginny", "to": "Luna", "value": 30, "width": 1}, {"from": "Ginny", "to": "Neville", "value": 46, "width": 1}, {"from": "Ginny", "to": "Griphook", "value": 5, "width": 1}, {"from": "Ginny", "to": "Cho", "value": 4, "width": 1}, {"from": "Ginny", "to": "Nagini", "value": 1, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 6, "width": 1}, {"from": "Ginny", "to": "Lily", "value": 2, "width": 1}, {"from": "Stan", "to": "Travers", "value": 4, "width": 1}, {"from": "Travers", "to": "Griphook", "value": 31, "width": 1}, {"from": "Travers", "to": "Xenophilius", "value": 5, "width": 1}, {"from": "Travers", "to": "Madam", "value": 5, "width": 1}, {"from": "Travers", "to": "Bogrod", "value": 12, "width": 1}, {"from": "Travers", "to": "Parvati", "value": 6, "width": 1}, {"from": "Arthur", "to": "Neville", "value": 5, "width": 1}, {"from": "Arthur", "to": "Percy", "value": 6, "width": 1}, {"from": "Sirius", "to": "Molly", "value": 3, "width": 1}, {"from": "Sirius", "to": "Lily", "value": 3, "width": 1}, {"from": "Godric", "to": "James", "value": 7, "width": 1}, {"from": "Godric", "to": "Dean", "value": 5, "width": 1}, {"from": "Godric", "to": "Gornuk", "value": 4, "width": 1}, {"from": "Godric", "to": "Peverell", "value": 5, "width": 1}, {"from": "Percy", "to": "Dirk", "value": 6, "width": 1}, {"from": "Percy", "to": "Goyle", "value": 5, "width": 1}, {"from": "Charlie", "to": "Norbert", "value": 16, "width": 1}, {"from": "Beedle", "to": "Luna", "value": 5, "width": 1}, {"from": "Luna", "to": "Xenophilius", "value": 45, "width": 1}, {"from": "Luna", "to": "Neville", "value": 41, "width": 1}, {"from": "Luna", "to": "Dean", "value": 88, "width": 1}, {"from": "Luna", "to": "Griphook", "value": 12, "width": 1}, {"from": "Luna", "to": "Dobby", "value": 26, "width": 1}, {"from": "Luna", "to": "Cho", "value": 17, "width": 1}, {"from": "Luna", "to": "Peeves", "value": 14, "width": 1}, {"from": "Luna", "to": "Alecto", "value": 7, "width": 1}, {"from": "Luna", "to": "Amycus", "value": 6, "width": 1}, {"from": "Luna", "to": "Minerva", "value": 3, "width": 1}, {"from": "Luna", "to": "Horace", "value": 4, "width": 1}, {"from": "Luna", "to": "Ernie", "value": 12, "width": 1}, {"from": "Xenophilius", "to": "Peverell", "value": 5, "width": 1}, {"from": "Bathilda", "to": "James", "value": 12, "width": 1}, {"from": "Bathilda", "to": "Gellert", "value": 9, "width": 1}, {"from": "James", "to": "Lily", "value": 22, "width": 1}, {"from": "James", "to": "Neville", "value": 6, "width": 1}, {"from": "James", "to": "Peeves", "value": 4, "width": 1}, {"from": "Nagini", "to": "Firenze", "value": 1, "width": 1}, {"from": "Nagini", "to": "Neville", "value": 4, "width": 1}, {"from": "Amycus", "to": "Goyle", "value": 5, "width": 1}, {"from": "Amycus", "to": "Alecto", "value": 7, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 5, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 4, "width": 1}, {"from": "Neville", "to": "Ernie", "value": 3, "width": 1}, {"from": "Neville", "to": "Dean", "value": 4, "width": 1}, {"from": "Mafalda", "to": "Albert", "value": 5, "width": 1}, {"from": "Albert", "to": "Dirk", "value": 5, "width": 1}, {"from": "Dirk", "to": "Dean", "value": 9, "width": 1}, {"from": "Dirk", "to": "Gornuk", "value": 18, "width": 1}, {"from": "Dirk", "to": "Griphook", "value": 12, "width": 1}, {"from": "Griphook", "to": "Gornuk", "value": 11, "width": 1}, {"from": "Griphook", "to": "Dean", "value": 18, "width": 1}, {"from": "Griphook", "to": "Dobby", "value": 12, "width": 1}, {"from": "Griphook", "to": "Madam", "value": 6, "width": 1}, {"from": "Griphook", "to": "Bogrod", "value": 29, "width": 1}, {"from": "Gornuk", "to": "Dean", "value": 11, "width": 1}, {"from": "Dean", "to": "Dobby", "value": 3, "width": 1}, {"from": "Dean", "to": "Parvati", "value": 12, "width": 1}, {"from": "Madam", "to": "Bogrod", "value": 6, "width": 1}, {"from": "Goyle", "to": "Colin", "value": 4, "width": 1}, {"from": "Padma", "to": "Terry", "value": 6, "width": 1}, {"from": "Terry", "to": "Cho", "value": 6, "width": 1}, {"from": "Alecto", "to": "Minerva", "value": 2, "width": 1}, {"from": "Minerva", "to": "Horace", "value": 3, "width": 1}, {"from": "Firenze", "to": "Grawp", "value": 6, "width": 1}, {"from": "Grawp", "to": "Buckbeak", "value": 6, "width": 1}, {"from": "Bane", "to": "Ronan", "value": 6, "width": 1}, {"from": "Ronan", "to": "Magorian", "value": 6, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "forceAtlas2Based": {
133
+ "avoidOverlap": 0,
134
+ "centralGravity": 0.01,
135
+ "damping": 0.4,
136
+ "gravitationalConstant": -50,
137
+ "springConstant": 0.08,
138
+ "springLength": 50
139
+ },
140
+ "solver": "forceAtlas2Based",
141
+ "stabilization": {
142
+ "enabled": true,
143
+ "fit": true,
144
+ "iterations": 1000,
145
+ "onlyDynamicEdges": false,
146
+ "updateInterval": 50
147
+ }
148
+ }
149
+ };
150
+
151
+
152
+
153
+
154
+
155
+ // if this network requires displaying the configure window,
156
+ // put it in its div
157
+ options.configure["container"] = document.getElementById("config");
158
+
159
+
160
+ network = new vis.Network(container, data, options);
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ return network;
172
+
173
+ }
174
+ drawGraph();
175
+ </script>
176
+ </body>
177
+ </html>
graphs/All Books Combined.html ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+ #loadingBar {
45
+ position:absolute;
46
+ top:0px;
47
+ left:0px;
48
+ width: 1500px;
49
+ height: 1000px;
50
+ background-color:rgba(200,200,200,0.8);
51
+ -webkit-transition: all 0.5s ease;
52
+ -moz-transition: all 0.5s ease;
53
+ -ms-transition: all 0.5s ease;
54
+ -o-transition: all 0.5s ease;
55
+ transition: all 0.5s ease;
56
+ opacity:1;
57
+ }
58
+
59
+ #bar {
60
+ position:absolute;
61
+ top:0px;
62
+ left:0px;
63
+ width:20px;
64
+ height:20px;
65
+ margin:auto auto auto auto;
66
+ border-radius:11px;
67
+ border:2px solid rgba(30,30,30,0.05);
68
+ background: rgb(0, 173, 246); /* Old browsers */
69
+ box-shadow: 2px 0px 4px rgba(0,0,0,0.4);
70
+ }
71
+
72
+ #border {
73
+ position:absolute;
74
+ top:10px;
75
+ left:10px;
76
+ width:500px;
77
+ height:23px;
78
+ margin:auto auto auto auto;
79
+ box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
80
+ border-radius:10px;
81
+ }
82
+
83
+ #text {
84
+ position:absolute;
85
+ top:8px;
86
+ left:530px;
87
+ width:30px;
88
+ height:50px;
89
+ margin:auto auto auto auto;
90
+ font-size:22px;
91
+ color: #000000;
92
+ }
93
+
94
+ div.outerBorder {
95
+ position:relative;
96
+ top:400px;
97
+ width:600px;
98
+ height:44px;
99
+ margin:auto auto auto auto;
100
+ border:8px solid rgba(0,0,0,0.1);
101
+ background: rgb(252,252,252); /* Old browsers */
102
+ background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */
103
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
104
+ background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
105
+ background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
106
+ background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */
107
+ background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */
108
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
109
+ border-radius:72px;
110
+ box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
111
+ }
112
+
113
+
114
+
115
+ #config {
116
+ float: left;
117
+ width: 400px;
118
+ height: 600px;
119
+ }
120
+
121
+
122
+
123
+ </style>
124
+ </head>
125
+
126
+
127
+ <body>
128
+ <div class="card" style="width: 100%">
129
+
130
+
131
+ <div id="mynetwork" class="card-body"></div>
132
+ </div>
133
+
134
+
135
+ <div id="loadingBar">
136
+ <div class="outerBorder">
137
+ <div id="text">0%</div>
138
+ <div id="border">
139
+ <div id="bar"></div>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+
145
+ <div id="config"></div>
146
+
147
+
148
+ <script type="text/javascript">
149
+
150
+ // initialize global variables.
151
+ var edges;
152
+ var nodes;
153
+ var allNodes;
154
+ var allEdges;
155
+ var nodeColors;
156
+ var originalNodes;
157
+ var network;
158
+ var container;
159
+ var options, data;
160
+ var filter = {
161
+ item : '',
162
+ property : '',
163
+ value : []
164
+ };
165
+
166
+
167
+
168
+
169
+
170
+ // This method is responsible for drawing the graph, returns the drawn network
171
+ function drawGraph() {
172
+ var container = document.getElementById('mynetwork');
173
+
174
+
175
+
176
+ // parsing and collecting nodes and edges from the python
177
+ nodes = new vis.DataSet([{"font": {"color": "white"}, "group": 4, "id": "Harry", "label": "Harry", "shape": "dot", "size": 140}, {"font": {"color": "white"}, "group": 1, "id": "Ron", "label": "Ron", "shape": "dot", "size": 97}, {"font": {"color": "white"}, "group": 2, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 86}, {"font": {"color": "white"}, "group": 3, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 79}, {"font": {"color": "white"}, "group": 7, "id": "Snape", "label": "Snape", "shape": "dot", "size": 58}, {"font": {"color": "white"}, "group": 5, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 56}, {"font": {"color": "white"}, "group": 2, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 51}, {"font": {"color": "white"}, "group": 7, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 48}, {"font": {"color": "white"}, "group": 4, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 21}, {"font": {"color": "white"}, "group": 0, "id": "Neville", "label": "Neville", "shape": "dot", "size": 42}, {"font": {"color": "white"}, "group": 1, "id": "Fred", "label": "Fred", "shape": "dot", "size": 41}, {"font": {"color": "white"}, "group": 7, "id": "Dobby", "label": "Dobby", "shape": "dot", "size": 23}, {"font": {"color": "white"}, "group": 1, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 44}, {"font": {"color": "white"}, "group": 2, "id": "Luna", "label": "Luna", "shape": "dot", "size": 36}, {"font": {"color": "white"}, "group": 1, "id": "Sirius", "label": "Sirius", "shape": "dot", "size": 32}, {"font": {"color": "white"}, "group": 1, "id": "Cho", "label": "Cho", "shape": "dot", "size": 25}, {"font": {"color": "white"}, "group": 2, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 1, "id": "Percy", "label": "Percy", "shape": "dot", "size": 32}, {"font": {"color": "white"}, "group": 3, "id": "Bill", "label": "Bill", "shape": "dot", "size": 30}, {"font": {"color": "white"}, "group": 7, "id": "Kreacher", "label": "Kreacher", "shape": "dot", "size": 15}, {"font": {"color": "white"}, "group": 3, "id": "Fleur", "label": "Fleur", "shape": "dot", "size": 26}, {"font": {"color": "white"}, "group": 7, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 3, "id": "Griphook", "label": "Griphook", "shape": "dot", "size": 22}, {"font": {"color": "white"}, "group": 3, "id": "Dean", "label": "Dean", "shape": "dot", "size": 24}, {"font": {"color": "white"}, "group": 2, "id": "Stan", "label": "Stan", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 7, "id": "Buckbeak", "label": "Buckbeak", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 7, "id": "Fang", "label": "Fang", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Bellatrix", "label": "Bellatrix", "shape": "dot", "size": 26}, {"font": {"color": "white"}, "group": 0, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 6, "id": "James", "label": "James", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 0, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 2, "id": "Kingsley", "label": "Kingsley", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 7, "id": "Myrtle", "label": "Myrtle", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 1, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 7, "id": "Ernie", "label": "Ernie", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 2, "id": "Cedric", "label": "Cedric", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Arthur", "label": "Arthur", "shape": "dot", "size": 17}, {"font": {"color": "white"}, "group": 7, "id": "Colin", "label": "Colin", "shape": "dot", "size": 14}, {"font": {"color": "white"}, "group": 1, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 1, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 18}, {"font": {"color": "white"}, "group": 3, "id": "Xenophilius", "label": "Xenophilius", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 6, "id": "Bathilda", "label": "Bathilda", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 6, "id": "Aberforth", "label": "Aberforth", "shape": "dot", "size": 16}, {"font": {"color": "white"}, "group": 6, "id": "Albus", "label": "Albus", "shape": "dot", "size": 19}, {"font": {"color": "white"}, "group": 7, "id": "Winky", "label": "Winky", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 5, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 1, "id": "Katie", "label": "Katie", "shape": "dot", "size": 15}, {"font": {"color": "white"}, "group": 7, "id": "Justin", "label": "Justin", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Aragog", "label": "Aragog", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 2, "id": "Rita", "label": "Rita", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 1, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Lee", "label": "Lee", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 5, "id": "Grawp", "label": "Grawp", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 2, "id": "Marietta", "label": "Marietta", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 7, "id": "Pansy", "label": "Pansy", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 1, "id": "Fawkes", "label": "Fawkes", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 5, "id": "Bane", "label": "Bane", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Marge", "label": "Marge", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Molly", "label": "Molly", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 0, "id": "Nagini", "label": "Nagini", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 2, "id": "Morfin", "label": "Morfin", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 6, "id": "Lily", "label": "Lily", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Alicia", "label": "Alicia", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 1, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Errol", "label": "Errol", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 4, "id": "Dedalus", "label": "Dedalus", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Marvolo", "label": "Marvolo", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Horace", "label": "Horace", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Godric", "label": "Godric", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Ted", "label": "Ted", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 6, "id": "Ariana", "label": "Ariana", "shape": "dot", "size": 13}, {"font": {"color": "white"}, "group": 3, "id": "Travers", "label": "Travers", "shape": "dot", "size": 11}, {"font": {"color": "white"}, "group": 1, "id": "Peter", "label": "Peter", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 3, "id": "Lucius", "label": "Lucius", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 4, "id": "Mafalda", "label": "Mafalda", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 0, "id": "Lavender", "label": "Lavender", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Mundungus", "label": "Mundungus", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 3, "id": "Bogrod", "label": "Bogrod", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 2, "id": "Fenrir", "label": "Fenrir", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Amycus", "label": "Amycus", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Pigwidgeon", "label": "Pigwidgeon", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Gabrielle", "label": "Gabrielle", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Zacharias", "label": "Zacharias", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Bertha", "label": "Bertha", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 5, "id": "Magorian", "label": "Magorian", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Merope", "label": "Merope", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Andromeda", "label": "Andromeda", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Remus", "label": "Remus", "shape": "dot", "size": 12}, {"font": {"color": "white"}, "group": 2, "id": "Minerva", "label": "Minerva", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 3, "id": "Peverell", "label": "Peverell", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Scabior", "label": "Scabior", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Crookshanks", "label": "Crookshanks", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 5, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 3, "id": "Dirk", "label": "Dirk", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 7, "id": "Crabbe", "label": "Crabbe", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 6, "id": "Elphias", "label": "Elphias", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Albert", "label": "Albert", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 7, "id": "Barty", "label": "Barty", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 1, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Amos", "label": "Amos", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 3, "id": "Madam", "label": "Madam", "shape": "dot", "size": 10}, {"font": {"color": "white"}, "group": 1, "id": "Gilderoy", "label": "Gilderoy", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Viktor", "label": "Viktor", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 3, "id": "Sturgis", "label": "Sturgis", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 5, "id": "Fluffy", "label": "Fluffy", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 1, "id": "Romilda", "label": "Romilda", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 3, "id": "Nymphadora", "label": "Nymphadora", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Hokey", "label": "Hokey", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 7, "id": "Blaise", "label": "Blaise", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 2, "id": "Phineas", "label": "Phineas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 2, "id": "Nicolas", "label": "Nicolas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Alice", "label": "Alice", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Beedle", "label": "Beedle", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Padma", "label": "Padma", "shape": "dot", "size": 8}, {"font": {"color": "white"}, "group": 4, "id": "Helena", "label": "Helena", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Cornelius", "label": "Cornelius", "shape": "dot", "size": 5}, {"font": {"color": "white"}, "group": 4, "id": "Salazar", "label": "Salazar", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 4, "id": "Wilhelmina", "label": "Wilhelmina", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 6, "id": "Percival", "label": "Percival", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 3, "id": "Gornuk", "label": "Gornuk", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 2, "id": "Alecto", "label": "Alecto", "shape": "dot", "size": 7}, {"font": {"color": "white"}, "group": 6, "id": "Kendra", "label": "Kendra", "shape": "dot", "size": 9}, {"font": {"color": "white"}, "group": 0, "id": "Frank", "label": "Frank", "shape": "dot", "size": 6}, {"font": {"color": "white"}, "group": 1, "id": "Penelope", "label": "Penelope", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 4, "id": "Terry", "label": "Terry", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 1, "id": "Anthony", "label": "Anthony", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Thomas", "label": "Thomas", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Susan", "label": "Susan", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 5, "id": "Olympe", "label": "Olympe", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 7, "id": "Narcissa", "label": "Narcissa", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Sybill", "label": "Sybill", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 2, "id": "Poppy", "label": "Poppy", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Argus", "label": "Argus", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Nott", "label": "Nott", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 3, "id": "Bob", "label": "Bob", "shape": "dot", "size": 3}, {"font": {"color": "white"}, "group": 4, "id": "Antonin", "label": "Antonin", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 0, "id": "Cormac", "label": "Cormac", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 4, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Alastor", "label": "Alastor", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 3, "id": "Millicent", "label": "Millicent", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 2, "id": "Pius", "label": "Pius", "shape": "dot", "size": 2}, {"font": {"color": "white"}, "group": 0, "id": "Augusta", "label": "Augusta", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 1, "id": "Ludo", "label": "Ludo", "shape": "dot", "size": 1}, {"font": {"color": "white"}, "group": 6, "id": "Gellert", "label": "Gellert", "shape": "dot", "size": 4}, {"font": {"color": "white"}, "group": 2, "id": "Dolores", "label": "Dolores", "shape": "dot", "size": 1}]);
178
+ edges = new vis.DataSet([{"from": "Harry", "to": "Ron", "value": 23613, "width": 1}, {"from": "Harry", "to": "Dumbledore", "value": 8360, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 5667, "width": 1}, {"from": "Harry", "to": "Snape", "value": 4733, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 4234, "width": 1}, {"from": "Harry", "to": "Voldemort", "value": 3772, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 2940, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 1937, "width": 1}, {"from": "Harry", "to": "Neville", "value": 1904, "width": 1}, {"from": "Harry", "to": "Fred", "value": 1904, "width": 1}, {"from": "Harry", "to": "Dobby", "value": 1280, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 1267, "width": 1}, {"from": "Harry", "to": "Luna", "value": 967, "width": 1}, {"from": "Harry", "to": "Sirius", "value": 922, "width": 1}, {"from": "Harry", "to": "Cho", "value": 789, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 755, "width": 1}, {"from": "Harry", "to": "Percy", "value": 748, "width": 1}, {"from": "Harry", "to": "Bill", "value": 625, "width": 1}, {"from": "Harry", "to": "Kreacher", "value": 597, "width": 1}, {"from": "Harry", "to": "Fleur", "value": 540, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 502, "width": 1}, {"from": "Harry", "to": "Griphook", "value": 470, "width": 1}, {"from": "Harry", "to": "Dean", "value": 420, "width": 1}, {"from": "Harry", "to": "Stan", "value": 349, "width": 1}, {"from": "Harry", "to": "Buckbeak", "value": 347, "width": 1}, {"from": "Harry", "to": "Fang", "value": 324, "width": 1}, {"from": "Harry", "to": "Bellatrix", "value": 315, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 314, "width": 1}, {"from": "Harry", "to": "James", "value": 310, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 280, "width": 1}, {"from": "Harry", "to": "Kingsley", "value": 264, "width": 1}, {"from": "Harry", "to": "Myrtle", "value": 264, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 263, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 253, "width": 1}, {"from": "Harry", "to": "Ernie", "value": 248, "width": 1}, {"from": "Harry", "to": "Cedric", "value": 244, "width": 1}, {"from": "Harry", "to": "Arthur", "value": 233, "width": 1}, {"from": "Harry", "to": "Colin", "value": 226, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 203, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 193, "width": 1}, {"from": "Harry", "to": "Xenophilius", "value": 192, "width": 1}, {"from": "Harry", "to": "Bathilda", "value": 166, "width": 1}, {"from": "Harry", "to": "Aberforth", "value": 149, "width": 1}, {"from": "Harry", "to": "Albus", "value": 147, "width": 1}, {"from": "Harry", "to": "Winky", "value": 146, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 144, "width": 1}, {"from": "Harry", "to": "Katie", "value": 142, "width": 1}, {"from": "Harry", "to": "Justin", "value": 134, "width": 1}, {"from": "Harry", "to": "Aragog", "value": 133, "width": 1}, {"from": "Harry", "to": "Rita", "value": 133, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 130, "width": 1}, {"from": "Harry", "to": "Lee", "value": 129, "width": 1}, {"from": "Harry", "to": "Grawp", "value": 124, "width": 1}, {"from": "Harry", "to": "Marietta", "value": 107, "width": 1}, {"from": "Harry", "to": "Pansy", "value": 88, "width": 1}, {"from": "Harry", "to": "Fawkes", "value": 84, "width": 1}, {"from": "Harry", "to": "Bane", "value": 80, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 80, "width": 1}, {"from": "Harry", "to": "Marge", "value": 79, "width": 1}, {"from": "Harry", "to": "Molly", "value": 74, "width": 1}, {"from": "Harry", "to": "Nagini", "value": 70, "width": 1}, {"from": "Harry", "to": "Morfin", "value": 63, "width": 1}, {"from": "Harry", "to": "Lily", "value": 60, "width": 1}, {"from": "Harry", "to": "Alicia", "value": 60, "width": 1}, {"from": "Harry", "to": "Norbert", "value": 59, "width": 1}, {"from": "Harry", "to": "Errol", "value": 58, "width": 1}, {"from": "Harry", "to": "Dedalus", "value": 58, "width": 1}, {"from": "Harry", "to": "Marvolo", "value": 54, "width": 1}, {"from": "Harry", "to": "Horace", "value": 48, "width": 1}, {"from": "Harry", "to": "Godric", "value": 47, "width": 1}, {"from": "Harry", "to": "Ted", "value": 47, "width": 1}, {"from": "Harry", "to": "Ariana", "value": 46, "width": 1}, {"from": "Harry", "to": "Travers", "value": 46, "width": 1}, {"from": "Harry", "to": "Peter", "value": 45, "width": 1}, {"from": "Harry", "to": "Lucius", "value": 44, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 44, "width": 1}, {"from": "Harry", "to": "Mafalda", "value": 41, "width": 1}, {"from": "Harry", "to": "Lavender", "value": 41, "width": 1}, {"from": "Harry", "to": "Trevor", "value": 38, "width": 1}, {"from": "Harry", "to": "Mundungus", "value": 36, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 35, "width": 1}, {"from": "Harry", "to": "Bogrod", "value": 34, "width": 1}, {"from": "Harry", "to": "Fenrir", "value": 34, "width": 1}, {"from": "Harry", "to": "Amycus", "value": 32, "width": 1}, {"from": "Harry", "to": "Pigwidgeon", "value": 31, "width": 1}, {"from": "Harry", "to": "Gabrielle", "value": 30, "width": 1}, {"from": "Harry", "to": "Zacharias", "value": 30, "width": 1}, {"from": "Harry", "to": "Bertha", "value": 29, "width": 1}, {"from": "Harry", "to": "Magorian", "value": 28, "width": 1}, {"from": "Harry", "to": "Merope", "value": 27, "width": 1}, {"from": "Harry", "to": "Andromeda", "value": 26, "width": 1}, {"from": "Harry", "to": "Remus", "value": 25, "width": 1}, {"from": "Harry", "to": "Minerva", "value": 25, "width": 1}, {"from": "Harry", "to": "Peverell", "value": 24, "width": 1}, {"from": "Harry", "to": "Scabior", "value": 22, "width": 1}, {"from": "Harry", "to": "Crookshanks", "value": 22, "width": 1}, {"from": "Harry", "to": "Ronan", "value": 21, "width": 1}, {"from": "Harry", "to": "Dirk", "value": 21, "width": 1}, {"from": "Harry", "to": "Crabbe", "value": 20, "width": 1}, {"from": "Harry", "to": "Elphias", "value": 20, "width": 1}, {"from": "Harry", "to": "Albert", "value": 19, "width": 1}, {"from": "Harry", "to": "Barty", "value": 19, "width": 1}, {"from": "Harry", "to": "Oliver", "value": 18, "width": 1}, {"from": "Harry", "to": "Amos", "value": 17, "width": 1}, {"from": "Harry", "to": "Madam", "value": 17, "width": 1}, {"from": "Harry", "to": "Gilderoy", "value": 16, "width": 1}, {"from": "Harry", "to": "Viktor", "value": 16, "width": 1}, {"from": "Harry", "to": "Sturgis", "value": 15, "width": 1}, {"from": "Harry", "to": "Fluffy", "value": 15, "width": 1}, {"from": "Harry", "to": "Romilda", "value": 14, "width": 1}, {"from": "Harry", "to": "Nymphadora", "value": 14, "width": 1}, {"from": "Harry", "to": "Hokey", "value": 13, "width": 1}, {"from": "Harry", "to": "Blaise", "value": 13, "width": 1}, {"from": "Harry", "to": "Phineas", "value": 12, "width": 1}, {"from": "Harry", "to": "Nicolas", "value": 12, "width": 1}, {"from": "Harry", "to": "Alice", "value": 11, "width": 1}, {"from": "Harry", "to": "Beedle", "value": 11, "width": 1}, {"from": "Harry", "to": "Padma", "value": 10, "width": 1}, {"from": "Harry", "to": "Helena", "value": 9, "width": 1}, {"from": "Harry", "to": "Cornelius", "value": 9, "width": 1}, {"from": "Harry", "to": "Salazar", "value": 7, "width": 1}, {"from": "Harry", "to": "Wilhelmina", "value": 7, "width": 1}, {"from": "Harry", "to": "Percival", "value": 6, "width": 1}, {"from": "Harry", "to": "Gornuk", "value": 6, "width": 1}, {"from": "Harry", "to": "Alecto", "value": 6, "width": 1}, {"from": "Harry", "to": "Kendra", "value": 6, "width": 1}, {"from": "Harry", "to": "Frank", "value": 6, "width": 1}, {"from": "Harry", "to": "Penelope", "value": 5, "width": 1}, {"from": "Harry", "to": "Terry", "value": 5, "width": 1}, {"from": "Harry", "to": "Anthony", "value": 5, "width": 1}, {"from": "Harry", "to": "Thomas", "value": 5, "width": 1}, {"from": "Harry", "to": "Susan", "value": 5, "width": 1}, {"from": "Harry", "to": "Olympe", "value": 4, "width": 1}, {"from": "Harry", "to": "Narcissa", "value": 4, "width": 1}, {"from": "Harry", "to": "Sybill", "value": 4, "width": 1}, {"from": "Harry", "to": "Poppy", "value": 3, "width": 1}, {"from": "Harry", "to": "Argus", "value": 3, "width": 1}, {"from": "Harry", "to": "Nott", "value": 2, "width": 1}, {"from": "Harry", "to": "Bob", "value": 1, "width": 1}, {"from": "Harry", "to": "Antonin", "value": 1, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 4895, "width": 1}, {"from": "Ron", "to": "Hagrid", "value": 1057, "width": 1}, {"from": "Ron", "to": "Fred", "value": 1035, "width": 1}, {"from": "Ron", "to": "Dumbledore", "value": 1007, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 962, "width": 1}, {"from": "Ron", "to": "Ginny", "value": 923, "width": 1}, {"from": "Ron", "to": "Snape", "value": 861, "width": 1}, {"from": "Ron", "to": "Neville", "value": 625, "width": 1}, {"from": "Ron", "to": "Percy", "value": 535, "width": 1}, {"from": "Ron", "to": "Voldemort", "value": 378, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 307, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 283, "width": 1}, {"from": "Ron", "to": "Bill", "value": 278, "width": 1}, {"from": "Ron", "to": "Dean", "value": 235, "width": 1}, {"from": "Ron", "to": "Hedwig", "value": 218, "width": 1}, {"from": "Ron", "to": "Luna", "value": 211, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 164, "width": 1}, {"from": "Ron", "to": "Angelina", "value": 162, "width": 1}, {"from": "Ron", "to": "Fleur", "value": 157, "width": 1}, {"from": "Ron", "to": "Sirius", "value": 153, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 146, "width": 1}, {"from": "Ron", "to": "Cho", "value": 134, "width": 1}, {"from": "Ron", "to": "Dobby", "value": 128, "width": 1}, {"from": "Ron", "to": "Katie", "value": 111, "width": 1}, {"from": "Ron", "to": "Myrtle", "value": 98, "width": 1}, {"from": "Ron", "to": "Fang", "value": 95, "width": 1}, {"from": "Ron", "to": "Bellatrix", "value": 92, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 90, "width": 1}, {"from": "Ron", "to": "Kreacher", "value": 89, "width": 1}, {"from": "Ron", "to": "Xenophilius", "value": 87, "width": 1}, {"from": "Ron", "to": "Ernie", "value": 86, "width": 1}, {"from": "Ron", "to": "Crookshanks", "value": 81, "width": 1}, {"from": "Ron", "to": "Griphook", "value": 78, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 63, "width": 1}, {"from": "Ron", "to": "Padma", "value": 58, "width": 1}, {"from": "Ron", "to": "Lavender", "value": 55, "width": 1}, {"from": "Ron", "to": "Dudley", "value": 54, "width": 1}, {"from": "Ron", "to": "Aragog", "value": 53, "width": 1}, {"from": "Ron", "to": "Lee", "value": 52, "width": 1}, {"from": "Ron", "to": "Travers", "value": 50, "width": 1}, {"from": "Ron", "to": "Buckbeak", "value": 46, "width": 1}, {"from": "Ron", "to": "Pigwidgeon", "value": 44, "width": 1}, {"from": "Ron", "to": "Winky", "value": 37, "width": 1}, {"from": "Ron", "to": "Alicia", "value": 34, "width": 1}, {"from": "Ron", "to": "Albus", "value": 34, "width": 1}, {"from": "Ron", "to": "Errol", "value": 32, "width": 1}, {"from": "Ron", "to": "Firenze", "value": 31, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 30, "width": 1}, {"from": "Ron", "to": "Arthur", "value": 28, "width": 1}, {"from": "Ron", "to": "Colin", "value": 26, "width": 1}, {"from": "Ron", "to": "Viktor", "value": 26, "width": 1}, {"from": "Ron", "to": "Stan", "value": 25, "width": 1}, {"from": "Ron", "to": "Aberforth", "value": 23, "width": 1}, {"from": "Ron", "to": "Justin", "value": 22, "width": 1}, {"from": "Ron", "to": "Rita", "value": 20, "width": 1}, {"from": "Ron", "to": "Crabbe", "value": 19, "width": 1}, {"from": "Ron", "to": "Bloody", "value": 19, "width": 1}, {"from": "Ron", "to": "Kingsley", "value": 18, "width": 1}, {"from": "Ron", "to": "Beedle", "value": 18, "width": 1}, {"from": "Ron", "to": "Bogrod", "value": 18, "width": 1}, {"from": "Ron", "to": "Grawp", "value": 16, "width": 1}, {"from": "Ron", "to": "Pansy", "value": 15, "width": 1}, {"from": "Ron", "to": "Zacharias", "value": 15, "width": 1}, {"from": "Ron", "to": "Amycus", "value": 14, "width": 1}, {"from": "Ron", "to": "Nagini", "value": 14, "width": 1}, {"from": "Ron", "to": "Scabior", "value": 14, "width": 1}, {"from": "Ron", "to": "Remus", "value": 14, "width": 1}, {"from": "Ron", "to": "Godric", "value": 14, "width": 1}, {"from": "Ron", "to": "Sturgis", "value": 13, "width": 1}, {"from": "Ron", "to": "Lily", "value": 12, "width": 1}, {"from": "Ron", "to": "Oliver", "value": 11, "width": 1}, {"from": "Ron", "to": "Petunia", "value": 11, "width": 1}, {"from": "Ron", "to": "Peter", "value": 10, "width": 1}, {"from": "Ron", "to": "Fluffy", "value": 9, "width": 1}, {"from": "Ron", "to": "Cedric", "value": 9, "width": 1}, {"from": "Ron", "to": "Peverell", "value": 9, "width": 1}, {"from": "Ron", "to": "Dirk", "value": 9, "width": 1}, {"from": "Ron", "to": "Hannah", "value": 8, "width": 1}, {"from": "Ron", "to": "Marietta", "value": 8, "width": 1}, {"from": "Ron", "to": "Fawkes", "value": 7, "width": 1}, {"from": "Ron", "to": "Mafalda", "value": 6, "width": 1}, {"from": "Ron", "to": "Madam", "value": 6, "width": 1}, {"from": "Ron", "to": "Lucius", "value": 6, "width": 1}, {"from": "Ron", "to": "Gilderoy", "value": 6, "width": 1}, {"from": "Ron", "to": "Cormac", "value": 6, "width": 1}, {"from": "Ron", "to": "James", "value": 5, "width": 1}, {"from": "Ron", "to": "Bathilda", "value": 5, "width": 1}, {"from": "Ron", "to": "Barty", "value": 5, "width": 1}, {"from": "Ron", "to": "Dennis", "value": 5, "width": 1}, {"from": "Ron", "to": "Romilda", "value": 4, "width": 1}, {"from": "Ron", "to": "Anthony", "value": 4, "width": 1}, {"from": "Ron", "to": "Nott", "value": 3, "width": 1}, {"from": "Ron", "to": "Mundungus", "value": 3, "width": 1}, {"from": "Ron", "to": "Gabrielle", "value": 3, "width": 1}, {"from": "Ron", "to": "Ariana", "value": 2, "width": 1}, {"from": "Ron", "to": "Alice", "value": 1, "width": 1}, {"from": "Dumbledore", "to": "Voldemort", "value": 1060, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 964, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 424, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 345, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 308, "width": 1}, {"from": "Dumbledore", "to": "Sirius", "value": 153, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 95, "width": 1}, {"from": "Dumbledore", "to": "Kreacher", "value": 91, "width": 1}, {"from": "Dumbledore", "to": "Albus", "value": 89, "width": 1}, {"from": "Dumbledore", "to": "Dobby", "value": 89, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 85, "width": 1}, {"from": "Dumbledore", "to": "Bill", "value": 84, "width": 1}, {"from": "Dumbledore", "to": "Bathilda", "value": 80, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 72, "width": 1}, {"from": "Dumbledore", "to": "Dudley", "value": 63, "width": 1}, {"from": "Dumbledore", "to": "Ginny", "value": 53, "width": 1}, {"from": "Dumbledore", "to": "Minerva", "value": 53, "width": 1}, {"from": "Dumbledore", "to": "Bellatrix", "value": 49, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 42, "width": 1}, {"from": "Dumbledore", "to": "Cornelius", "value": 42, "width": 1}, {"from": "Dumbledore", "to": "Arthur", "value": 42, "width": 1}, {"from": "Dumbledore", "to": "Ariana", "value": 41, "width": 1}, {"from": "Dumbledore", "to": "Phineas", "value": 40, "width": 1}, {"from": "Dumbledore", "to": "Morfin", "value": 38, "width": 1}, {"from": "Dumbledore", "to": "Marietta", "value": 37, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 37, "width": 1}, {"from": "Dumbledore", "to": "Kingsley", "value": 36, "width": 1}, {"from": "Dumbledore", "to": "Aberforth", "value": 36, "width": 1}, {"from": "Dumbledore", "to": "Winky", "value": 35, "width": 1}, {"from": "Dumbledore", "to": "Horace", "value": 34, "width": 1}, {"from": "Dumbledore", "to": "Buckbeak", "value": 32, "width": 1}, {"from": "Dumbledore", "to": "Merope", "value": 31, "width": 1}, {"from": "Dumbledore", "to": "Fawkes", "value": 30, "width": 1}, {"from": "Dumbledore", "to": "Rita", "value": 26, "width": 1}, {"from": "Dumbledore", "to": "Kendra", "value": 26, "width": 1}, {"from": "Dumbledore", "to": "Hedwig", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Amycus", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Bertha", "value": 24, "width": 1}, {"from": "Dumbledore", "to": "Katie", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Fleur", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Parvati", "value": 22, "width": 1}, {"from": "Dumbledore", "to": "Madam", "value": 21, "width": 1}, {"from": "Dumbledore", "to": "Hokey", "value": 19, "width": 1}, {"from": "Dumbledore", "to": "Fang", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Petunia", "value": 14, "width": 1}, {"from": "Dumbledore", "to": "Viktor", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Xenophilius", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Peeves", "value": 13, "width": 1}, {"from": "Dumbledore", "to": "Molly", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Lucius", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Barty", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Charlie", "value": 12, "width": 1}, {"from": "Dumbledore", "to": "Bob", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Luna", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Colin", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Lee", "value": 10, "width": 1}, {"from": "Dumbledore", "to": "Elphias", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Alastor", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Peverell", "value": 9, "width": 1}, {"from": "Dumbledore", "to": "Lavender", "value": 8, "width": 1}, {"from": "Dumbledore", "to": "Seamus", "value": 8, "width": 1}, {"from": "Dumbledore", "to": "Marvolo", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Alecto", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Sybill", "value": 7, "width": 1}, {"from": "Dumbledore", "to": "Poppy", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Vernon", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Percival", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fenrir", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Ernie", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Stan", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Angelina", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Bane", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Goyle", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Remus", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Frank", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Padma", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Beedle", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Nagini", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Dean", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Nicolas", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Cho", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Griphook", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Cedric", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Zacharias", "value": 4, "width": 1}, {"from": "Hermione", "to": "Hagrid", "value": 613, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 276, "width": 1}, {"from": "Hermione", "to": "Neville", "value": 267, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 229, "width": 1}, {"from": "Hermione", "to": "Ginny", "value": 211, "width": 1}, {"from": "Hermione", "to": "Fred", "value": 192, "width": 1}, {"from": "Hermione", "to": "Voldemort", "value": 140, "width": 1}, {"from": "Hermione", "to": "Luna", "value": 96, "width": 1}, {"from": "Hermione", "to": "Xenophilius", "value": 93, "width": 1}, {"from": "Hermione", "to": "Bill", "value": 80, "width": 1}, {"from": "Hermione", "to": "Sirius", "value": 74, "width": 1}, {"from": "Hermione", "to": "Kreacher", "value": 65, "width": 1}, {"from": "Hermione", "to": "Fleur", "value": 60, "width": 1}, {"from": "Hermione", "to": "Parvati", "value": 52, "width": 1}, {"from": "Hermione", "to": "Cho", "value": 50, "width": 1}, {"from": "Hermione", "to": "Bellatrix", "value": 48, "width": 1}, {"from": "Hermione", "to": "Buckbeak", "value": 46, "width": 1}, {"from": "Hermione", "to": "Bathilda", "value": 39, "width": 1}, {"from": "Hermione", "to": "Percy", "value": 38, "width": 1}, {"from": "Hermione", "to": "Hedwig", "value": 37, "width": 1}, {"from": "Hermione", "to": "Goyle", "value": 35, "width": 1}, {"from": "Hermione", "to": "Dobby", "value": 32, "width": 1}, {"from": "Hermione", "to": "Myrtle", "value": 32, "width": 1}, {"from": "Hermione", "to": "Firenze", "value": 32, "width": 1}, {"from": "Hermione", "to": "Dean", "value": 30, "width": 1}, {"from": "Hermione", "to": "Winky", "value": 28, "width": 1}, {"from": "Hermione", "to": "Scabbers", "value": 27, "width": 1}, {"from": "Hermione", "to": "Peeves", "value": 26, "width": 1}, {"from": "Hermione", "to": "Travers", "value": 25, "width": 1}, {"from": "Hermione", "to": "Grawp", "value": 24, "width": 1}, {"from": "Hermione", "to": "Ernie", "value": 23, "width": 1}, {"from": "Hermione", "to": "Griphook", "value": 22, "width": 1}, {"from": "Hermione", "to": "Errol", "value": 21, "width": 1}, {"from": "Hermione", "to": "Katie", "value": 20, "width": 1}, {"from": "Hermione", "to": "Seamus", "value": 18, "width": 1}, {"from": "Hermione", "to": "Kingsley", "value": 17, "width": 1}, {"from": "Hermione", "to": "Rita", "value": 17, "width": 1}, {"from": "Hermione", "to": "Lavender", "value": 16, "width": 1}, {"from": "Hermione", "to": "Ronan", "value": 16, "width": 1}, {"from": "Hermione", "to": "Godric", "value": 15, "width": 1}, {"from": "Hermione", "to": "Angelina", "value": 15, "width": 1}, {"from": "Hermione", "to": "Lee", "value": 14, "width": 1}, {"from": "Hermione", "to": "Aragog", "value": 14, "width": 1}, {"from": "Hermione", "to": "Fenrir", "value": 12, "width": 1}, {"from": "Hermione", "to": "Aberforth", "value": 12, "width": 1}, {"from": "Hermione", "to": "Mafalda", "value": 12, "width": 1}, {"from": "Hermione", "to": "Millicent", "value": 12, "width": 1}, {"from": "Hermione", "to": "Norbert", "value": 12, "width": 1}, {"from": "Hermione", "to": "James", "value": 12, "width": 1}, {"from": "Hermione", "to": "Padma", "value": 11, "width": 1}, {"from": "Hermione", "to": "Charlie", "value": 11, "width": 1}, {"from": "Hermione", "to": "Justin", "value": 10, "width": 1}, {"from": "Hermione", "to": "Viktor", "value": 10, "width": 1}, {"from": "Hermione", "to": "Crookshanks", "value": 9, "width": 1}, {"from": "Hermione", "to": "Nagini", "value": 8, "width": 1}, {"from": "Hermione", "to": "Cedric", "value": 8, "width": 1}, {"from": "Hermione", "to": "Fang", "value": 6, "width": 1}, {"from": "Hermione", "to": "Lily", "value": 6, "width": 1}, {"from": "Hermione", "to": "Gornuk", "value": 6, "width": 1}, {"from": "Hermione", "to": "Albus", "value": 6, "width": 1}, {"from": "Hermione", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hermione", "to": "Colin", "value": 6, "width": 1}, {"from": "Hermione", "to": "Madam", "value": 6, "width": 1}, {"from": "Hermione", "to": "Ariana", "value": 6, "width": 1}, {"from": "Hermione", "to": "Magorian", "value": 6, "width": 1}, {"from": "Hermione", "to": "Remus", "value": 5, "width": 1}, {"from": "Hermione", "to": "Bloody", "value": 5, "width": 1}, {"from": "Hermione", "to": "Bogrod", "value": 4, "width": 1}, {"from": "Hermione", "to": "Arthur", "value": 4, "width": 1}, {"from": "Hermione", "to": "Olympe", "value": 4, "width": 1}, {"from": "Hermione", "to": "Blaise", "value": 4, "width": 1}, {"from": "Hermione", "to": "Hannah", "value": 4, "width": 1}, {"from": "Hermione", "to": "Bane", "value": 4, "width": 1}, {"from": "Hermione", "to": "Minerva", "value": 3, "width": 1}, {"from": "Hermione", "to": "Peter", "value": 3, "width": 1}, {"from": "Hermione", "to": "Molly", "value": 3, "width": 1}, {"from": "Snape", "to": "Voldemort", "value": 439, "width": 1}, {"from": "Snape", "to": "Malfoy", "value": 433, "width": 1}, {"from": "Snape", "to": "Neville", "value": 185, "width": 1}, {"from": "Snape", "to": "James", "value": 166, "width": 1}, {"from": "Snape", "to": "Hagrid", "value": 135, "width": 1}, {"from": "Snape", "to": "Sirius", "value": 119, "width": 1}, {"from": "Snape", "to": "Bellatrix", "value": 113, "width": 1}, {"from": "Snape", "to": "Petunia", "value": 46, "width": 1}, {"from": "Snape", "to": "Cho", "value": 44, "width": 1}, {"from": "Snape", "to": "Lily", "value": 41, "width": 1}, {"from": "Snape", "to": "Luna", "value": 39, "width": 1}, {"from": "Snape", "to": "Goyle", "value": 32, "width": 1}, {"from": "Snape", "to": "Seamus", "value": 28, "width": 1}, {"from": "Snape", "to": "Winky", "value": 25, "width": 1}, {"from": "Snape", "to": "Lucius", "value": 24, "width": 1}, {"from": "Snape", "to": "Scabbers", "value": 24, "width": 1}, {"from": "Snape", "to": "Ginny", "value": 21, "width": 1}, {"from": "Snape", "to": "Parvati", "value": 17, "width": 1}, {"from": "Snape", "to": "Dirk", "value": 17, "width": 1}, {"from": "Snape", "to": "Trevor", "value": 15, "width": 1}, {"from": "Snape", "to": "Dobby", "value": 14, "width": 1}, {"from": "Snape", "to": "Fred", "value": 13, "width": 1}, {"from": "Snape", "to": "Percy", "value": 13, "width": 1}, {"from": "Snape", "to": "Mundungus", "value": 12, "width": 1}, {"from": "Snape", "to": "Minerva", "value": 12, "width": 1}, {"from": "Snape", "to": "Nymphadora", "value": 11, "width": 1}, {"from": "Snape", "to": "Kreacher", "value": 11, "width": 1}, {"from": "Snape", "to": "Dean", "value": 11, "width": 1}, {"from": "Snape", "to": "Pansy", "value": 11, "width": 1}, {"from": "Snape", "to": "Fang", "value": 11, "width": 1}, {"from": "Snape", "to": "Amycus", "value": 11, "width": 1}, {"from": "Snape", "to": "Fluffy", "value": 11, "width": 1}, {"from": "Snape", "to": "Justin", "value": 10, "width": 1}, {"from": "Snape", "to": "Dudley", "value": 10, "width": 1}, {"from": "Snape", "to": "Colin", "value": 10, "width": 1}, {"from": "Snape", "to": "Nagini", "value": 9, "width": 1}, {"from": "Snape", "to": "Fleur", "value": 9, "width": 1}, {"from": "Snape", "to": "Ted", "value": 9, "width": 1}, {"from": "Snape", "to": "Peeves", "value": 7, "width": 1}, {"from": "Snape", "to": "Alecto", "value": 6, "width": 1}, {"from": "Snape", "to": "Albus", "value": 6, "width": 1}, {"from": "Snape", "to": "Narcissa", "value": 6, "width": 1}, {"from": "Snape", "to": "Hedwig", "value": 5, "width": 1}, {"from": "Snape", "to": "Barty", "value": 5, "width": 1}, {"from": "Snape", "to": "Marvolo", "value": 4, "width": 1}, {"from": "Snape", "to": "Marietta", "value": 4, "width": 1}, {"from": "Snape", "to": "Griphook", "value": 3, "width": 1}, {"from": "Snape", "to": "Aberforth", "value": 3, "width": 1}, {"from": "Snape", "to": "Bill", "value": 3, "width": 1}, {"from": "Snape", "to": "Katie", "value": 2, "width": 1}, {"from": "Snape", "to": "Crabbe", "value": 2, "width": 1}, {"from": "Snape", "to": "Pius", "value": 1, "width": 1}, {"from": "Snape", "to": "Ernie", "value": 1, "width": 1}, {"from": "Snape", "to": "Buckbeak", "value": 1, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 236, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 232, "width": 1}, {"from": "Hagrid", "to": "Buckbeak", "value": 125, "width": 1}, {"from": "Hagrid", "to": "Aragog", "value": 95, "width": 1}, {"from": "Hagrid", "to": "Voldemort", "value": 88, "width": 1}, {"from": "Hagrid", "to": "Ronan", "value": 64, "width": 1}, {"from": "Hagrid", "to": "Grawp", "value": 60, "width": 1}, {"from": "Hagrid", "to": "Hedwig", "value": 54, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 50, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 47, "width": 1}, {"from": "Hagrid", "to": "Firenze", "value": 46, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 44, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 43, "width": 1}, {"from": "Hagrid", "to": "Sirius", "value": 42, "width": 1}, {"from": "Hagrid", "to": "Fred", "value": 42, "width": 1}, {"from": "Hagrid", "to": "Fleur", "value": 35, "width": 1}, {"from": "Hagrid", "to": "Parvati", "value": 34, "width": 1}, {"from": "Hagrid", "to": "Magorian", "value": 32, "width": 1}, {"from": "Hagrid", "to": "Pansy", "value": 24, "width": 1}, {"from": "Hagrid", "to": "Dudley", "value": 23, "width": 1}, {"from": "Hagrid", "to": "Bane", "value": 22, "width": 1}, {"from": "Hagrid", "to": "Bill", "value": 21, "width": 1}, {"from": "Hagrid", "to": "Lee", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Kingsley", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Ginny", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Dean", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Percy", "value": 16, "width": 1}, {"from": "Hagrid", "to": "Rita", "value": 15, "width": 1}, {"from": "Hagrid", "to": "Winky", "value": 14, "width": 1}, {"from": "Hagrid", "to": "Seamus", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Katie", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Luna", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Olympe", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Justin", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Dobby", "value": 10, "width": 1}, {"from": "Hagrid", "to": "Ernie", "value": 9, "width": 1}, {"from": "Hagrid", "to": "Madam", "value": 9, "width": 1}, {"from": "Hagrid", "to": "James", "value": 7, "width": 1}, {"from": "Hagrid", "to": "Kreacher", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Cornelius", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Penelope", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Errol", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Molly", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Petunia", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Peeves", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Bellatrix", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Griphook", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Remus", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Angelina", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Alastor", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Bellatrix", "value": 107, "width": 1}, {"from": "Voldemort", "to": "Malfoy", "value": 76, "width": 1}, {"from": "Voldemort", "to": "Neville", "value": 68, "width": 1}, {"from": "Voldemort", "to": "Sirius", "value": 65, "width": 1}, {"from": "Voldemort", "to": "Lucius", "value": 51, "width": 1}, {"from": "Voldemort", "to": "Ginny", "value": 43, "width": 1}, {"from": "Voldemort", "to": "Cedric", "value": 42, "width": 1}, {"from": "Voldemort", "to": "Morfin", "value": 36, "width": 1}, {"from": "Voldemort", "to": "Kreacher", "value": 34, "width": 1}, {"from": "Voldemort", "to": "Nagini", "value": 33, "width": 1}, {"from": "Voldemort", "to": "Hokey", "value": 26, "width": 1}, {"from": "Voldemort", "to": "Luna", "value": 21, "width": 1}, {"from": "Voldemort", "to": "Percy", "value": 20, "width": 1}, {"from": "Voldemort", "to": "Peter", "value": 19, "width": 1}, {"from": "Voldemort", "to": "Sybill", "value": 18, "width": 1}, {"from": "Voldemort", "to": "Griphook", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 15, "width": 1}, {"from": "Voldemort", "to": "Fleur", "value": 14, "width": 1}, {"from": "Voldemort", "to": "Arthur", "value": 13, "width": 1}, {"from": "Voldemort", "to": "Godric", "value": 12, "width": 1}, {"from": "Voldemort", "to": "Kingsley", "value": 12, "width": 1}, {"from": "Voldemort", "to": "Bill", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Buckbeak", "value": 11, "width": 1}, {"from": "Voldemort", "to": "Horace", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Lily", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Dobby", "value": 10, "width": 1}, {"from": "Voldemort", "to": "Bane", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Merope", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Dudley", "value": 7, "width": 1}, {"from": "Voldemort", "to": "Hedwig", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Pius", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Cornelius", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Minerva", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Albus", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Seamus", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Rita", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Petunia", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Frank", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Stan", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Aberforth", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Sturgis", "value": 3, "width": 1}, {"from": "Voldemort", "to": "James", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Grawp", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Bathilda", "value": 3, "width": 1}, {"from": "Voldemort", "to": "Xenophilius", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 396, "width": 1}, {"from": "Malfoy", "to": "Neville", "value": 132, "width": 1}, {"from": "Malfoy", "to": "Ginny", "value": 80, "width": 1}, {"from": "Malfoy", "to": "Pansy", "value": 70, "width": 1}, {"from": "Malfoy", "to": "Dobby", "value": 66, "width": 1}, {"from": "Malfoy", "to": "Fred", "value": 63, "width": 1}, {"from": "Malfoy", "to": "Ernie", "value": 56, "width": 1}, {"from": "Malfoy", "to": "Buckbeak", "value": 33, "width": 1}, {"from": "Malfoy", "to": "Katie", "value": 32, "width": 1}, {"from": "Malfoy", "to": "Norbert", "value": 26, "width": 1}, {"from": "Malfoy", "to": "Angelina", "value": 23, "width": 1}, {"from": "Malfoy", "to": "Kreacher", "value": 22, "width": 1}, {"from": "Malfoy", "to": "Fang", "value": 18, "width": 1}, {"from": "Malfoy", "to": "Bellatrix", "value": 17, "width": 1}, {"from": "Malfoy", "to": "Lucius", "value": 16, "width": 1}, {"from": "Malfoy", "to": "Lee", "value": 15, "width": 1}, {"from": "Malfoy", "to": "Sturgis", "value": 15, "width": 1}, {"from": "Malfoy", "to": "Alicia", "value": 14, "width": 1}, {"from": "Malfoy", "to": "Arthur", "value": 12, "width": 1}, {"from": "Malfoy", "to": "Luna", "value": 9, "width": 1}, {"from": "Malfoy", "to": "Cho", "value": 9, "width": 1}, {"from": "Malfoy", "to": "Seamus", "value": 9, "width": 1}, {"from": "Malfoy", "to": "Parvati", "value": 8, "width": 1}, {"from": "Malfoy", "to": "Crookshanks", "value": 8, "width": 1}, {"from": "Malfoy", "to": "Scabior", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Pigwidgeon", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Charlie", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Myrtle", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Malfoy", "to": "Dudley", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Colin", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Percy", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Justin", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Griphook", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Blaise", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Rita", "value": 5, "width": 1}, {"from": "Malfoy", "to": "Marietta", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Albus", "value": 4, "width": 1}, {"from": "Malfoy", "to": "Sirius", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Bill", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Nott", "value": 2, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 149, "width": 1}, {"from": "Dudley", "to": "Vernon", "value": 26, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 21, "width": 1}, {"from": "Dudley", "to": "Dennis", "value": 11, "width": 1}, {"from": "Dudley", "to": "Hedwig", "value": 11, "width": 1}, {"from": "Dudley", "to": "Dedalus", "value": 10, "width": 1}, {"from": "Dudley", "to": "Fred", "value": 6, "width": 1}, {"from": "Dudley", "to": "Kreacher", "value": 6, "width": 1}, {"from": "Dudley", "to": "Dobby", "value": 5, "width": 1}, {"from": "Dudley", "to": "Scabior", "value": 5, "width": 1}, {"from": "Dudley", "to": "Bill", "value": 5, "width": 1}, {"from": "Dudley", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dudley", "to": "Albus", "value": 3, "width": 1}, {"from": "Dudley", "to": "Sirius", "value": 2, "width": 1}, {"from": "Neville", "to": "Ginny", "value": 222, "width": 1}, {"from": "Neville", "to": "Luna", "value": 168, "width": 1}, {"from": "Neville", "to": "Dean", "value": 123, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 80, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 49, "width": 1}, {"from": "Neville", "to": "Bellatrix", "value": 45, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 30, "width": 1}, {"from": "Neville", "to": "Parvati", "value": 28, "width": 1}, {"from": "Neville", "to": "Hedwig", "value": 18, "width": 1}, {"from": "Neville", "to": "Fang", "value": 16, "width": 1}, {"from": "Neville", "to": "Cho", "value": 15, "width": 1}, {"from": "Neville", "to": "Fred", "value": 14, "width": 1}, {"from": "Neville", "to": "Percy", "value": 13, "width": 1}, {"from": "Neville", "to": "Stan", "value": 11, "width": 1}, {"from": "Neville", "to": "Alice", "value": 9, "width": 1}, {"from": "Neville", "to": "Ariana", "value": 8, "width": 1}, {"from": "Neville", "to": "Aberforth", "value": 8, "width": 1}, {"from": "Neville", "to": "Bill", "value": 6, "width": 1}, {"from": "Neville", "to": "Bloody", "value": 6, "width": 1}, {"from": "Neville", "to": "James", "value": 6, "width": 1}, {"from": "Neville", "to": "Justin", "value": 6, "width": 1}, {"from": "Neville", "to": "Frank", "value": 6, "width": 1}, {"from": "Neville", "to": "Lavender", "value": 6, "width": 1}, {"from": "Neville", "to": "Augusta", "value": 6, "width": 1}, {"from": "Neville", "to": "Norbert", "value": 5, "width": 1}, {"from": "Neville", "to": "Errol", "value": 5, "width": 1}, {"from": "Neville", "to": "Pansy", "value": 5, "width": 1}, {"from": "Neville", "to": "Arthur", "value": 5, "width": 1}, {"from": "Neville", "to": "Alecto", "value": 4, "width": 1}, {"from": "Neville", "to": "Alicia", "value": 4, "width": 1}, {"from": "Neville", "to": "Dennis", "value": 4, "width": 1}, {"from": "Neville", "to": "Nagini", "value": 4, "width": 1}, {"from": "Neville", "to": "Ernie", "value": 3, "width": 1}, {"from": "Neville", "to": "Buckbeak", "value": 2, "width": 1}, {"from": "Fred", "to": "Percy", "value": 240, "width": 1}, {"from": "Fred", "to": "Ginny", "value": 163, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 81, "width": 1}, {"from": "Fred", "to": "Lee", "value": 59, "width": 1}, {"from": "Fred", "to": "Bill", "value": 46, "width": 1}, {"from": "Fred", "to": "Fleur", "value": 45, "width": 1}, {"from": "Fred", "to": "Katie", "value": 41, "width": 1}, {"from": "Fred", "to": "Alicia", "value": 40, "width": 1}, {"from": "Fred", "to": "Charlie", "value": 35, "width": 1}, {"from": "Fred", "to": "Sirius", "value": 33, "width": 1}, {"from": "Fred", "to": "Arthur", "value": 23, "width": 1}, {"from": "Fred", "to": "Oliver", "value": 22, "width": 1}, {"from": "Fred", "to": "Kingsley", "value": 21, "width": 1}, {"from": "Fred", "to": "Hedwig", "value": 20, "width": 1}, {"from": "Fred", "to": "Luna", "value": 18, "width": 1}, {"from": "Fred", "to": "Petunia", "value": 16, "width": 1}, {"from": "Fred", "to": "Peeves", "value": 13, "width": 1}, {"from": "Fred", "to": "Colin", "value": 10, "width": 1}, {"from": "Fred", "to": "Zacharias", "value": 9, "width": 1}, {"from": "Fred", "to": "Molly", "value": 9, "width": 1}, {"from": "Fred", "to": "Goyle", "value": 9, "width": 1}, {"from": "Fred", "to": "Kreacher", "value": 8, "width": 1}, {"from": "Fred", "to": "Cedric", "value": 5, "width": 1}, {"from": "Fred", "to": "Dobby", "value": 5, "width": 1}, {"from": "Fred", "to": "Barty", "value": 5, "width": 1}, {"from": "Fred", "to": "Remus", "value": 5, "width": 1}, {"from": "Fred", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Fred", "to": "Dean", "value": 4, "width": 1}, {"from": "Fred", "to": "Cho", "value": 4, "width": 1}, {"from": "Fred", "to": "Crookshanks", "value": 4, "width": 1}, {"from": "Fred", "to": "Sturgis", "value": 1, "width": 1}, {"from": "Fred", "to": "Bertha", "value": 1, "width": 1}, {"from": "Dobby", "to": "Winky", "value": 170, "width": 1}, {"from": "Dobby", "to": "Kreacher", "value": 88, "width": 1}, {"from": "Dobby", "to": "Luna", "value": 31, "width": 1}, {"from": "Dobby", "to": "Bill", "value": 22, "width": 1}, {"from": "Dobby", "to": "Hedwig", "value": 19, "width": 1}, {"from": "Dobby", "to": "Griphook", "value": 12, "width": 1}, {"from": "Dobby", "to": "Bellatrix", "value": 9, "width": 1}, {"from": "Dobby", "to": "Colin", "value": 6, "width": 1}, {"from": "Dobby", "to": "Aberforth", "value": 6, "width": 1}, {"from": "Dobby", "to": "Ginny", "value": 5, "width": 1}, {"from": "Dobby", "to": "Petunia", "value": 4, "width": 1}, {"from": "Dobby", "to": "Cho", "value": 3, "width": 1}, {"from": "Dobby", "to": "Dean", "value": 3, "width": 1}, {"from": "Ginny", "to": "Luna", "value": 141, "width": 1}, {"from": "Ginny", "to": "Dean", "value": 64, "width": 1}, {"from": "Ginny", "to": "Bill", "value": 59, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 48, "width": 1}, {"from": "Ginny", "to": "Fleur", "value": 42, "width": 1}, {"from": "Ginny", "to": "Charlie", "value": 18, "width": 1}, {"from": "Ginny", "to": "Albus", "value": 16, "width": 1}, {"from": "Ginny", "to": "Angelina", "value": 13, "width": 1}, {"from": "Ginny", "to": "Arthur", "value": 12, "width": 1}, {"from": "Ginny", "to": "Aberforth", "value": 11, "width": 1}, {"from": "Ginny", "to": "Gabrielle", "value": 10, "width": 1}, {"from": "Ginny", "to": "Katie", "value": 10, "width": 1}, {"from": "Ginny", "to": "Zacharias", "value": 10, "width": 1}, {"from": "Ginny", "to": "Blaise", "value": 9, "width": 1}, {"from": "Ginny", "to": "Sirius", "value": 8, "width": 1}, {"from": "Ginny", "to": "Cho", "value": 8, "width": 1}, {"from": "Ginny", "to": "Molly", "value": 7, "width": 1}, {"from": "Ginny", "to": "Kingsley", "value": 6, "width": 1}, {"from": "Ginny", "to": "Scabbers", "value": 6, "width": 1}, {"from": "Ginny", "to": "Griphook", "value": 5, "width": 1}, {"from": "Ginny", "to": "Ludo", "value": 5, "width": 1}, {"from": "Ginny", "to": "Gilderoy", "value": 5, "width": 1}, {"from": "Ginny", "to": "Kreacher", "value": 5, "width": 1}, {"from": "Ginny", "to": "Myrtle", "value": 5, "width": 1}, {"from": "Ginny", "to": "Bellatrix", "value": 5, "width": 1}, {"from": "Ginny", "to": "Grawp", "value": 5, "width": 1}, {"from": "Ginny", "to": "Fawkes", "value": 4, "width": 1}, {"from": "Ginny", "to": "Hannah", "value": 3, "width": 1}, {"from": "Ginny", "to": "Alicia", "value": 3, "width": 1}, {"from": "Ginny", "to": "Lily", "value": 2, "width": 1}, {"from": "Ginny", "to": "Peeves", "value": 1, "width": 1}, {"from": "Ginny", "to": "Nagini", "value": 1, "width": 1}, {"from": "Luna", "to": "Dean", "value": 88, "width": 1}, {"from": "Luna", "to": "Xenophilius", "value": 45, "width": 1}, {"from": "Luna", "to": "Fleur", "value": 36, "width": 1}, {"from": "Luna", "to": "Bill", "value": 25, "width": 1}, {"from": "Luna", "to": "Cho", "value": 22, "width": 1}, {"from": "Luna", "to": "Parvati", "value": 17, "width": 1}, {"from": "Luna", "to": "Bellatrix", "value": 16, "width": 1}, {"from": "Luna", "to": "Angelina", "value": 14, "width": 1}, {"from": "Luna", "to": "Peeves", "value": 14, "width": 1}, {"from": "Luna", "to": "Sirius", "value": 13, "width": 1}, {"from": "Luna", "to": "Ernie", "value": 12, "width": 1}, {"from": "Luna", "to": "Griphook", "value": 12, "width": 1}, {"from": "Luna", "to": "Rita", "value": 9, "width": 1}, {"from": "Luna", "to": "Alecto", "value": 7, "width": 1}, {"from": "Luna", "to": "Amycus", "value": 6, "width": 1}, {"from": "Luna", "to": "Kingsley", "value": 6, "width": 1}, {"from": "Luna", "to": "Pigwidgeon", "value": 6, "width": 1}, {"from": "Luna", "to": "Firenze", "value": 6, "width": 1}, {"from": "Luna", "to": "Trevor", "value": 6, "width": 1}, {"from": "Luna", "to": "Beedle", "value": 5, "width": 1}, {"from": "Luna", "to": "Hedwig", "value": 5, "width": 1}, {"from": "Luna", "to": "Grawp", "value": 4, "width": 1}, {"from": "Luna", "to": "Horace", "value": 4, "width": 1}, {"from": "Luna", "to": "Minerva", "value": 3, "width": 1}, {"from": "Sirius", "to": "Kreacher", "value": 45, "width": 1}, {"from": "Sirius", "to": "Hedwig", "value": 38, "width": 1}, {"from": "Sirius", "to": "James", "value": 27, "width": 1}, {"from": "Sirius", "to": "Bellatrix", "value": 22, "width": 1}, {"from": "Sirius", "to": "Kingsley", "value": 19, "width": 1}, {"from": "Sirius", "to": "Buckbeak", "value": 18, "width": 1}, {"from": "Sirius", "to": "Percy", "value": 16, "width": 1}, {"from": "Sirius", "to": "Molly", "value": 13, "width": 1}, {"from": "Sirius", "to": "Cho", "value": 10, "width": 1}, {"from": "Sirius", "to": "Peeves", "value": 8, "width": 1}, {"from": "Sirius", "to": "Alastor", "value": 7, "width": 1}, {"from": "Sirius", "to": "Lee", "value": 6, "width": 1}, {"from": "Sirius", "to": "Aberforth", "value": 6, "width": 1}, {"from": "Sirius", "to": "Madam", "value": 6, "width": 1}, {"from": "Sirius", "to": "Bill", "value": 6, "width": 1}, {"from": "Sirius", "to": "Crookshanks", "value": 6, "width": 1}, {"from": "Sirius", "to": "Penelope", "value": 5, "width": 1}, {"from": "Sirius", "to": "Lily", "value": 3, "width": 1}, {"from": "Sirius", "to": "Peter", "value": 3, "width": 1}, {"from": "Sirius", "to": "Arthur", "value": 1, "width": 1}, {"from": "Cho", "to": "Marietta", "value": 37, "width": 1}, {"from": "Cho", "to": "Angelina", "value": 8, "width": 1}, {"from": "Cho", "to": "Terry", "value": 6, "width": 1}, {"from": "Cho", "to": "Rita", "value": 6, "width": 1}, {"from": "Cho", "to": "Katie", "value": 5, "width": 1}, {"from": "Cho", "to": "Colin", "value": 5, "width": 1}, {"from": "Cho", "to": "Parvati", "value": 5, "width": 1}, {"from": "Cho", "to": "Cedric", "value": 5, "width": 1}, {"from": "Cho", "to": "Fleur", "value": 5, "width": 1}, {"from": "Cho", "to": "Zacharias", "value": 5, "width": 1}, {"from": "Cho", "to": "Lee", "value": 4, "width": 1}, {"from": "Cho", "to": "Percy", "value": 3, "width": 1}, {"from": "Cho", "to": "Seamus", "value": 1, "width": 1}, {"from": "Hedwig", "to": "Stan", "value": 19, "width": 1}, {"from": "Hedwig", "to": "Errol", "value": 15, "width": 1}, {"from": "Hedwig", "to": "Cedric", "value": 6, "width": 1}, {"from": "Hedwig", "to": "Buckbeak", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Pigwidgeon", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Alastor", "value": 1, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 96, "width": 1}, {"from": "Percy", "to": "Bill", "value": 62, "width": 1}, {"from": "Percy", "to": "Fleur", "value": 21, "width": 1}, {"from": "Percy", "to": "Scabbers", "value": 13, "width": 1}, {"from": "Percy", "to": "Barty", "value": 12, "width": 1}, {"from": "Percy", "to": "Bertha", "value": 12, "width": 1}, {"from": "Percy", "to": "Aberforth", "value": 10, "width": 1}, {"from": "Percy", "to": "Bloody", "value": 10, "width": 1}, {"from": "Percy", "to": "Goyle", "value": 10, "width": 1}, {"from": "Percy", "to": "Dirk", "value": 6, "width": 1}, {"from": "Percy", "to": "Padma", "value": 6, "width": 1}, {"from": "Percy", "to": "Peeves", "value": 6, "width": 1}, {"from": "Percy", "to": "Arthur", "value": 6, "width": 1}, {"from": "Percy", "to": "Lucius", "value": 6, "width": 1}, {"from": "Percy", "to": "Myrtle", "value": 4, "width": 1}, {"from": "Percy", "to": "Rita", "value": 4, "width": 1}, {"from": "Percy", "to": "Penelope", "value": 4, "width": 1}, {"from": "Percy", "to": "Gabrielle", "value": 3, "width": 1}, {"from": "Percy", "to": "Errol", "value": 3, "width": 1}, {"from": "Bill", "to": "Fleur", "value": 414, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 189, "width": 1}, {"from": "Bill", "to": "Griphook", "value": 37, "width": 1}, {"from": "Bill", "to": "Kingsley", "value": 36, "width": 1}, {"from": "Bill", "to": "Molly", "value": 15, "width": 1}, {"from": "Bill", "to": "Xenophilius", "value": 6, "width": 1}, {"from": "Bill", "to": "Rita", "value": 6, "width": 1}, {"from": "Bill", "to": "Arthur", "value": 6, "width": 1}, {"from": "Bill", "to": "Nymphadora", "value": 6, "width": 1}, {"from": "Bill", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Bill", "to": "Andromeda", "value": 5, "width": 1}, {"from": "Bill", "to": "Dean", "value": 5, "width": 1}, {"from": "Bill", "to": "Dirk", "value": 4, "width": 1}, {"from": "Bill", "to": "Ted", "value": 2, "width": 1}, {"from": "Kreacher", "to": "Bellatrix", "value": 10, "width": 1}, {"from": "Kreacher", "to": "Buckbeak", "value": 4, "width": 1}, {"from": "Fleur", "to": "Gabrielle", "value": 41, "width": 1}, {"from": "Fleur", "to": "Kingsley", "value": 24, "width": 1}, {"from": "Fleur", "to": "Griphook", "value": 23, "width": 1}, {"from": "Fleur", "to": "Xenophilius", "value": 11, "width": 1}, {"from": "Fleur", "to": "Cedric", "value": 11, "width": 1}, {"from": "Fleur", "to": "Remus", "value": 9, "width": 1}, {"from": "Fleur", "to": "Charlie", "value": 7, "width": 1}, {"from": "Fleur", "to": "Viktor", "value": 6, "width": 1}, {"from": "Fleur", "to": "Bellatrix", "value": 6, "width": 1}, {"from": "Fleur", "to": "Dean", "value": 6, "width": 1}, {"from": "Fleur", "to": "Arthur", "value": 6, "width": 1}, {"from": "Fleur", "to": "Ted", "value": 4, "width": 1}, {"from": "Fleur", "to": "Padma", "value": 4, "width": 1}, {"from": "Goyle", "to": "Crabbe", "value": 14, "width": 1}, {"from": "Goyle", "to": "Pansy", "value": 10, "width": 1}, {"from": "Goyle", "to": "Buckbeak", "value": 6, "width": 1}, {"from": "Goyle", "to": "Amycus", "value": 5, "width": 1}, {"from": "Goyle", "to": "Dean", "value": 5, "width": 1}, {"from": "Goyle", "to": "Myrtle", "value": 4, "width": 1}, {"from": "Goyle", "to": "Ernie", "value": 4, "width": 1}, {"from": "Goyle", "to": "Colin", "value": 4, "width": 1}, {"from": "Griphook", "to": "Bellatrix", "value": 44, "width": 1}, {"from": "Griphook", "to": "Travers", "value": 31, "width": 1}, {"from": "Griphook", "to": "Bogrod", "value": 29, "width": 1}, {"from": "Griphook", "to": "Ted", "value": 22, "width": 1}, {"from": "Griphook", "to": "Dean", "value": 18, "width": 1}, {"from": "Griphook", "to": "Dirk", "value": 12, "width": 1}, {"from": "Griphook", "to": "Gornuk", "value": 11, "width": 1}, {"from": "Griphook", "to": "Madam", "value": 6, "width": 1}, {"from": "Griphook", "to": "Lucius", "value": 5, "width": 1}, {"from": "Dean", "to": "Seamus", "value": 239, "width": 1}, {"from": "Dean", "to": "Parvati", "value": 40, "width": 1}, {"from": "Dean", "to": "Gornuk", "value": 11, "width": 1}, {"from": "Dean", "to": "Ted", "value": 10, "width": 1}, {"from": "Dean", "to": "Dirk", "value": 9, "width": 1}, {"from": "Dean", "to": "Godric", "value": 5, "width": 1}, {"from": "Dean", "to": "Lavender", "value": 5, "width": 1}, {"from": "Dean", "to": "Katie", "value": 5, "width": 1}, {"from": "Dean", "to": "Firenze", "value": 4, "width": 1}, {"from": "Stan", "to": "Ernie", "value": 25, "width": 1}, {"from": "Stan", "to": "Kingsley", "value": 5, "width": 1}, {"from": "Stan", "to": "Travers", "value": 4, "width": 1}, {"from": "Buckbeak", "to": "Grawp", "value": 6, "width": 1}, {"from": "Buckbeak", "to": "Fang", "value": 5, "width": 1}, {"from": "Buckbeak", "to": "Barty", "value": 5, "width": 1}, {"from": "Bellatrix", "to": "Lucius", "value": 23, "width": 1}, {"from": "Bellatrix", "to": "Travers", "value": 23, "width": 1}, {"from": "Bellatrix", "to": "Narcissa", "value": 22, "width": 1}, {"from": "Bellatrix", "to": "Andromeda", "value": 11, "width": 1}, {"from": "Bellatrix", "to": "Molly", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Madam", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Kingsley", "value": 6, "width": 1}, {"from": "Bellatrix", "to": "Remus", "value": 5, "width": 1}, {"from": "Bellatrix", "to": "Xenophilius", "value": 2, "width": 1}, {"from": "Parvati", "to": "Lavender", "value": 82, "width": 1}, {"from": "Parvati", "to": "Firenze", "value": 59, "width": 1}, {"from": "Parvati", "to": "Padma", "value": 24, "width": 1}, {"from": "Parvati", "to": "Katie", "value": 10, "width": 1}, {"from": "Parvati", "to": "Travers", "value": 6, "width": 1}, {"from": "Parvati", "to": "Cormac", "value": 4, "width": 1}, {"from": "Parvati", "to": "Peeves", "value": 4, "width": 1}, {"from": "James", "to": "Lily", "value": 51, "width": 1}, {"from": "James", "to": "Albus", "value": 24, "width": 1}, {"from": "James", "to": "Peter", "value": 23, "width": 1}, {"from": "James", "to": "Bathilda", "value": 12, "width": 1}, {"from": "James", "to": "Godric", "value": 7, "width": 1}, {"from": "James", "to": "Molly", "value": 6, "width": 1}, {"from": "James", "to": "Remus", "value": 5, "width": 1}, {"from": "James", "to": "Petunia", "value": 5, "width": 1}, {"from": "James", "to": "Peeves", "value": 4, "width": 1}, {"from": "Scabbers", "to": "Crookshanks", "value": 18, "width": 1}, {"from": "Scabbers", "to": "Peter", "value": 8, "width": 1}, {"from": "Seamus", "to": "Angelina", "value": 7, "width": 1}, {"from": "Seamus", "to": "Aberforth", "value": 3, "width": 1}, {"from": "Seamus", "to": "Thomas", "value": 1, "width": 1}, {"from": "Kingsley", "to": "Marietta", "value": 6, "width": 1}, {"from": "Kingsley", "to": "Lucius", "value": 5, "width": 1}, {"from": "Kingsley", "to": "Lee", "value": 4, "width": 1}, {"from": "Kingsley", "to": "Minerva", "value": 3, "width": 1}, {"from": "Kingsley", "to": "Cornelius", "value": 1, "width": 1}, {"from": "Myrtle", "to": "Peeves", "value": 15, "width": 1}, {"from": "Petunia", "to": "Lily", "value": 38, "width": 1}, {"from": "Petunia", "to": "Vernon", "value": 10, "width": 1}, {"from": "Petunia", "to": "Marge", "value": 10, "width": 1}, {"from": "Angelina", "to": "Alicia", "value": 84, "width": 1}, {"from": "Angelina", "to": "Katie", "value": 63, "width": 1}, {"from": "Angelina", "to": "Lee", "value": 23, "width": 1}, {"from": "Angelina", "to": "Pansy", "value": 9, "width": 1}, {"from": "Angelina", "to": "Oliver", "value": 6, "width": 1}, {"from": "Angelina", "to": "Peeves", "value": 5, "width": 1}, {"from": "Ernie", "to": "Hannah", "value": 18, "width": 1}, {"from": "Ernie", "to": "Justin", "value": 17, "width": 1}, {"from": "Ernie", "to": "Zacharias", "value": 5, "width": 1}, {"from": "Arthur", "to": "Molly", "value": 22, "width": 1}, {"from": "Arthur", "to": "Sturgis", "value": 11, "width": 1}, {"from": "Arthur", "to": "Bob", "value": 4, "width": 1}, {"from": "Arthur", "to": "Andromeda", "value": 1, "width": 1}, {"from": "Colin", "to": "Dennis", "value": 11, "width": 1}, {"from": "Colin", "to": "Albus", "value": 6, "width": 1}, {"from": "Colin", "to": "Crabbe", "value": 6, "width": 1}, {"from": "Colin", "to": "Justin", "value": 5, "width": 1}, {"from": "Charlie", "to": "Norbert", "value": 40, "width": 1}, {"from": "Peeves", "to": "Bloody", "value": 11, "width": 1}, {"from": "Peeves", "to": "Justin", "value": 10, "width": 1}, {"from": "Peeves", "to": "Katie", "value": 6, "width": 1}, {"from": "Xenophilius", "to": "Peverell", "value": 5, "width": 1}, {"from": "Xenophilius", "to": "Travers", "value": 5, "width": 1}, {"from": "Winky", "to": "Barty", "value": 5, "width": 1}, {"from": "Winky", "to": "Bertha", "value": 2, "width": 1}, {"from": "Bathilda", "to": "Ariana", "value": 26, "width": 1}, {"from": "Bathilda", "to": "Albus", "value": 26, "width": 1}, {"from": "Bathilda", "to": "Kendra", "value": 18, "width": 1}, {"from": "Bathilda", "to": "Aberforth", "value": 11, "width": 1}, {"from": "Bathilda", "to": "Gellert", "value": 9, "width": 1}, {"from": "Aberforth", "to": "Albus", "value": 129, "width": 1}, {"from": "Aberforth", "to": "Ariana", "value": 34, "width": 1}, {"from": "Aberforth", "to": "Kendra", "value": 6, "width": 1}, {"from": "Albus", "to": "Ariana", "value": 47, "width": 1}, {"from": "Albus", "to": "Kendra", "value": 25, "width": 1}, {"from": "Albus", "to": "Gellert", "value": 16, "width": 1}, {"from": "Albus", "to": "Percival", "value": 16, "width": 1}, {"from": "Albus", "to": "Elphias", "value": 10, "width": 1}, {"from": "Albus", "to": "Lily", "value": 6, "width": 1}, {"from": "Firenze", "to": "Bane", "value": 61, "width": 1}, {"from": "Firenze", "to": "Magorian", "value": 14, "width": 1}, {"from": "Firenze", "to": "Grawp", "value": 6, "width": 1}, {"from": "Firenze", "to": "Nagini", "value": 1, "width": 1}, {"from": "Katie", "to": "Alicia", "value": 69, "width": 1}, {"from": "Aragog", "to": "Fawkes", "value": 5, "width": 1}, {"from": "Aragog", "to": "Norbert", "value": 5, "width": 1}, {"from": "Rita", "to": "Ariana", "value": 6, "width": 1}, {"from": "Rita", "to": "Viktor", "value": 5, "width": 1}, {"from": "Lee", "to": "Alicia", "value": 15, "width": 1}, {"from": "Lee", "to": "Zacharias", "value": 1, "width": 1}, {"from": "Grawp", "to": "Magorian", "value": 5, "width": 1}, {"from": "Pansy", "to": "Blaise", "value": 6, "width": 1}, {"from": "Crookshanks", "to": "Peter", "value": 4, "width": 1}, {"from": "Bane", "to": "Ronan", "value": 30, "width": 1}, {"from": "Bane", "to": "Magorian", "value": 23, "width": 1}, {"from": "Vernon", "to": "Scabior", "value": 5, "width": 1}, {"from": "Molly", "to": "Sturgis", "value": 3, "width": 1}, {"from": "Nagini", "to": "Frank", "value": 9, "width": 1}, {"from": "Ronan", "to": "Magorian", "value": 6, "width": 1}, {"from": "Morfin", "to": "Merope", "value": 30, "width": 1}, {"from": "Morfin", "to": "Marvolo", "value": 28, "width": 1}, {"from": "Morfin", "to": "Hokey", "value": 6, "width": 1}, {"from": "Padma", "to": "Terry", "value": 6, "width": 1}, {"from": "Ariana", "to": "Kendra", "value": 55, "width": 1}, {"from": "Ariana", "to": "Percival", "value": 11, "width": 1}, {"from": "Ariana", "to": "Elphias", "value": 11, "width": 1}, {"from": "Ariana", "to": "Gellert", "value": 4, "width": 1}, {"from": "Kendra", "to": "Elphias", "value": 11, "width": 1}, {"from": "Kendra", "to": "Gellert", "value": 5, "width": 1}, {"from": "Kendra", "to": "Percival", "value": 4, "width": 1}, {"from": "Marvolo", "to": "Merope", "value": 15, "width": 1}, {"from": "Minerva", "to": "Dolores", "value": 4, "width": 1}, {"from": "Minerva", "to": "Horace", "value": 3, "width": 1}, {"from": "Minerva", "to": "Alecto", "value": 2, "width": 1}, {"from": "Travers", "to": "Bogrod", "value": 12, "width": 1}, {"from": "Travers", "to": "Madam", "value": 5, "width": 1}, {"from": "Travers", "to": "Remus", "value": 5, "width": 1}, {"from": "Godric", "to": "Percival", "value": 11, "width": 1}, {"from": "Godric", "to": "Peverell", "value": 5, "width": 1}, {"from": "Godric", "to": "Gornuk", "value": 4, "width": 1}, {"from": "Ted", "to": "Dirk", "value": 31, "width": 1}, {"from": "Ted", "to": "Gornuk", "value": 4, "width": 1}, {"from": "Peter", "to": "Remus", "value": 7, "width": 1}, {"from": "Mafalda", "to": "Albert", "value": 5, "width": 1}, {"from": "Mundungus", "to": "Sturgis", "value": 5, "width": 1}, {"from": "Hannah", "to": "Susan", "value": 6, "width": 1}, {"from": "Hannah", "to": "Terry", "value": 5, "width": 1}, {"from": "Bogrod", "to": "Madam", "value": 6, "width": 1}, {"from": "Amycus", "to": "Alecto", "value": 7, "width": 1}, {"from": "Dirk", "to": "Gornuk", "value": 18, "width": 1}, {"from": "Dirk", "to": "Albert", "value": 5, "width": 1}, {"from": "Bertha", "to": "Frank", "value": 3, "width": 1}, {"from": "Remus", "to": "Nymphadora", "value": 9, "width": 1}]);
179
+
180
+ nodeColors = {};
181
+ allNodes = nodes.get({ returnType: "Object" });
182
+ for (nodeId in allNodes) {
183
+ nodeColors[nodeId] = allNodes[nodeId].color;
184
+ }
185
+ allEdges = edges.get({ returnType: "Object" });
186
+ // adding nodes and edges to the graph
187
+ data = {nodes: nodes, edges: edges};
188
+
189
+ var options = {
190
+ "configure": {
191
+ "enabled": true,
192
+ "filter": "physics"
193
+ },
194
+ "edges": {
195
+ "color": {
196
+ "inherit": true
197
+ },
198
+ "smooth": {
199
+ "enabled": true,
200
+ "type": "dynamic"
201
+ }
202
+ },
203
+ "interaction": {
204
+ "dragNodes": true,
205
+ "hideEdgesOnDrag": false,
206
+ "hideNodesOnDrag": false
207
+ },
208
+ "physics": {
209
+ "enabled": true,
210
+ "forceAtlas2Based": {
211
+ "avoidOverlap": 0,
212
+ "centralGravity": 0.01,
213
+ "damping": 0.4,
214
+ "gravitationalConstant": -50,
215
+ "springConstant": 0.08,
216
+ "springLength": 50
217
+ },
218
+ "solver": "forceAtlas2Based",
219
+ "stabilization": {
220
+ "enabled": true,
221
+ "fit": true,
222
+ "iterations": 1000,
223
+ "onlyDynamicEdges": false,
224
+ "updateInterval": 50
225
+ }
226
+ }
227
+ };
228
+
229
+
230
+
231
+
232
+
233
+ // if this network requires displaying the configure window,
234
+ // put it in its div
235
+ options.configure["container"] = document.getElementById("config");
236
+
237
+
238
+ network = new vis.Network(container, data, options);
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ network.on("stabilizationProgress", function(params) {
249
+ document.getElementById('loadingBar').removeAttribute("style");
250
+ var maxWidth = 496;
251
+ var minWidth = 20;
252
+ var widthFactor = params.iterations/params.total;
253
+ var width = Math.max(minWidth,maxWidth * widthFactor);
254
+ document.getElementById('bar').style.width = width + 'px';
255
+ document.getElementById('text').innerHTML = Math.round(widthFactor*100) + '%';
256
+ });
257
+ network.once("stabilizationIterationsDone", function() {
258
+ document.getElementById('text').innerHTML = '100%';
259
+ document.getElementById('bar').style.width = '496px';
260
+ document.getElementById('loadingBar').style.opacity = 0;
261
+ // really clean the dom element
262
+ setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500);
263
+ });
264
+
265
+
266
+ return network;
267
+
268
+ }
269
+ drawGraph();
270
+ </script>
271
+ </body>
272
+ </html>
graphs/harry.html ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1000px;
36
+ height: 700px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+
47
+
48
+ </style>
49
+ </head>
50
+
51
+
52
+ <body>
53
+ <div class="card" style="width: 100%">
54
+
55
+
56
+ <div id="mynetwork" class="card-body"></div>
57
+ </div>
58
+
59
+
60
+
61
+
62
+ <script type="text/javascript">
63
+
64
+ // initialize global variables.
65
+ var edges;
66
+ var nodes;
67
+ var allNodes;
68
+ var allEdges;
69
+ var nodeColors;
70
+ var originalNodes;
71
+ var network;
72
+ var container;
73
+ var options, data;
74
+ var filter = {
75
+ item : '',
76
+ property : '',
77
+ value : []
78
+ };
79
+
80
+
81
+
82
+
83
+
84
+ // This method is responsible for drawing the graph, returns the drawn network
85
+ function drawGraph() {
86
+ var container = document.getElementById('mynetwork');
87
+
88
+
89
+
90
+ // parsing and collecting nodes and edges from the python
91
+ nodes = new vis.DataSet([{"color": "#97c2fc", "font": {"color": "white"}, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 17}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 9}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Lily", "label": "Lily", "shape": "dot", "size": 5}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "James", "label": "James", "shape": "dot", "size": 4}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Albus", "label": "Albus", "shape": "dot", "size": 4}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Harry", "label": "Harry", "shape": "dot", "size": 38}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 23}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Griphook", "label": "Griphook", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Ron", "label": "Ron", "shape": "dot", "size": 24}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Neville", "label": "Neville", "shape": "dot", "size": 15}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Snape", "label": "Snape", "shape": "dot", "size": 12}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Percy", "label": "Percy", "shape": "dot", "size": 8}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 8}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Fluffy", "label": "Fluffy", "shape": "dot", "size": 8}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 12}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 6}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Bane", "label": "Bane", "shape": "dot", "size": 7}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Nicolas", "label": "Nicolas", "shape": "dot", "size": 2}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Godric", "label": "Godric", "shape": "dot", "size": 2}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 9}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 6}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Marge", "label": "Marge", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 4}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Fred", "label": "Fred", "shape": "dot", "size": 5}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Lee", "label": "Lee", "shape": "dot", "size": 1}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Bill", "label": "Bill", "shape": "dot", "size": 4}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Susan", "label": "Susan", "shape": "dot", "size": 2}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Terry", "label": "Terry", "shape": "dot", "size": 2}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 6}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 7}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 5}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 8}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Dean", "label": "Dean", "shape": "dot", "size": 3}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 1}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 7}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Fang", "label": "Fang", "shape": "dot", "size": 5}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 4}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 1}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 1}, {"color": "#97c2fc", "font": {"color": "white"}, "id": "Trevor", "label": "Trevor", "shape": "dot", "size": 1}]);
92
+ edges = new vis.DataSet([{"from": "Dumbledore", "to": "Voldemort", "value": 36, "width": 1}, {"from": "Dumbledore", "to": "Lily", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "James", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Albus", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Harry", "value": 377, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 88, "width": 1}, {"from": "Dumbledore", "to": "Griphook", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 76, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 59, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 20, "width": 1}, {"from": "Dumbledore", "to": "Fluffy", "value": 16, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Bane", "value": 4, "width": 1}, {"from": "Dumbledore", "to": "Nicolas", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Godric", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Harry", "value": 95, "width": 1}, {"from": "Voldemort", "to": "Snape", "value": 29, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Bane", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Fluffy", "value": 5, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 17, "width": 1}, {"from": "Godric", "to": "Lily", "value": 4, "width": 1}, {"from": "Lily", "to": "Harry", "value": 7, "width": 1}, {"from": "Lily", "to": "Hagrid", "value": 5, "width": 1}, {"from": "Lily", "to": "Albus", "value": 1, "width": 1}, {"from": "James", "to": "Albus", "value": 3, "width": 1}, {"from": "James", "to": "Hagrid", "value": 5, "width": 1}, {"from": "James", "to": "Harry", "value": 6, "width": 1}, {"from": "Albus", "to": "Dudley", "value": 1, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 931, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 658, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 69, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 31, "width": 1}, {"from": "Harry", "to": "Marge", "value": 6, "width": 1}, {"from": "Harry", "to": "Griphook", "value": 56, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 59, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 16, "width": 1}, {"from": "Harry", "to": "Percy", "value": 84, "width": 1}, {"from": "Harry", "to": "Fred", "value": 68, "width": 1}, {"from": "Harry", "to": "Ron", "value": 1778, "width": 1}, {"from": "Harry", "to": "Lee", "value": 11, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 11, "width": 1}, {"from": "Harry", "to": "Bill", "value": 5, "width": 1}, {"from": "Harry", "to": "Neville", "value": 330, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 275, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 5, "width": 1}, {"from": "Harry", "to": "Susan", "value": 5, "width": 1}, {"from": "Harry", "to": "Terry", "value": 5, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 40, "width": 1}, {"from": "Harry", "to": "Snape", "value": 543, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 34, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 39, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 143, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 30, "width": 1}, {"from": "Harry", "to": "Dean", "value": 20, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 8, "width": 1}, {"from": "Harry", "to": "Fluffy", "value": 40, "width": 1}, {"from": "Harry", "to": "Norbert", "value": 50, "width": 1}, {"from": "Harry", "to": "Fang", "value": 8, "width": 1}, {"from": "Harry", "to": "Ronan", "value": 13, "width": 1}, {"from": "Harry", "to": "Bane", "value": 14, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 64, "width": 1}, {"from": "Harry", "to": "Nicolas", "value": 7, "width": 1}, {"from": "Hagrid", "to": "Vernon", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Dudley", "value": 15, "width": 1}, {"from": "Hagrid", "to": "Griphook", "value": 13, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 162, "width": 1}, {"from": "Hagrid", "to": "Hermione", "value": 44, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 31, "width": 1}, {"from": "Hagrid", "to": "Hedwig", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Snape", "value": 64, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 22, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 36, "width": 1}, {"from": "Hagrid", "to": "Seamus", "value": 5, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 14, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 29, "width": 1}, {"from": "Hagrid", "to": "Peeves", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Ronan", "value": 62, "width": 1}, {"from": "Hagrid", "to": "Bane", "value": 3, "width": 1}, {"from": "Hagrid", "to": "Firenze", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Fluffy", "value": 9, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 28, "width": 1}, {"from": "Dudley", "to": "Vernon", "value": 39, "width": 1}, {"from": "Dudley", "to": "Dennis", "value": 11, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 6, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 11, "width": 1}, {"from": "Dudley", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Petunia", "to": "Vernon", "value": 4, "width": 1}, {"from": "Vernon", "to": "Marge", "value": 12, "width": 1}, {"from": "Vernon", "to": "Ron", "value": 3, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 9, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 5, "width": 1}, {"from": "Ginny", "to": "Fred", "value": 5, "width": 1}, {"from": "Ginny", "to": "Ron", "value": 4, "width": 1}, {"from": "Percy", "to": "Ron", "value": 24, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 11, "width": 1}, {"from": "Percy", "to": "Bill", "value": 2, "width": 1}, {"from": "Percy", "to": "Peeves", "value": 11, "width": 1}, {"from": "Percy", "to": "Neville", "value": 13, "width": 1}, {"from": "Fred", "to": "Ron", "value": 5, "width": 1}, {"from": "Fred", "to": "Charlie", "value": 6, "width": 1}, {"from": "Fred", "to": "Oliver", "value": 6, "width": 1}, {"from": "Ron", "to": "Bill", "value": 15, "width": 1}, {"from": "Ron", "to": "Neville", "value": 114, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 4, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 164, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 24, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 4, "width": 1}, {"from": "Ron", "to": "Snape", "value": 129, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 201, "width": 1}, {"from": "Ron", "to": "Fang", "value": 6, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 52, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 27, "width": 1}, {"from": "Ron", "to": "Dean", "value": 14, "width": 1}, {"from": "Ron", "to": "Fluffy", "value": 30, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 12, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 24, "width": 1}, {"from": "Charlie", "to": "Malfoy", "value": 10, "width": 1}, {"from": "Charlie", "to": "Norbert", "value": 24, "width": 1}, {"from": "Neville", "to": "Hermione", "value": 46, "width": 1}, {"from": "Neville", "to": "Malfoy", "value": 81, "width": 1}, {"from": "Neville", "to": "Peeves", "value": 11, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 33, "width": 1}, {"from": "Neville", "to": "Snape", "value": 20, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 11, "width": 1}, {"from": "Neville", "to": "Norbert", "value": 5, "width": 1}, {"from": "Neville", "to": "Fang", "value": 16, "width": 1}, {"from": "Neville", "to": "Fluffy", "value": 12, "width": 1}, {"from": "Neville", "to": "Trevor", "value": 11, "width": 1}, {"from": "Scabbers", "to": "Malfoy", "value": 3, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 16, "width": 1}, {"from": "Malfoy", "to": "Snape", "value": 40, "width": 1}, {"from": "Malfoy", "to": "Norbert", "value": 21, "width": 1}, {"from": "Malfoy", "to": "Fang", "value": 17, "width": 1}, {"from": "Goyle", "to": "Snape", "value": 14, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 64, "width": 1}, {"from": "Hermione", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hermione", "to": "Bane", "value": 3, "width": 1}, {"from": "Hannah", "to": "Susan", "value": 6, "width": 1}, {"from": "Hannah", "to": "Terry", "value": 4, "width": 1}, {"from": "Seamus", "to": "Snape", "value": 5, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 12, "width": 1}, {"from": "Snape", "to": "Peeves", "value": 5, "width": 1}, {"from": "Snape", "to": "Fluffy", "value": 43, "width": 1}, {"from": "Peeves", "to": "Norbert", "value": 5, "width": 1}, {"from": "Ronan", "to": "Bane", "value": 30, "width": 1}, {"from": "Ronan", "to": "Firenze", "value": 10, "width": 1}, {"from": "Bane", "to": "Firenze", "value": 42, "width": 1}]);
93
+
94
+ nodeColors = {};
95
+ allNodes = nodes.get({ returnType: "Object" });
96
+ for (nodeId in allNodes) {
97
+ nodeColors[nodeId] = allNodes[nodeId].color;
98
+ }
99
+ allEdges = edges.get({ returnType: "Object" });
100
+ // adding nodes and edges to the graph
101
+ data = {nodes: nodes, edges: edges};
102
+
103
+ var options = {
104
+ "configure": {
105
+ "enabled": false
106
+ },
107
+ "edges": {
108
+ "color": {
109
+ "inherit": true
110
+ },
111
+ "smooth": {
112
+ "enabled": true,
113
+ "type": "dynamic"
114
+ }
115
+ },
116
+ "interaction": {
117
+ "dragNodes": true,
118
+ "hideEdgesOnDrag": false,
119
+ "hideNodesOnDrag": false
120
+ },
121
+ "physics": {
122
+ "enabled": true,
123
+ "stabilization": {
124
+ "enabled": true,
125
+ "fit": true,
126
+ "iterations": 1000,
127
+ "onlyDynamicEdges": false,
128
+ "updateInterval": 50
129
+ }
130
+ }
131
+ };
132
+
133
+
134
+
135
+
136
+
137
+
138
+ network = new vis.Network(container, data, options);
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ return network;
150
+
151
+ }
152
+ drawGraph();
153
+ </script>
154
+ </body>
155
+ </html>
graphs/harry_community1.html ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script src="lib/bindings/utils.js"></script>
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
7
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
8
+
9
+
10
+ <center>
11
+ <h1></h1>
12
+ </center>
13
+
14
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
15
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
16
+ <link
17
+ href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
18
+ rel="stylesheet"
19
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
20
+ crossorigin="anonymous"
21
+ />
22
+ <script
23
+ src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
24
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
25
+ crossorigin="anonymous"
26
+ ></script>
27
+
28
+
29
+ <center>
30
+ <h1></h1>
31
+ </center>
32
+ <style type="text/css">
33
+
34
+ #mynetwork {
35
+ width: 1500px;
36
+ height: 1000px;
37
+ background-color: #222222;
38
+ border: 1px solid lightgray;
39
+ position: relative;
40
+ float: left;
41
+ }
42
+
43
+
44
+
45
+
46
+ #config {
47
+ float: left;
48
+ width: 400px;
49
+ height: 600px;
50
+ }
51
+
52
+
53
+
54
+ </style>
55
+ </head>
56
+
57
+
58
+ <body>
59
+ <div class="card" style="width: 100%">
60
+
61
+
62
+ <div id="mynetwork" class="card-body"></div>
63
+ </div>
64
+
65
+
66
+
67
+ <div id="config"></div>
68
+
69
+
70
+ <script type="text/javascript">
71
+
72
+ // initialize global variables.
73
+ var edges;
74
+ var nodes;
75
+ var allNodes;
76
+ var allEdges;
77
+ var nodeColors;
78
+ var originalNodes;
79
+ var network;
80
+ var container;
81
+ var options, data;
82
+ var filter = {
83
+ item : '',
84
+ property : '',
85
+ value : []
86
+ };
87
+
88
+
89
+
90
+
91
+
92
+ // This method is responsible for drawing the graph, returns the drawn network
93
+ function drawGraph() {
94
+ var container = document.getElementById('mynetwork');
95
+
96
+
97
+
98
+ // parsing and collecting nodes and edges from the python
99
+ nodes = new vis.DataSet([{"betweenness_centrality": 0.026042820228866736, "closeness_centrality": 0.5657894736842105, "degree_centrality": 0.32558139534883723, "font": {"color": "white"}, "group": 0, "id": "Dumbledore", "label": "Dumbledore", "shape": "dot", "size": 14}, {"betweenness_centrality": 0.048080472499077154, "closeness_centrality": 0.5180722891566265, "degree_centrality": 0.18604651162790697, "font": {"color": "white"}, "group": 0, "id": "Voldemort", "label": "Voldemort", "shape": "dot", "size": 8}, {"betweenness_centrality": 0.561546168855139, "closeness_centrality": 0.8775510204081632, "degree_centrality": 0.8837209302325582, "font": {"color": "white"}, "group": 2, "id": "Harry", "label": "Harry", "shape": "dot", "size": 38}, {"betweenness_centrality": 0.05731951695406844, "closeness_centrality": 0.6142857142857143, "degree_centrality": 0.41860465116279066, "font": {"color": "white"}, "group": 4, "id": "Hagrid", "label": "Hagrid", "shape": "dot", "size": 18}, {"betweenness_centrality": 0.13675842429995252, "closeness_centrality": 0.6935483870967742, "degree_centrality": 0.5813953488372093, "font": {"color": "white"}, "group": 3, "id": "Ron", "label": "Ron", "shape": "dot", "size": 25}, {"betweenness_centrality": 0.0038021410114433365, "closeness_centrality": 0.524390243902439, "degree_centrality": 0.23255813953488372, "font": {"color": "white"}, "group": 4, "id": "Hermione", "label": "Hermione", "shape": "dot", "size": 10}, {"betweenness_centrality": 0.009091388493381848, "closeness_centrality": 0.5443037974683544, "degree_centrality": 0.3023255813953488, "font": {"color": "white"}, "group": 4, "id": "Neville", "label": "Neville", "shape": "dot", "size": 13}, {"betweenness_centrality": 0.011213942941517693, "closeness_centrality": 0.5512820512820513, "degree_centrality": 0.3023255813953488, "font": {"color": "white"}, "group": 4, "id": "Snape", "label": "Snape", "shape": "dot", "size": 13}, {"betweenness_centrality": 0.007142857142857142, "closeness_centrality": 0.524390243902439, "degree_centrality": 0.23255813953488372, "font": {"color": "white"}, "group": 3, "id": "Percy", "label": "Percy", "shape": "dot", "size": 10}, {"betweenness_centrality": 0.05002900384960185, "closeness_centrality": 0.5180722891566265, "degree_centrality": 0.18604651162790697, "font": {"color": "white"}, "group": 3, "id": "Fred", "label": "Fred", "shape": "dot", "size": 8}, {"betweenness_centrality": 0.01176765279755313, "closeness_centrality": 0.5584415584415584, "degree_centrality": 0.27906976744186046, "font": {"color": "white"}, "group": 4, "id": "Malfoy", "label": "Malfoy", "shape": "dot", "size": 12}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.09302325581395349, "font": {"color": "white"}, "group": 0, "id": "Firenze", "label": "Firenze", "shape": "dot", "size": 4}, {"betweenness_centrality": 0.0018456995201181245, "closeness_centrality": 0.5058823529411764, "degree_centrality": 0.13953488372093023, "font": {"color": "white"}, "group": 0, "id": "Bane", "label": "Bane", "shape": "dot", "size": 6}, {"betweenness_centrality": 0.0017718715393133999, "closeness_centrality": 0.5119047619047619, "degree_centrality": 0.11627906976744186, "font": {"color": "white"}, "group": 1, "id": "Hedwig", "label": "Hedwig", "shape": "dot", "size": 5}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 0, "id": "Nicolas", "label": "Nicolas", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.344, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 0, "id": "Godric", "label": "Godric", "shape": "dot", "size": 1}, {"betweenness_centrality": 0.046511627906976744, "closeness_centrality": 0.36134453781512604, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 1, "id": "Albus", "label": "Albus", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.2670807453416149, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 1, "id": "James", "label": "James", "shape": "dot", "size": 1}, {"betweenness_centrality": 0.140531561461794, "closeness_centrality": 0.5443037974683544, "degree_centrality": 0.20930232558139533, "font": {"color": "white"}, "group": 1, "id": "Dudley", "label": "Dudley", "shape": "dot", "size": 9}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4725274725274725, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 2, "id": "Vernon", "label": "Vernon", "shape": "dot", "size": 1}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 1, "id": "Petunia", "label": "Petunia", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 1, "id": "Marge", "label": "Marge", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 4, "id": "Griphook", "label": "Griphook", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.00044296788482834997, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.09302325581395349, "font": {"color": "white"}, "group": 3, "id": "Ginny", "label": "Ginny", "shape": "dot", "size": 4}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4725274725274725, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 2, "id": "Lee", "label": "Lee", "shape": "dot", "size": 1}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 2, "id": "Scabbers", "label": "Scabbers", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.48863636363636365, "degree_centrality": 0.09302325581395349, "font": {"color": "white"}, "group": 3, "id": "Bill", "label": "Bill", "shape": "dot", "size": 4}, {"betweenness_centrality": 0.0019195275009228497, "closeness_centrality": 0.5119047619047619, "degree_centrality": 0.16279069767441862, "font": {"color": "white"}, "group": 4, "id": "Goyle", "label": "Goyle", "shape": "dot", "size": 7}, {"betweenness_centrality": 0.0005537098560354374, "closeness_centrality": 0.48314606741573035, "degree_centrality": 0.06976744186046512, "font": {"color": "white"}, "group": 2, "id": "Hannah", "label": "Hannah", "shape": "dot", "size": 3}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 2, "id": "Susan", "label": "Susan", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 2, "id": "Terry", "label": "Terry", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0002768549280177187, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.11627906976744186, "font": {"color": "white"}, "group": 3, "id": "Bloody", "label": "Bloody", "shape": "dot", "size": 5}, {"betweenness_centrality": 0.0007382798080472499, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.11627906976744186, "font": {"color": "white"}, "group": 2, "id": "Seamus", "label": "Seamus", "shape": "dot", "size": 5}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.11627906976744186, "font": {"color": "white"}, "group": 4, "id": "Fang", "label": "Fang", "shape": "dot", "size": 5}, {"betweenness_centrality": 0.004485049833887044, "closeness_centrality": 0.5180722891566265, "degree_centrality": 0.18604651162790697, "font": {"color": "white"}, "group": 3, "id": "Charlie", "label": "Charlie", "shape": "dot", "size": 8}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.48314606741573035, "degree_centrality": 0.06976744186046512, "font": {"color": "white"}, "group": 2, "id": "Dean", "label": "Dean", "shape": "dot", "size": 3}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.48863636363636365, "degree_centrality": 0.09302325581395349, "font": {"color": "white"}, "group": 3, "id": "Peeves", "label": "Peeves", "shape": "dot", "size": 4}, {"betweenness_centrality": 0.00036913990402362494, "closeness_centrality": 0.48863636363636365, "degree_centrality": 0.06976744186046512, "font": {"color": "white"}, "group": 3, "id": "Angelina", "label": "Angelina", "shape": "dot", "size": 3}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4777777777777778, "degree_centrality": 0.046511627906976744, "font": {"color": "white"}, "group": 2, "id": "Parvati", "label": "Parvati", "shape": "dot", "size": 2}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.4942528735632184, "degree_centrality": 0.11627906976744186, "font": {"color": "white"}, "group": 4, "id": "Fluffy", "label": "Fluffy", "shape": "dot", "size": 5}, {"betweenness_centrality": 0.00040605389442598745, "closeness_centrality": 0.5058823529411764, "degree_centrality": 0.16279069767441862, "font": {"color": "white"}, "group": 4, "id": "Norbert", "label": "Norbert", "shape": "dot", "size": 7}, {"betweenness_centrality": 0.0002768549280177187, "closeness_centrality": 0.48863636363636365, "degree_centrality": 0.09302325581395349, "font": {"color": "white"}, "group": 4, "id": "Ronan", "label": "Ronan", "shape": "dot", "size": 4}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.35537190082644626, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 1, "id": "Dennis", "label": "Dennis", "shape": "dot", "size": 1}, {"betweenness_centrality": 0.0, "closeness_centrality": 0.344, "degree_centrality": 0.023255813953488372, "font": {"color": "white"}, "group": 3, "id": "Oliver", "label": "Oliver", "shape": "dot", "size": 1}]);
100
+ edges = new vis.DataSet([{"from": "Dumbledore", "to": "Voldemort", "value": 25, "width": 1}, {"from": "Dumbledore", "to": "Harry", "value": 297, "width": 1}, {"from": "Dumbledore", "to": "Hagrid", "value": 56, "width": 1}, {"from": "Dumbledore", "to": "Ron", "value": 92, "width": 1}, {"from": "Dumbledore", "to": "Hermione", "value": 17, "width": 1}, {"from": "Dumbledore", "to": "Neville", "value": 15, "width": 1}, {"from": "Dumbledore", "to": "Snape", "value": 48, "width": 1}, {"from": "Dumbledore", "to": "Percy", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Fred", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Malfoy", "value": 11, "width": 1}, {"from": "Dumbledore", "to": "Firenze", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Bane", "value": 5, "width": 1}, {"from": "Dumbledore", "to": "Hedwig", "value": 6, "width": 1}, {"from": "Dumbledore", "to": "Nicolas", "value": 4, "width": 1}, {"from": "Voldemort", "to": "Godric", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Harry", "value": 119, "width": 1}, {"from": "Voldemort", "to": "Snape", "value": 35, "width": 1}, {"from": "Voldemort", "to": "Ron", "value": 16, "width": 1}, {"from": "Voldemort", "to": "Bane", "value": 9, "width": 1}, {"from": "Voldemort", "to": "Firenze", "value": 6, "width": 1}, {"from": "Voldemort", "to": "Hagrid", "value": 11, "width": 1}, {"from": "Albus", "to": "James", "value": 4, "width": 1}, {"from": "Albus", "to": "Dudley", "value": 3, "width": 1}, {"from": "Harry", "to": "Hagrid", "value": 835, "width": 1}, {"from": "Harry", "to": "Dudley", "value": 659, "width": 1}, {"from": "Harry", "to": "Vernon", "value": 17, "width": 1}, {"from": "Harry", "to": "Petunia", "value": 42, "width": 1}, {"from": "Harry", "to": "Marge", "value": 10, "width": 1}, {"from": "Harry", "to": "Griphook", "value": 31, "width": 1}, {"from": "Harry", "to": "Hedwig", "value": 44, "width": 1}, {"from": "Harry", "to": "Ginny", "value": 14, "width": 1}, {"from": "Harry", "to": "Percy", "value": 82, "width": 1}, {"from": "Harry", "to": "Fred", "value": 70, "width": 1}, {"from": "Harry", "to": "Ron", "value": 1912, "width": 1}, {"from": "Harry", "to": "Lee", "value": 14, "width": 1}, {"from": "Harry", "to": "Hermione", "value": 212, "width": 1}, {"from": "Harry", "to": "Scabbers", "value": 6, "width": 1}, {"from": "Harry", "to": "Bill", "value": 5, "width": 1}, {"from": "Harry", "to": "Malfoy", "value": 274, "width": 1}, {"from": "Harry", "to": "Goyle", "value": 59, "width": 1}, {"from": "Harry", "to": "Neville", "value": 286, "width": 1}, {"from": "Harry", "to": "Hannah", "value": 5, "width": 1}, {"from": "Harry", "to": "Susan", "value": 5, "width": 1}, {"from": "Harry", "to": "Terry", "value": 5, "width": 1}, {"from": "Harry", "to": "Bloody", "value": 11, "width": 1}, {"from": "Harry", "to": "Seamus", "value": 40, "width": 1}, {"from": "Harry", "to": "Snape", "value": 501, "width": 1}, {"from": "Harry", "to": "Fang", "value": 39, "width": 1}, {"from": "Harry", "to": "Charlie", "value": 36, "width": 1}, {"from": "Harry", "to": "Dean", "value": 28, "width": 1}, {"from": "Harry", "to": "Peeves", "value": 16, "width": 1}, {"from": "Harry", "to": "Angelina", "value": 9, "width": 1}, {"from": "Harry", "to": "Parvati", "value": 9, "width": 1}, {"from": "Harry", "to": "Fluffy", "value": 15, "width": 1}, {"from": "Harry", "to": "Norbert", "value": 54, "width": 1}, {"from": "Harry", "to": "Ronan", "value": 13, "width": 1}, {"from": "Harry", "to": "Bane", "value": 26, "width": 1}, {"from": "Harry", "to": "Firenze", "value": 35, "width": 1}, {"from": "Harry", "to": "Nicolas", "value": 12, "width": 1}, {"from": "Hagrid", "to": "Dudley", "value": 19, "width": 1}, {"from": "Hagrid", "to": "Griphook", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Hermione", "value": 66, "width": 1}, {"from": "Hagrid", "to": "Neville", "value": 26, "width": 1}, {"from": "Hagrid", "to": "Goyle", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Snape", "value": 81, "width": 1}, {"from": "Hagrid", "to": "Ron", "value": 117, "width": 1}, {"from": "Hagrid", "to": "Fang", "value": 30, "width": 1}, {"from": "Hagrid", "to": "Malfoy", "value": 35, "width": 1}, {"from": "Hagrid", "to": "Angelina", "value": 4, "width": 1}, {"from": "Hagrid", "to": "Charlie", "value": 14, "width": 1}, {"from": "Hagrid", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hagrid", "to": "Norbert", "value": 33, "width": 1}, {"from": "Hagrid", "to": "Ronan", "value": 64, "width": 1}, {"from": "Hagrid", "to": "Bane", "value": 5, "width": 1}, {"from": "Dudley", "to": "Petunia", "value": 26, "width": 1}, {"from": "Dudley", "to": "Dennis", "value": 11, "width": 1}, {"from": "Dudley", "to": "Marge", "value": 11, "width": 1}, {"from": "Dudley", "to": "Hedwig", "value": 3, "width": 1}, {"from": "Dudley", "to": "Ron", "value": 11, "width": 1}, {"from": "Dudley", "to": "Malfoy", "value": 5, "width": 1}, {"from": "Hedwig", "to": "Ron", "value": 14, "width": 1}, {"from": "Hedwig", "to": "Snape", "value": 5, "width": 1}, {"from": "Ginny", "to": "Percy", "value": 5, "width": 1}, {"from": "Ginny", "to": "Fred", "value": 6, "width": 1}, {"from": "Ginny", "to": "Ron", "value": 4, "width": 1}, {"from": "Percy", "to": "Ron", "value": 25, "width": 1}, {"from": "Percy", "to": "Charlie", "value": 11, "width": 1}, {"from": "Percy", "to": "Bill", "value": 2, "width": 1}, {"from": "Percy", "to": "Snape", "value": 1, "width": 1}, {"from": "Percy", "to": "Bloody", "value": 10, "width": 1}, {"from": "Percy", "to": "Peeves", "value": 6, "width": 1}, {"from": "Percy", "to": "Neville", "value": 9, "width": 1}, {"from": "Fred", "to": "Ron", "value": 13, "width": 1}, {"from": "Fred", "to": "Charlie", "value": 5, "width": 1}, {"from": "Fred", "to": "Oliver", "value": 6, "width": 1}, {"from": "Fred", "to": "Angelina", "value": 6, "width": 1}, {"from": "Fred", "to": "Goyle", "value": 4, "width": 1}, {"from": "Ron", "to": "Bill", "value": 14, "width": 1}, {"from": "Ron", "to": "Neville", "value": 129, "width": 1}, {"from": "Ron", "to": "Scabbers", "value": 4, "width": 1}, {"from": "Ron", "to": "Goyle", "value": 26, "width": 1}, {"from": "Ron", "to": "Malfoy", "value": 154, "width": 1}, {"from": "Ron", "to": "Hermione", "value": 235, "width": 1}, {"from": "Ron", "to": "Seamus", "value": 3, "width": 1}, {"from": "Ron", "to": "Snape", "value": 133, "width": 1}, {"from": "Ron", "to": "Fang", "value": 17, "width": 1}, {"from": "Ron", "to": "Charlie", "value": 49, "width": 1}, {"from": "Ron", "to": "Dean", "value": 12, "width": 1}, {"from": "Ron", "to": "Bloody", "value": 11, "width": 1}, {"from": "Ron", "to": "Peeves", "value": 14, "width": 1}, {"from": "Ron", "to": "Parvati", "value": 11, "width": 1}, {"from": "Ron", "to": "Norbert", "value": 13, "width": 1}, {"from": "Ron", "to": "Fluffy", "value": 9, "width": 1}, {"from": "Bill", "to": "Charlie", "value": 24, "width": 1}, {"from": "Charlie", "to": "Norbert", "value": 24, "width": 1}, {"from": "Charlie", "to": "Malfoy", "value": 6, "width": 1}, {"from": "Neville", "to": "Hermione", "value": 29, "width": 1}, {"from": "Neville", "to": "Goyle", "value": 23, "width": 1}, {"from": "Neville", "to": "Malfoy", "value": 64, "width": 1}, {"from": "Neville", "to": "Seamus", "value": 23, "width": 1}, {"from": "Neville", "to": "Snape", "value": 20, "width": 1}, {"from": "Neville", "to": "Bloody", "value": 6, "width": 1}, {"from": "Neville", "to": "Norbert", "value": 5, "width": 1}, {"from": "Neville", "to": "Fang", "value": 16, "width": 1}, {"from": "Hermione", "to": "Malfoy", "value": 10, "width": 1}, {"from": "Hermione", "to": "Snape", "value": 48, "width": 1}, {"from": "Hermione", "to": "Norbert", "value": 2, "width": 1}, {"from": "Hermione", "to": "Fluffy", "value": 6, "width": 1}, {"from": "Hermione", "to": "Ronan", "value": 11, "width": 1}, {"from": "Malfoy", "to": "Goyle", "value": 19, "width": 1}, {"from": "Malfoy", "to": "Snape", "value": 47, "width": 1}, {"from": "Malfoy", "to": "Norbert", "value": 26, "width": 1}, {"from": "Malfoy", "to": "Fang", "value": 18, "width": 1}, {"from": "Goyle", "to": "Snape", "value": 9, "width": 1}, {"from": "Hannah", "to": "Susan", "value": 6, "width": 1}, {"from": "Hannah", "to": "Terry", "value": 5, "width": 1}, {"from": "Bloody", "to": "Peeves", "value": 1, "width": 1}, {"from": "Seamus", "to": "Snape", "value": 4, "width": 1}, {"from": "Seamus", "to": "Dean", "value": 12, "width": 1}, {"from": "Snape", "to": "Fluffy", "value": 11, "width": 1}, {"from": "Ronan", "to": "Bane", "value": 24, "width": 1}, {"from": "Bane", "to": "Firenze", "value": 40, "width": 1}]);
101
+
102
+ nodeColors = {};
103
+ allNodes = nodes.get({ returnType: "Object" });
104
+ for (nodeId in allNodes) {
105
+ nodeColors[nodeId] = allNodes[nodeId].color;
106
+ }
107
+ allEdges = edges.get({ returnType: "Object" });
108
+ // adding nodes and edges to the graph
109
+ data = {nodes: nodes, edges: edges};
110
+
111
+ var options = {
112
+ "configure": {
113
+ "enabled": true,
114
+ "filter": "physics"
115
+ },
116
+ "edges": {
117
+ "color": {
118
+ "inherit": true
119
+ },
120
+ "smooth": {
121
+ "enabled": true,
122
+ "type": "dynamic"
123
+ }
124
+ },
125
+ "interaction": {
126
+ "dragNodes": true,
127
+ "hideEdgesOnDrag": false,
128
+ "hideNodesOnDrag": false
129
+ },
130
+ "physics": {
131
+ "enabled": true,
132
+ "stabilization": {
133
+ "enabled": true,
134
+ "fit": true,
135
+ "iterations": 1000,
136
+ "onlyDynamicEdges": false,
137
+ "updateInterval": 50
138
+ }
139
+ }
140
+ };
141
+
142
+
143
+
144
+
145
+
146
+ // if this network requires displaying the configure window,
147
+ // put it in its div
148
+ options.configure["container"] = document.getElementById("config");
149
+
150
+
151
+ network = new vis.Network(container, data, options);
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ return network;
163
+
164
+ }
165
+ drawGraph();
166
+ </script>
167
+ </body>
168
+ </html>