FDSRashid commited on
Commit
a359c9a
·
verified ·
1 Parent(s): c6ce7b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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['Source'] == edge[0]) & (edges['Destination'] == 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]}")
 
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]}")