← All datasets

NYC Motor Vehicle Crashes

When and where do crashes happen in New York City, why, and who gets hurt?

Rows
91,317 (2024)
Columns
29
Period
2012 → today
Format
CSV from an API

The data

New York City publishes every motor-vehicle crash reported by the NYPD, and updates it every day. A crash is in the table when someone was hurt or killed, or when the damage is above $1,000.

Each row is one crash: date and time, borough, street, coordinates, up to five vehicles with their type and the reason the police gave for the crash, and how many pedestrians, cyclists and motorists were injured or killed.

The full table goes back to 2012 and has more than 2 million rows, which is too big. Take one year (2024 has ~91,000 crashes).

Download

Dataset page (NYC Open Data) ↗Download 2024 only (CSV) ↗

About the format

  • The second button calls the open-data API with a filter on the date, so you get one year as a normal CSV. Change the two dates to get another year.
  • Without $limit, the API gives only the first 1,000 rows. The link already sets it to 200,000.
  • The location column contains line breaks inside the text. pd.read_csv handles it, but Excel and wc -l will show more lines than rows.
import pandas as pd

crashes = pd.read_csv("nyc_collisions_2024.csv")
crashes.shape        # (91317, 29)

Main columns

ColumnWhat it holds
crash_date, crash_timeWhen it happened (two text columns)
borough, zip_codeWhere (borough = Brooklyn, Queens, Manhattan, Bronx, Staten Island)
latitude, longitudePoint on the map
on_street_name, cross_street_name, off_street_nameStreet names
number_of_persons_injured / _killedTotal people hurt or killed
number_of_pedestrians_… / cyclist_… / motorist_…Who was hurt or killed
contributing_factor_vehicle_1 … 5The reason for each vehicle (e.g. Driver Inattention/Distraction)
vehicle_type_code1 … 5Type of each vehicle (Sedan, Taxi, Bike, E-Bike…)

Watch out for

These are hints, not instructions. Check each one in the data, decide what to do, and explain your choice in the notebook.
  • Borough is empty for more than a quarter of the crashes, although most of them still have coordinates. Could the map tell you the borough?
  • Some crashes sit at latitude 0, longitude 0. That point is in the Atlantic Ocean.
  • Street names are written in many ways (PKWY / Parkway, upper and lower case).
  • The first contributing factor is often "Unspecified". Is that a cause, or a missing value?
  • Vehicle types are free text with hundreds of spellings. Group them before you count.
  • Does the total of injured people always equal pedestrians + cyclists + motorists?

Questions to explore

When?

  1. At what hours and on which days do most crashes happen?
  2. Are the most dangerous hours the same as the busiest hours?

Where?

  1. Which boroughs and streets have the most crashes, and the most injuries per crash?
  2. Where are the hot spots on the map?

Why?

  1. What are the most common causes?
  2. Which causes hurt or kill people most often?

Who?

  1. Who is hurt most: pedestrians, cyclists or people in cars? Who is most likely to die?
  2. Which vehicles are involved, and how often is someone injured when a bike or e-bike crashes?

Ideas for the app

  • A map of crashes and of fatal crashes, filtered by borough, month and severity.
  • An hour × weekday heat map of crashes.
  • A page on causes: the most common ones vs the most dangerous ones.
  • A page for road users: pedestrians, cyclists, motorists.
← All datasets