Downloads discipline data (suspensions/expulsions/removals) from the SPR database, broken down by student group and grade level.
Usage
fetch_disciplinary_removals(
end_year,
level = "school",
with_status = FALSE,
with_denominator = FALSE,
with_subgroup_std = FALSE
)Arguments
- end_year
A school year (2018-2025). SY2016-17 (end_year 2017) has no discipline-removals sheet in the SPR database.
- level
One of "school" or "district"
- with_status
Logical, default
FALSE. IfTRUE, appendsvalue_status, classified from the raw primary suspension-rate token before numeric coercion.- with_denominator
Logical, default
FALSE. IfTRUE, appendsn_studentsfrom the matching total-enrollment row infetch_enronend_yearand CDS identifiers. Unmatched rows remainNA.- with_subgroup_std
Logical, default
FALSE. IfTRUEand the source has a student-group/grade label, appends normalizedsubgroup,subgroup_std, andgrade_leveldetail.
Value
Data frame with disciplinary actions. Includes a
student_group_grade column identifying the student group / grade
row, plus suspension, removal, and expulsion counts and percentages.
The 2024 number_students_* and percent_students_* labels are harmonized to the legacy count and pct names. Student-group/grade detail begins in 2024 and is NA earlier. Arrest counts, arrest percentages and school_days_missed_oss are not published in the 2024-2025 sheets and are NA. Text tokens are preserved. school_year is filtered to the requested year and then removed.