Update app.py
Browse files
app.py
CHANGED
@@ -52,9 +52,9 @@ def network_visualizer(city, year, num_nodes):
|
|
52 |
edge_color = value_to_hex(attribute_value)
|
53 |
hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
|
54 |
edge_color = value_to_hex(attribute_value)
|
55 |
-
|
56 |
-
net.add_node(source, color=value_to_hex(hadith_count), font = {'size':30, 'color': 'orange'}, label = f"
|
57 |
-
net.add_node(target, color=value_to_hex(attribute_value) , font = {'size': 20, 'color': 'red'}, label = f"
|
58 |
net.add_edge(source, target, color=edge_color, value=attribute_value)
|
59 |
|
60 |
|
|
|
52 |
edge_color = value_to_hex(attribute_value)
|
53 |
hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
|
54 |
edge_color = value_to_hex(attribute_value)
|
55 |
+
|
56 |
+
net.add_node(source, color=value_to_hex(hadith_count), font = {'size':30, 'color': 'orange'}, label = f"{source}\nHadiths: {attribute_value}")
|
57 |
+
net.add_node(target, color=value_to_hex(attribute_value) , font = {'size': 20, 'color': 'red'}, label = f"{target}\nHadiths: {attribute_value}")
|
58 |
net.add_edge(source, target, color=edge_color, value=attribute_value)
|
59 |
|
60 |
|