Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,11 +92,16 @@ if uploaded_file is not None:
|
|
92 |
plt.xticks(rotation='vertical')
|
93 |
st.pyplot(fig)
|
94 |
|
|
|
95 |
st.title("Weekly Activity Map")
|
96 |
user_heatmap = helper.activity_heatmap(selected_user, df)
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
100 |
|
101 |
# Finding the busiest users in the group (Group level)
|
102 |
if selected_user == 'Overall':
|
|
|
92 |
plt.xticks(rotation='vertical')
|
93 |
st.pyplot(fig)
|
94 |
|
95 |
+
# Weekly Activity Map (Heatmap)
|
96 |
st.title("Weekly Activity Map")
|
97 |
user_heatmap = helper.activity_heatmap(selected_user, df)
|
98 |
+
|
99 |
+
if not user_heatmap.empty and user_heatmap.notnull().values.any():
|
100 |
+
fig, ax = plt.subplots()
|
101 |
+
ax = sns.heatmap(user_heatmap)
|
102 |
+
st.pyplot(fig)
|
103 |
+
else:
|
104 |
+
st.write("Insufficient data to generate a heatmap.")
|
105 |
|
106 |
# Finding the busiest users in the group (Group level)
|
107 |
if selected_user == 'Overall':
|