njtr1: An R package for researching road safety in New Jersey using open crash data

  • Journal Article
  • Software Impacts
  • Gavin Rozzi

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.

A New Jersey heat map with high crash density concentrated in the northeast and around Camden
Density of geotagged motor vehicle crashes in New Jersey in 2019. Figure 1 · Gavin C. Rozzi · CC BY-NC-ND 4.0

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

Package availability

CRAN archived njtr1 in April 2025. The source is available on GitHub.

# install.packages("devtools")
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.

Keywords: r, transportation, data-science, open-source, gis

Related Expertise

About the Author

Gavin Rozzi

Gavin Rozzi

I lead an in-house civic technology team in New Jersey state government. I write here about data science, software built for government, and how policy gets turned into working systems.

Back to Publications