njtr1: An R package for researching road safety in New Jersey using open crash data
Software Impacts
Abstract
New Jersey law requires police officers to document motor vehicle collisions on a standardized form known as NJTR-1. This paper presents njtr1, an R package that enables road safety and urban planning research in New Jersey by facilitating the easy download, automated cleaning and analysis of the raw crash table data published by the New Jersey Department of Transportation.
Overview
The data collected via the NJTR-1 form contain detailed information about motor vehicle crashes as well as drivers, vehicles and pedestrians involved in crashes, making it a valuable but often underutilized resource for studying road safety in New Jersey.
This paper presents njtr1, an R package that enables road safety and urban planning research in New Jersey by facilitating the easy download, automated cleaning and analysis of the raw crash table data published by the New Jersey Department of Transportation using the R programming language.
Key Features
- Download crash data directly from NJDOT
- Automated data cleaning and normalization
- Support for multiple years of data
- Easy integration with tidyverse workflows
- Geocoding support for mapping crashes
Installation
# Install from CRAN
install.packages("njtr1")
# Or from GitHub for development version
devtools::install_github("gavinrozzi/njtr1")
Impact
The njtr1 package has been used by researchers, transportation planners, and data journalists to analyze road safety patterns across New Jersey, supporting evidence-based policy decisions for improving traffic safety.