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