Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,9 +70,9 @@ def network_visualizer(yaxis, city, fstyear,lastyr, num_nodes):
|
|
| 70 |
teacher_narrations = teacher_info['Number of Narrations'].to_list()[0]
|
| 71 |
student_narrations = student_info['Number of Narrations'].to_list()[0]
|
| 72 |
|
| 73 |
-
net.add_node(source, color=value_to_hex(teacher_narrations), font = {'size':30, 'color': 'orange'}
|
| 74 |
-
net.add_node(target, color=value_to_hex(student_narrations), font = {'size': 20, 'color': 'red'}
|
| 75 |
-
net.add_edge(source, target, color=edge_color, value=attribute_value, label = f"{
|
| 76 |
|
| 77 |
|
| 78 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|
|
|
|
| 70 |
teacher_narrations = teacher_info['Number of Narrations'].to_list()[0]
|
| 71 |
student_narrations = student_info['Number of Narrations'].to_list()[0]
|
| 72 |
|
| 73 |
+
net.add_node(source, color=value_to_hex(teacher_narrations), font = {'size':30, 'color': 'orange'}, label = f"{source}\n{teacher_narrations}")
|
| 74 |
+
net.add_node(target, color=value_to_hex(student_narrations), font = {'size': 20, 'color': 'red'}, label = f"{target}\n{student_narrations}")
|
| 75 |
+
net.add_edge(source, target, color=edge_color, value=attribute_value, label = f"{yaxis}:{attribute_value}")
|
| 76 |
|
| 77 |
|
| 78 |
net.barnes_hut(gravity=-5000, central_gravity=0.3, spring_length=200)
|