DAAF-Contribution-Community/daaf / .claude/skills/education-data-source-campus-safety
education-data-source-campus-safety
VerifiedCSS — annual Clery Act crime/fire safety for Title IV institutions. Portal: hate crimes only (2005-2021); primary offenses, VAWA, arrests, fire safety need ope.ed.gov directly. Use for campus crime analysis. Identified by IPEDS unitid.
Campus Safety Data Source Reference
Campus Safety and Security (CSS) — annual Clery Act crime and fire safety reporting for all Title IV postsecondary institutions. Full dataset covers primary offenses, VAWA offenses, hate crimes, arrests/referrals, and fire safety. Portal mirror provides only hate crimes data (2005-2021); primary offenses, VAWA, arrests, and fire safety require direct access to ope.ed.gov/campussafety. Use when analyzing campus hate crimes via Portal or understanding Clery Act reporting structure. Identified by IPEDS unitid. Hazing statistics were added by Pub. L. 118-173 (applies to annual security reports from calendar year 2026 onward, per the Act's 2-years-after-enactment effective-date provision); they are not in the Portal mirror.
Guide to understanding and using campus crime and fire safety data collected under the Clery Act.
CRITICAL: Value Encoding
The Education Data Portal mirrors use integer codes for categorical variables, not string labels:
Variable Example Code Meaning bias1Race-based bias crime_type13Intimidation fips6California See
./references/variable-definitions.mdfor complete code mappings.
Truth Hierarchy: When interpreting variable values, apply this priority:
- Actual data file (what you observe in the parquet/CSV) -- this IS the truth
- Live codebook (.xls in mirror) -- authoritative documentation, may lag
- This skill documentation -- convenient summary, may drift from codebook
If this documentation contradicts the codebook, trust the codebook. If the codebook contradicts observed data, trust the data and investigate. Use
get_codebook_url()fromfetch-patterns.mdto download codebooks.Codebook coverage gap (verified 2026-08-07): the mirrored csafety
.xlscodebook documents only 7 of the 13 data columns — thebiascategory and the 6 geographic offense counts — and omitscrime_type,year,unitid,inst_name,opeid, andfips. For those 6 omitted columns the codebook is silent, so this skill's own data-verified variable documentation (see./references/variable-definitions.md) is the better authority; the "trust the codebook" step above applies only to columns the codebook actually covers.
What is Campus Safety and Security Data?
The Campus Safety and Security (CSS) data comes from the annual survey required by the Jeanne Clery Campus Safety Act (renamed by Pub. L. 118-173, Dec. 23, 2024; formerly the Jeanne Clery Disclosure of Campus Security Policy and Campus Crime Statistics Act):
- Federal mandate: All Title IV institutions must report crime and fire statistics annually
- Consumer protection: Designed to inform students, parents, and employees about campus safety
- Primary source: U.S. Department of Education Office of Postsecondary Education
- Coverage: All postsecondary institutions receiving federal financial aid
- Reporting period: Calendar year (January 1 - December 31) in which the crime was reported (34 CFR 668.46(c)(3)); the Portal
yearis that calendar year - Available years: 2005-2021 (hate crimes in Portal mirrors)
- Primary identifier:
unitid(IPEDS institution ID, 6-digit integer) - Official portal: https://ope.ed.gov/campussafety/
- Portal mirror coverage: Hate crimes only. For primary offenses, VAWA, arrests, and fire safety, access the Department of Education portal directly.
Reference File Structure
| File | Purpose | When to Read |
|---|---|---|
clery-act.md | Legal framework, history, reporting requirements | Understanding compliance context |
crime-categories.md | Criminal offenses, definitions, classification rules | Interpreting crime statistics |
vawa-offenses.md | Dating violence, domestic violence, stalking | Analyzing gender-based violence data |
hate-crimes.md | Bias categories, additional offenses, classification | Working with hate crime statistics |
campus-geography.md | On-campus, residence halls, public property, noncampus | Understanding location categories |
fire-safety.md | Fire statistics, safety systems, HEOA requirements | Analyzing residential fire data |
arrests-referrals.md | Drug, alcohol, weapons violations | Working with disciplinary data |
variable-definitions.md | Key variables, data structure, identifiers | Building queries |
limitations.md | Underreporting, comparability issues, interpretation | Critical data analysis |
Decision Trees
What type of crime data do I need?
Crime data type?
├─ Violent crimes (murder, assault, robbery, sex offenses)
│ └─ See ./references/crime-categories.md
├─ Property crimes (burglary, motor vehicle theft, arson)
│ └─ See ./references/crime-categories.md
├─ Sex offenses (rape, fondling, incest, statutory rape)
│ └─ See ./references/crime-categories.md
├─ Dating/domestic violence, stalking
│ └─ See ./references/vawa-offenses.md
├─ Hate crimes (bias-motivated)
│ └─ See ./references/hate-crimes.md
├─ Drug/alcohol/weapons violations
│ └─ See ./references/arrests-referrals.md
└─ Fire incidents in residence halls
└─ See ./references/fire-safety.md
Where did the crime occur?
Understanding crime location?
├─ On-campus (main campus buildings/grounds)
│ └─ See ./references/campus-geography.md
├─ On-campus student housing (subset of on-campus)
│ └─ See ./references/campus-geography.md
├─ Public property (streets, sidewalks adjacent to campus)
│ └─ See ./references/campus-geography.md
├─ Noncampus (off-site but institution-controlled)
│ └─ See ./references/campus-geography.md
└─ Not sure which category
└─ See ./references/campus-geography.md (definitions section)
Can I compare schools?
Planning institutional comparisons?
├─ Want to rank schools by safety
│ └─ See ./references/limitations.md (CRITICAL: comparability issues)
├─ Comparing similar institution types
│ └─ See ./references/limitations.md (controlling for factors)
├─ Analyzing trends over time
│ └─ See ./references/limitations.md (reporting changes)
└─ Understanding what statistics mean
└─ See ./references/limitations.md (interpretation guidance)
Quick Reference: Crime Categories
Crime Type Codes (Portal Integer Encoding)
Labels are the Portal variable-metadata labels for endpoint 130 (fetched 2026-10-19). The era column records which codes were observed in the UC Berkeley (unitid 110635) 2010/2016 Portal probes; it is an observation, not a documented rule.
| Code | Portal label | Category | Observed in UC Berkeley 2010/2016 Portal probes |
|---|---|---|---|
1 | Murder | Criminal offense | 2010 and 2016 |
2 | Rape | Sex offense (2014+ category) | 2016 only |
3 | Fondling | Sex offense (2014+ category) | 2016 only |
4 | Aggravated Assault | Criminal offense | 2010 and 2016 |
5 | Incest | Sex offense (2014+ category) | 2016 only |
6 | Statutory Rape | Sex offense (2014+ category) | 2016 only |
7 | Robbery | Criminal offense | 2010 and 2016 |
8 | Burglary | Criminal offense | 2010 and 2016 |
9 | Motor Vehicle Theft | Criminal offense | 2010 and 2016 |
10 | Arson | Criminal offense | 2010 and 2016 |
11 | Simple Assault | Hate crime only | 2010 and 2016 |
12 | Larceny | Hate crime only | 2010 and 2016 |
13 | Intimidation | Hate crime only | 2010 and 2016 |
14 | Destruction, Damage, or Vandalism | Hate crime only | 2010 and 2016 |
15 | Forcible Sex Offense | Sex offense (pre-2014 category) | 2010 only |
16 | Neglient Manslaughter [sic] (negligent manslaughter) | Criminal offense | 2010 only |
17 | Nonforcible Sex Offense | Sex offense (pre-2014 category) | 2010 only |
18 | Body Injury | Undocumented | Not observed |
Note: Crime type code
99(Total) is documented in some references but does NOT appear in the actual Portal mirror data. The data contains individual crime types 1-18 only. VAWA offenses (domestic violence, dating violence, stalking) are not in the hate-crimes file and have nocrime_typecode.crime_type == 16is negligent manslaughter; it appeared in the 2010 probe but not the 2016 probe. The 2019 CSS hate-crime form has no negligent-manslaughter item, although 34 CFR 668.46(c)(1)(iii)(A) includes negligent manslaughter among hate-crime-reportable offenses. On the pinned mirror (HF revision0ad00ce0, probed 2026-10-28), code 16 rows occur only in years 2005-2013 and in no year from 2014 on, and no code-16 row in any year has a positivetotal_hate_crimes.
Bias Category Codes (Portal Integer Encoding)
Portal labels as above; the parenthesized meanings come from matching Portal 2017 rows to UC Berkeley's CY2017 Annual Security Report hate-crime table. Code order 1-8 matches the column order of ED's CSS hate-crime form (Race, Religion, Sexual orientation, Gender, Gender Identity, Disability, Ethnicity, National Origin; 2019 CSS form), and code 2 = Religion also matched UC Riverside CY2015 and CY2016 ASR rows. Row-level Portal/ASR disagreements occur (UC Berkeley CY2016: two bias codes; LSU CY2017: one on-campus intimidation hate crime absent from the Portal); treat these as institution submission or revision differences, not a code change.
| Code | Portal label | Meaning | Observed in UC Berkeley 2010/2016 Portal probes |
|---|---|---|---|
1 | Race | Race | 2010 and 2016 |
2 | Religion | Religion | 2010 and 2016 |
3 | Sex | Sexual orientation (ASR match) | 2010 and 2016 |
4 | Gender | Gender | 2010 and 2016 |
5 | Gender Identity | Gender identity | 2016 only |
6 | Disability | Disability | 2010 and 2016 |
7 | Ethnicity | Ethnicity (ASR match) | 2016 only |
8 | Nationality | National origin (ASR match) | 2016 only |
9 | Ethnicity (Pre 2014) | Pre-2014 ethnicity category | 2010 only |
99 | Total | All bias categories combined | 2010 and 2016 |
VAWA 2013 (Pub. L. 113-4) added national origin and gender identity to the statutory bias categories (ethnicity was already listed). The Portal carries pre-2014 ethnicity as code 9 and post-2014 ethnicity/national origin as codes 7/8 — do not splice 9 with 7 without documenting the break.
VAWA Offenses (full CSS data only; not in the Portal mirror)
| Offense | Definition |
|---|---|
| Domestic Violence | Violence by current/former spouse, cohabitant, or similar |
| Dating Violence | Violence by person in romantic/intimate relationship |
| Stalking | Course of conduct causing fear for safety |
VAWA 2013 (Pub. L. 113-4) required good-faith reporting of these offenses starting with calendar-year 2013 statistics in the October 1, 2014 ASR; the final regulations (79 FR 62752, Oct. 20, 2014) took effect July 1, 2015. See ./references/vawa-offenses.md.
Hate Crime-Only Offenses
Codes 11-14 (Simple Assault, Larceny, Intimidation, Vandalism) are hate-crime-only offenses. They are not standalone Clery crimes unless bias-motivated.
Arrests and Disciplinary Referrals
| Category | What's Counted |
|---|---|
| Liquor Law Violations | Arrests + Disciplinary referrals |
| Drug Law Violations | Arrests + Disciplinary referrals |
| Weapons Violations | Arrests + Disciplinary referrals |
Key Identifiers (Hate Crimes Dataset)
| ID | Format | Level | Example | Notes |
|---|---|---|---|---|
unitid | 6-digit integer | Institution | 100654 | IPEDS institution ID |
opeid | 8-character String | Institution | 00100200 | OPE institution ID (126 nulls in data) |
inst_name | String | Institution | University of Alabama | Institution name |
fips | Integer | State | 6 | State FIPS code |
Note: The hate crimes dataset uses
inst_name(notinstnm). Columns likebranch,address,city,zip,state,sector,enrollmentare NOT present in the Portal mirror data. Join with IPEDS directory onunitidto obtain institutional characteristics.
Geographic Categories
| Location | Definition | Reported Separately? |
|---|---|---|
| On-Campus | Buildings/property owned/controlled by institution, reasonably contiguous | Yes |
| On-Campus Student Housing | Residence halls (subset of on-campus) | Yes (as subset) |
| Noncampus | Institution-owned/controlled property not contiguous; student org properties | Yes |
| Public Property | Streets, sidewalks, parking within or immediately adjacent to campus | Yes |
Fire Safety Data
Fire data is reported only for on-campus student housing facilities:
| Data Element | Description |
|---|---|
| Number of fires | Total fires per building per year |
| Cause of fire | Intentional, unintentional, undetermined |
| Injuries | Fire-related injuries requiring treatment |
| Deaths | Fire-related fatalities |
| Property damage | Estimated dollar value |
| Fire safety systems | Sprinklers, alarms, smoke detectors, etc. |
Missing Data Codes
| Code | Meaning | When Used |
|---|---|---|
null | Missing/not reported | Data not submitted or not applicable (e.g., 352k null values in bias column) |
0 | Zero incidents | Explicitly reported as zero (distinct from missing) |
Empirically verified: The hate crimes dataset in the Portal mirror does NOT use
-1,-2, or-3coded values. All missing data appears asnull. This differs from some other Portal datasets (e.g., CCD) that use negative integer codes. Always verify against the actual data.
Data Access
Datasets for Campus Safety are available via the mirror system. See datasets-reference.md for canonical paths, mirrors.yaml for mirror configuration, and fetch-patterns.md for fetch code patterns.
| Dataset | Type | Years | Path | Codebook |
|---|---|---|---|---|
| Hate Crimes | Single | 2005-2021 | csafety/colleges_csafety_hate_crimes | csafety/codebook_colleges_csafety_hate_crimes |
CRITICAL: Limited Data in Portal Mirrors -- Only hate crimes data is available in the Portal mirrors (1 dataset). For other campus safety data (primary offenses, VAWA, arrests/referrals, fire safety), access the Department of Education directly at https://ope.ed.gov/campussafety/. Consult
datasets-reference.mdfor the authoritative list of available mirror datasets.
Codebooks are .xls files co-located with data in all mirrors. Use get_codebook_url() from fetch-patterns.md to construct download URLs:
url = get_codebook_url("csafety/codebook_colleges_csafety_hate_crimes")
# get_codebook_url() is a Python helper; in R, build the URL from the mirror root.
# Mirror failover: see `education-data-query/references/fetch-patterns.md` (R pattern)
mirror <- yaml::read_yaml("mirrors.yaml")$mirrors[[1]]
url <- paste0(mirror$root_url, "/", mirror$vintage$hf_revision, "/", "csafety/codebook_colleges_csafety_hate_crimes", ".xls")
Fetching Data
Use the fetch_from_mirrors() pattern from fetch-patterns.md:
import polars as pl
# Fetch hate crimes data (all years, single-file dataset)
df = fetch_from_mirrors("csafety/colleges_csafety_hate_crimes")
# Filter by year
df_2021 = df.filter(pl.col("year") == 2021)
# Filter by bias category (1 = Race)
race_crimes = df.filter(pl.col("bias") == 1)
# Filter by crime type (13 = Intimidation)
intimidation = df.filter(pl.col("crime_type") == 13)
# Filter by institution
institution = df.filter(pl.col("unitid") == 100654)
# Filter by state FIPS code (6 = California)
california = df.filter(pl.col("fips") == 6)
# R equivalent
library(arrow)
library(dplyr)
# fetch_from_mirrors() is a Python helper; in R, build the URL from the mirror
# root — the canonical path is NOT a local file. Mirror failover: see
# `education-data-query/references/fetch-patterns.md` (R pattern)
mirror <- yaml::read_yaml("mirrors.yaml")$mirrors[[1]]
# NOTE: illustrative only — mirror parquet files are Polars-written and may
# declare string_view columns, so a plain read can fail under R arrow
# ("cannot handle Array of type <utf8_view>"). Real fetch scripts must use the
# view-safe parquet read from `education-data-query/references/fetch-patterns.md`.
df <- read_parquet(paste0(mirror$root_url, "/", mirror$vintage$hf_revision, "/",
"csafety/colleges_csafety_hate_crimes", ".", mirror$format))
# Filter by year
df_2021 <- df |> filter(year == 2021)
# Filter by bias category (1 = Race)
race_crimes <- df |> filter(bias == 1)
# Filter by crime type (13 = Intimidation)
intimidation <- df |> filter(crime_type == 13)
# Filter by institution
institution <- df |> filter(unitid == 100654)
# Filter by state FIPS code (6 = California)
california <- df |> filter(fips == 6)
Direct from Department of Education (Non-Mirror Data)
For data NOT available in Portal mirrors (primary offenses, VAWA, arrests, fire safety):
- Web tool: https://ope.ed.gov/campussafety/
- Bulk download: Available through Campus Safety website
- Custom reports: Generate by institution, state, or sector
Common Pitfalls
| Pitfall | Issue | Solution |
|---|---|---|
| Using string codes | Portal uses integer codes for bias, crime_type, etc. | Always map integers via ./references/variable-definitions.md |
| Ranking schools by crime counts | Higher numbers may indicate better reporting, not worse safety | Normalize by enrollment; note reporting culture differences in ./references/limitations.md |
| Comparing across years naively | Crime definitions changed over time (VAWA 2013: CY2013–2014 statistics transitional, final-rule definitions from CY2015; Portal crime_type/bias codes differ between pre-2014 and 2014+ rows) | Restrict comparisons to consistent-definition periods; document breaks |
Summing total_hate_crimes | Appears to add the residence-hall subset to on-campus (double-counting housing incidents — verified against UC Berkeley CY2016–2017 and UC Riverside CY2015 ASRs) | Recompute as on_campus + non_campus + public_property (+ other) |
| Treating zero as missing | Zero means explicitly reported zero incidents; missing means not reported | Check for null (missing) vs 0 (zero incidents) before analysis |
| Comparing CSS to FBI UCR data | Different definitions, scope, and reporting requirements | Never equate CSS and FBI statistics; see ./references/limitations.md |
| Assuming all crime data in mirror | Mirror only has hate crimes | Use Department of Education portal for primary offenses, VAWA, arrests, fire safety |
Using instnm as column name | Hate crimes data uses inst_name, not instnm (which is the IPEDS convention) | Check actual column names with df.columns |
Expecting -1/-2 missing codes | Hate crimes data uses null for missing, not negative integer codes | Check for nulls with pl.col("bias").is_null(), not pl.col("bias") == -1 |
| Assuming one row per unitid × year × crime_type × bias | Observed on the pinned mirror (Portal v0.26.1, HF revision 0ad00ce0, probed 2026-10-27): 5,994,330 of the file's 15,230,698 rows are exact duplicates, with up to 128 copies of one key. After dropping exact duplicates, 7,530 keys at 795 institutions still have 2-4 rows with differing counts (e.g., UC Riverside, unitid 110671, 2017-2020; its 2021 duplicates are all exact). opeid and inst_name do not distinguish them, and there is no branch or campus column. Before dedup, the number of duplicated keys rises about tenfold between 2008 (8,860) and 2009 (84,903). The Portal API showed the same multi-row keys for UC Berkeley 2016 and UC Riverside 2017 | Drop exact duplicate rows first (this would also merge two genuine rows that happen to report identical counts). For the multi-row keys that remain, do not apply a sum or max by default: the mirror cannot tell a second campus from a duplicated record. Inspect the affected institutions (Annual Security Reports, or the full CSS download per ./references/campus-geography.md), decide, and state the rule as an analytic assumption. These counts are a mirror observation, not documented Portal behavior |
| Ignoring underreporting | Many crimes go unreported; CSS captures only reported incidents | Acknowledge underreporting as a limitation in all analyses |
Reporting Timeline
| Date | Action |
|---|---|
| Calendar year | Data collection period |
| October 1 | Annual Security Report (ASR) due |
| Date set annually by ED | CSS web-survey submission (34 CFR 668.41(e)(5)) |
| Following spring | Data available publicly |
Related Data Sources
| Source | Relationship | When to Use |
|---|---|---|
education-data-source-ipeds | Institutional characteristics | Joining with IPEDS directory for enrollment, sector, control |
education-data-explorer | Parent discovery skill | Routing questions to mirror dataset files |
education-data-query | Data fetching | Downloading parquet/CSV files |
Topic Index
| Topic | Reference File |
|---|---|
| Clery Act history and requirements | ./references/clery-act.md |
| Criminal offense definitions | ./references/crime-categories.md |
| Sex offense classification | ./references/crime-categories.md |
| VAWA amendments | ./references/vawa-offenses.md |
| Dating violence definition | ./references/vawa-offenses.md |
| Domestic violence definition | ./references/vawa-offenses.md |
| Stalking definition | ./references/vawa-offenses.md |
| Hate crime bias categories | ./references/hate-crimes.md |
| Hate crime offenses | ./references/hate-crimes.md |
| On-campus definition | ./references/campus-geography.md |
| Residence hall reporting | ./references/campus-geography.md |
| Public property definition | ./references/campus-geography.md |
| Noncampus property | ./references/campus-geography.md |
| Fire statistics | ./references/fire-safety.md |
| Fire safety systems | ./references/fire-safety.md |
| Arrests vs referrals | ./references/arrests-referrals.md |
| Drug/alcohol violations | ./references/arrests-referrals.md |
| Weapons violations | ./references/arrests-referrals.md |
| Variable names and codes | ./references/variable-definitions.md |
| Underreporting issues | ./references/limitations.md |
| Institutional comparisons | ./references/limitations.md |
| Trend analysis caveats | ./references/limitations.md |
| Data interpretation | ./references/limitations.md |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |