Skip to main content
100%

NY Motorcycle Crashes Loading Data

✓ Published0🌍 Public
JJose Morales
Last edited Sep 3, 2025
Created on Sep 3, 2025
Forked from Loading Data

This example demonstrates loading and displaying a subset of NYC motorcycle crash data. The visualization shows the raw dataset as a JSON-formatted list of objects, with each row containing attributes like vehicle make, model, driver sex, and contributing factors. Initially, the view displays “LOADING” before fetching the CSV file and parsing it using `d3.csvParse`. Once loaded, the code converts the `UNIQUE_ID` field to numeric values and re-renders the data via `d3.select` and `join` operations.

AI-generated description

Motorcycle Crash Subset Dataset

This dataset is a subset of the “Motor Vehicle Collisions – Vehicles” dataset available from NYC OpenData.

To create this subset, I filtered the full dataset (approximately 4.42 million rows) to include only motorcycles involved in crashes. I also removed any entries without a listed vehicle model, which reduced the dataset to 223 entries.

While the original dataset contains many more columns, the following are included in this subset:

  • UNIQUE_ID – A unique identifier generated by the NYC record system (sequential ordinal attribute)
  • CRASH_DATE – The date of the crash (temporal attribute)
  • VEHICLE_MAKE – The manufacturer of the motorcycle involved (categorical attribute)
  • VEHICLE_MODEL – The model of the motorcycle involved (categorical attribute)
  • DRIVER_SEX – The gender of the driver (categorical attribute)
  • CONTRIBUTING_FACTOR_1 – A primary factor contributing to the crash (categorical attribute)
  • CONTRIBUTING_FACTOR_2 – A secondary factor contributing to the crash (categorical attribute)
MIT Licensed

Similar vizzes