Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def network_visualizer(city, year, num_nodes):
|
|
51 |
attribute_value = row['Hadiths']
|
52 |
edge_color = value_to_hex(attribute_value)
|
53 |
hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
|
54 |
-
if source not in node_roles or node_roles[source] == "
|
55 |
node_roles[source] = "source"
|
56 |
node_colors[source] = value_to_hex(hadith_count)
|
57 |
net.add_node(source, color=value_to_hex(hadith_count), font={'size': 30, 'color': 'orange'})
|
|
|
51 |
attribute_value = row['Hadiths']
|
52 |
edge_color = value_to_hex(attribute_value)
|
53 |
hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source]['Hadiths'].to_list()[0]
|
54 |
+
if source not in node_roles or node_roles[source] == "target":
|
55 |
node_roles[source] = "source"
|
56 |
node_colors[source] = value_to_hex(hadith_count)
|
57 |
net.add_node(source, color=value_to_hex(hadith_count), font={'size': 30, 'color': 'orange'})
|