Skip to contents

Downloads incident data from SPR database.

Usage

fetch_violence_vandalism_hib(
  end_year,
  level = "school",
  with_status = FALSE,
  with_denominator = FALSE
)

Arguments

end_year

A school year (2017-2025)

level

One of "school" or "district"

with_status

Logical, default FALSE. If TRUE, appends value_status, classified from the raw incidents-per-100-students rate token before numeric coercion.

with_denominator

Logical, default FALSE. If TRUE, appends n_students from the matching total-enrollment row in fetch_enr on end_year and CDS identifiers. Unmatched rows remain NA.

Value

Data frame with incident counts

The 2025 hib and incidents_per_100_students labels are harmonized to harassment_intimidation_bullying_hib and incidents_per_100_students_enrolled. Columns have a fixed order. school_year is filtered to the requested year and then removed.

Examples

if (FALSE) { # \dontrun{
incidents <- fetch_violence_vandalism_hib(2024)
} # }