ProfessorLeVesseur
commited on
Commit
•
35c3293
1
Parent(s):
4888d37
Update data_processor.py
Browse files- data_processor.py +17 -17
data_processor.py
CHANGED
@@ -308,15 +308,15 @@ class DataProcessor:
|
|
308 |
|
309 |
# Store metrics in the required order
|
310 |
student_metrics[student_name] = {
|
|
|
|
|
311 |
'Attendance (%)': attendance_pct,
|
312 |
-
'Attendance #': sessions_attended,
|
313 |
'Engagement (%)': engagement_pct,
|
314 |
'Engaged (%)': engaged_pct,
|
315 |
'Partially Engaged (%)': partially_engaged_pct,
|
316 |
'Not Engaged (%)': not_engaged_pct,
|
317 |
-
'Absent (%)': absent_pct
|
318 |
-
'Attended ≥ 90%': attended_90,
|
319 |
-
'Engagement ≥ 80%': engaged_80
|
320 |
}
|
321 |
|
322 |
# Create a DataFrame from student_metrics
|
@@ -342,16 +342,16 @@ class DataProcessor:
|
|
342 |
return "Address Engagement"
|
343 |
return "Consider addressing logistical barriers, improving fidelity, and/or collecting progress monitoring data"
|
344 |
|
345 |
-
def build_tree_diagram(self, row):
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
|
|
308 |
|
309 |
# Store metrics in the required order
|
310 |
student_metrics[student_name] = {
|
311 |
+
'Attended ≥ 90%': attended_90,
|
312 |
+
'Engagement ≥ 80%': engaged_80,
|
313 |
'Attendance (%)': attendance_pct,
|
314 |
+
# 'Attendance #': sessions_attended,
|
315 |
'Engagement (%)': engagement_pct,
|
316 |
'Engaged (%)': engaged_pct,
|
317 |
'Partially Engaged (%)': partially_engaged_pct,
|
318 |
'Not Engaged (%)': not_engaged_pct,
|
319 |
+
'Absent (%)': absent_pct
|
|
|
|
|
320 |
}
|
321 |
|
322 |
# Create a DataFrame from student_metrics
|
|
|
342 |
return "Address Engagement"
|
343 |
return "Consider addressing logistical barriers, improving fidelity, and/or collecting progress monitoring data"
|
344 |
|
345 |
+
# def build_tree_diagram(self, row):
|
346 |
+
# dot = Digraph()
|
347 |
+
# dot.node("Q1", "Has the student attended ≥ 90% of interventions?")
|
348 |
+
# dot.node("Q2", "Has the student been engaged ≥ 80% of intervention time?")
|
349 |
+
# dot.node("A1", "Address Attendance", shape="box")
|
350 |
+
# dot.node("A2", "Address Engagement", shape="box")
|
351 |
+
# dot.node("A3", "Consider addressing logistical barriers", shape="box")
|
352 |
+
# if row["Attended ≥ 90%"] == "No":
|
353 |
+
# dot.edge("Q1", "A1", label="No")
|
354 |
+
# else:
|
355 |
+
# dot.edge("Q1", "Q2", label="Yes")
|
356 |
+
# dot.edge("Q2", "A2" if row["Engagement ≥ 80%"] == "No" else "A3", label="Yes")
|
357 |
+
# return dot
|