R-CMD-check

njtr1 is an R package that provides provides an interface to easily download car crash records maintained by the New Jersey Department of Transportation. These records are collected from police officers in New Jersey when they complete the form NJTR-1 following a motor vehicle crash that is reported to law enforcement.

This package allows for the download of multiple tables of crash records and cleans and formats the data for analysis.

More details about the NJTR-1 crash reporting process is available through the New Jersey Department of Transportation.

This package currently provides data from 2017 - 2019. We are currently working on implementing the format of the older data from 2016 prior.

Installation

The latest development version can be installed like so using devtools:

devtools::install_github("gavinrozzi/njtr1")

Usage

# Load the njtr1 library into R
library(njtr1)

# Get crash data for the year 2019
get_njtr1(year = 2019, type = "Accidents")

# Get vehicle data for the year 2019
get_njtr1(year = 2019, type = "Vehicles")

# Get driver data for the year 2019
get_njtr1(year = 2019, type = "Drivers")

# Get occupant data for the year 2019
get_njtr1(year = 2019, type = "Occupants")

# Get pedestrian data for the year 2019
get_njtr1(year = 2019, type = "Pedestrians")

Documentation

Documentation for the current release is available here. See the reference section for full details on how to use each of the functions provided by njtr1.