Spaces:
Running
Running
Update apps/sdg_pd.py
Browse files- apps/sdg_pd.py +14 -15
apps/sdg_pd.py
CHANGED
@@ -18,20 +18,19 @@ def app():
|
|
18 |
agree = st.checkbox('add labels')
|
19 |
|
20 |
if agree:
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
st.plotly_chart(fig)
|
30 |
else:
|
31 |
with st.spinner("π create visualisation"):
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
18 |
agree = st.checkbox('add labels')
|
19 |
|
20 |
if agree:
|
21 |
+
with st.spinner("π create visualisation"):
|
22 |
+
fig = px.scatter_3d(
|
23 |
+
df_osdg, x='coord_x', y='coord_y', z='coord_z',
|
24 |
+
color='labels',
|
25 |
+
opacity = .5, hover_data=[keys])
|
26 |
+
fig.update_scenes(xaxis_visible=False, yaxis_visible=False,zaxis_visible=False )
|
27 |
+
fig.update_traces(marker_size=4)
|
28 |
+
st.plotly_chart(fig)
|
|
|
29 |
else:
|
30 |
with st.spinner("π create visualisation"):
|
31 |
+
fig = px.scatter_3d(
|
32 |
+
df_osdg, x='coord_x', y='coord_y', z='coord_z',
|
33 |
+
opacity = .5, hover_data=[keys])
|
34 |
+
fig.update_scenes(xaxis_visible=False, yaxis_visible=False,zaxis_visible=False )
|
35 |
+
fig.update_traces(marker_size=4)
|
36 |
+
st.plotly_chart(fig)
|