Update app.py
Browse files
app.py
CHANGED
|
@@ -224,30 +224,31 @@ def main():
|
|
| 224 |
st.write(student_metrics_df)
|
| 225 |
|
| 226 |
# Visualization for Student Metrics
|
| 227 |
-
|
| 228 |
|
| 229 |
# Compute Student Metric Averages
|
| 230 |
attendance_avg_stats, engagement_avg_stats = compute_average_metrics(student_metrics_df)
|
| 231 |
|
| 232 |
-
# Two-column layout for the visualization and intervention frequency
|
| 233 |
-
col1, col2 = st.columns([3, 1]) # Set the column width ratio
|
| 234 |
|
| 235 |
-
with col1:
|
| 236 |
-
|
| 237 |
|
| 238 |
-
with col2:
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 244 |
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
|
| 252 |
# Add download button for Student Metrics chart
|
| 253 |
download_chart(student_metrics_fig, "student_metrics_chart.png")
|
|
|
|
| 224 |
st.write(student_metrics_df)
|
| 225 |
|
| 226 |
# Visualization for Student Metrics
|
| 227 |
+
student_metrics_fig = plot_student_metrics(student_metrics_df, attendance_avg_stats, engagement_avg_stats)
|
| 228 |
|
| 229 |
# Compute Student Metric Averages
|
| 230 |
attendance_avg_stats, engagement_avg_stats = compute_average_metrics(student_metrics_df)
|
| 231 |
|
| 232 |
+
# # Two-column layout for the visualization and intervention frequency
|
| 233 |
+
# col1, col2 = st.columns([3, 1]) # Set the column width ratio
|
| 234 |
|
| 235 |
+
# with col1:
|
| 236 |
+
# student_metrics_fig = plot_student_metrics(student_metrics_df, attendance_avg_stats, engagement_avg_stats)
|
| 237 |
|
| 238 |
+
# with col2:
|
| 239 |
+
# # Display the "Attendance Average (%)" text and value
|
| 240 |
+
# st.markdown("<h3 style='color: #358E66;'>Attendance Average (%)</h3>", unsafe_allow_html=True)
|
| 241 |
+
# if attendance_avg_stats is not None:
|
| 242 |
+
# st.markdown(f"<h2 style='color: #358E66;'>{attendance_avg_stats}%</h2>", unsafe_allow_html=True)
|
| 243 |
+
# else:
|
| 244 |
+
# st.markdown("<h2 style='color: #358E66;'>N/A</h2>", unsafe_allow_html=True)
|
| 245 |
|
| 246 |
+
# # Display the "Engagement Average (%)" text and value
|
| 247 |
+
# st.markdown("<h3 style='color: #358E66;'>Engagement Average (%)</h3>", unsafe_allow_html=True)
|
| 248 |
+
# if engagement_avg_stats is not None:
|
| 249 |
+
# st.markdown(f"<h2 style='color: #358E66; margin-top: 0px; margin-bottom: 0px;'>{engagement_avg_stats}%</h2>", unsafe_allow_html=True)
|
| 250 |
+
# else:
|
| 251 |
+
# st.markdown("<h2 style='color: #358E66;'>N/A</h2>", unsafe_allow_html=True)
|
| 252 |
|
| 253 |
# Add download button for Student Metrics chart
|
| 254 |
download_chart(student_metrics_fig, "student_metrics_chart.png")
|