# Hate crimes in New York City: methodology

## Source

- **NYPD Hate Crimes**, NYC Open Data, dataset `bqiq-cu78`.
  Page: https://data.cityofnewyork.us/Public-Safety/NYPD-Hate-Crimes/bqiq-cu78/about_data
  API: `https://data.cityofnewyork.us/resource/bqiq-cu78.json`
  The dataset holds hate crime incidents the NYPD has confirmed. Its data dictionary says it is maintained by the NYPD Detective Bureau's Hate Crimes Unit and updated quarterly.
- **Police Precincts**, NYC Open Data, dataset `y76i-bdw7`, for the map boundaries.

The page asks the API for the full table every time it loads:

```
https://data.cityofnewyork.us/resource/bqiq-cu78.json?$limit=50000&$order=full_complaint_id&$select=full_complaint_id,record_create_date,complaint_year_number,month_number,complaint_precinct_code,county,law_code_category_description,offense_description,pd_code_description,bias_motive_description,offense_category,arrest_id,arrest_date
```

If that request fails or times out after 12 seconds, it uses `data/hate_crimes.json`, a saved copy made by `scripts/build_snapshot.py`. The page footer says which one it is showing.

## Counting

**One hate crime = one complaint ID.** The NYPD's data dictionary says each record is one reported crime, but in practice the file has one row per complaint and arrest. A complaint with three arrests appears three times. On Dec. 1, 2026, the file had 4,575 rows and 4,217 distinct complaint IDs; 262 complaints appeared more than once. Every count on the page is of distinct `full_complaint_id` values. When rows for one complaint repeat, the page keeps the first row's fields (the duplicates differ only in arrest ID and arrest date).

**Dates are report dates.** Each complaint is placed in the month of `record_create_date`, the date the report was filed, not `complaint_year_number`/`month_number`, the date the incident happened. This matches how the NYPD reports its own crime statistics. On Dec. 1, 2026, 47 complaints were filed in a later year than the incident; a few concern incidents from 2015, 2016 and 2018.

**The headline comparison.** The finding compares the latest year's count through the latest month in the file against the average for the same months of the three years before. On Dec. 1, 2026: 480 complaints from January to September 2026 against an average of 453 for January to September of 2023, 2024 and 2025 (412, 535 and 411). (480 − 452.7) ÷ 452.7 = 6 percent. The page recomputes this from whatever data it loads.

**Same months each year.** The "Who was targeted" table cuts every year to January through the latest month in the file by default, so a partial year is not set beside full ones. A button switches to full calendar years.

**Kinds of bias** are the NYPD's `offense_category` field. Age (5 complaints) and disability (2) are combined as "Age or disability." Specific motives are `bias_motive_description`, renamed into plain words (for example, `ANTI-MALE HOMOSEXUAL (GAY)` becomes "Anti-gay (male)"). The NYPD files anti-Asian bias under race or color.

**Offense groups** are built from the NYPD's `pd_code_description` and `offense_description`:

| Group | Rule |
|---|---|
| Aggravated harassment, 1st degree | PD code starts "AGGRAVATED HARASSMENT 1" |
| Aggravated harassment, 2nd degree | PD code starts "AGGRAVATED HARASSMENT 2" |
| Criminal mischief and graffiti | offense starts "CRIMINAL MISCHIEF" |
| Felony assault | offense is "FELONY ASSAULT" |
| Assault, 3rd degree | PD code "ASSAULT 3" or "OBSTR BREATH/CIRCUL" |
| Menacing, threats and terrorism | PD code contains MENACING, TERRORISTIC or TERR (the last catches "SUPP. ACT TERR 2ND", supporting an act of terrorism) |
| Robbery | offense "ROBBERY" |
| Larceny | offense contains LARCENY |
| Harassment | offense "HARRASSMENT 2" |
| Everything else | anything not matched above |

