FDSRashid commited on
Commit
d062be7
·
1 Parent(s): e0175dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -52,11 +52,10 @@ def network_visualizer(yaxis, city, fstyear,lastyr, num_nodes):
52
  edge_color = value_to_hex(attribute_value)
53
  hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source][yaxis].to_list()[0]
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
 
62
  net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
 
52
  edge_color = value_to_hex(attribute_value)
53
  hadith_count = teacher_hadiths[teacher_hadiths['Teacher'] == source][yaxis].to_list()[0]
54
  student_count = student_hadiths[student_hadiths['Student'] == target][yaxis].to_list()[0]
 
55
 
56
  net.add_node(source, color=value_to_hex(hadith_count), font = {'size':30, 'color': 'orange'}, label = f"{source}\n{yaxis}: {hadith_count}")
57
  net.add_node(target, color=value_to_hex(student_count) , font = {'size': 20, 'color': 'red'}, label = f"{target}\n{yaxis}: {student_count}")
58
+ net.add_edge(source, target, color=edge_color, value=attribute_value, label = f"{source} to {target}\n{yaxis}: {attribute_value}")
59
 
60
 
61
  net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)