Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ def network_visualizer(yaxis, city, fstyear,lastyr, num_nodes):
|
|
89 |
else:
|
90 |
net.add_node(node, font = {'size':30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}', size= 50)
|
91 |
for edge in G.edges:
|
92 |
-
row = edges[(edges['
|
93 |
source = row['Teacher_ID']
|
94 |
target = row['Student_ID']
|
95 |
net.add_edge(source, target, color = value_to_hex(int(row[yaxis])), label = f"{row[yaxis]}")
|
|
|
89 |
else:
|
90 |
net.add_node(node, font = {'size':30, 'color': 'red'}, color = value_to_hex(student_narrations), label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}', size= 50)
|
91 |
for edge in G.edges:
|
92 |
+
row = edges[(edges['Teacher_ID'] == edge[0]) & (edges['Student_ID'] == edge[1])].iloc[0]
|
93 |
source = row['Teacher_ID']
|
94 |
target = row['Student_ID']
|
95 |
net.add_edge(source, target, color = value_to_hex(int(row[yaxis])), label = f"{row[yaxis]}")
|