Rules are applied in that order. Felony, misdemeanor and violation come from `law_code_category_description`, the class the NYPD records for each offense code. Each PD code maps to one class in this file (for example, every "ASSAULT 3" is a misdemeanor and every "AGGRAVATED HARASSMENT 1" a felony). State hate crime law (Penal Law 485.10) can raise an offense one level when it is charged as a hate crime, so these classes are not necessarily the charges filed in court. Under each offense group the page states the class mix for the hate crimes shown, computed from this field.

The short legal notes on two groups describe state law: aggravated harassment in the 1st degree (Penal Law 240.31) covers, among other acts, damaging religious property and drawing swastikas on property without permission; aggravated harassment in the 2nd degree (240.30) covers, among other acts, threatening or harassing communications. Harassment in the 2nd degree is a violation, which state law does not count as a crime.

**Arrests.** A complaint counts as having an arrest if any of its rows has an `arrest_id`. Arrest share = complaints with an arrest ÷ all complaints in the group. Arrests can follow a report by months, so shares for recent periods will rise as cases close. On the "By motive" list, motives with fewer than 20 complaints under the current filters are left out.

**Counts or percent of total.** A switch in the filter bar shows shares instead of counts. Each denominator is stated where it is used:

- Monthly chart: share of all hate crimes reported that month (every motive) in the selected borough, or citywide. With no motive filter, the categories in each bar add to 100 percent.
- Motive table: each motive's share of that year's total in the bottom row (same months each year unless that is switched off). The last column is the share of all years combined.
- Precinct list and offense groups: share of the hate crimes shown under the current filters.

Shares under 10 percent show one decimal; shares above zero and under 1 percent show as "<1%". Hovering over any chart, cell or row gives the count and the share together.

**Precinct names** are ordinals, plus the NYPD's names for three Manhattan precincts known by name: Midtown South (14th), Midtown North (18th) and Central Park (22nd).

**Boroughs** come from the `county` field (New York = Manhattan, Kings = Brooklyn, Richmond = Staten Island). On the map, a precinct's borough comes from its number (1 to 34 Manhattan, 40 to 52 the Bronx, 60 to 94 Brooklyn, 100 to 115 Queens, 120 to 123 Staten Island).

## Map

The file gives a precinct, not an address or coordinates, so the precinct is the finest geography available. Counts are raw, not adjusted for population: precincts in Midtown and other busy districts draw far more people by day than live there, and no population figure handles that well. Shading uses five classes cut at the 20th, 40th, 60th and 80th percentiles of precincts with at least one complaint under the current filters; precincts with none are shown in the background gray.

Precinct boundaries were simplified with `scripts/build_precincts.py` (Douglas-Peucker, tolerance 0.00025 degrees, about 25 meters, coordinates rounded to four decimals).

## Checks

On Dec. 1, 2026, every figure the page draws was compared with an independent recount in Python from the live API (`full_complaint_id` de-duplicated, report dates, the same grouping rules): all 93 months of the chart by category, every motive table cell and total, the top 10 precincts and their ranking, every offense group count and arrest share, felony and misdemeanor shares, and arrest shares by year and by motive. The comparison ran under five filter settings (none; race or color in Queens; anti-Black in 2022; full calendar years; the Bronx in 2025), covering 2,484 figures, and all matched. A deliberate mismatch test confirmed the check catches errors. In the percent view, 210 shares were checked against count ÷ stated total, and all matched.

## Limits

- Only confirmed hate crimes are in the file. Incidents the NYPD investigated and did not confirm as bias-motivated are not.
- The data dictionary lists an "Other Motive Description" column that the public file does not include.
- No victim or suspect details, no addresses, no case outcomes beyond whether an arrest was made.
- The NYPD can reclassify complaints after the fact, so counts for past months can change between updates.
- The file starts with reports filed in January 2019.

## Reproducing

```
python3 scripts/build_snapshot.py data/hate_crimes.json
curl -L "https://data.cityofnewyork.us/api/geospatial/y76i-bdw7?method=export&format=GeoJSON" -o precincts_raw.geojson
python3 scripts/build_precincts.py precincts_raw.geojson data/precincts.geojson
```

Both scripts use only the Python standard library.
