njtr1 is a package that makes it easy to download New Jersey car crash data that is released by the New Jersey Department of Transportation. This package makes it easy to access detailed information on a statewide or county-by-county process that can assist those interested in studying trends in vehicle crashes in New Jersey.

Usage

The main function of this package is get_njtr1(). This function allows you to specify the specific table of NJTR-1 data that you'd like to query for a given year.

There are 5 different tables available with NJTR-1 data and published by the NJDOT. We will take a look at each of them in the following examples.

Accidents

get_njtr1(year = 2019, type = "Accidents")

Drivers

get_njtr1(year = 2019, type = "Drivers")

Vehicles

get_njtr1(year = 2019, type = "Vehicles")

Insurance company data

Each of the vehicle records contain a field name insurance_company_code that identifies the name of the insurance company that covers the vehicle involved in an accident.

This code can be used to join the vehicle data with a dataset containing details for every insurance company that does business in New Jersey.

Access the insurance from the package like so:

data("insurance")
head(insurance)
##   ID_NO                                            NAME              ADDRESS_1
## 1   001 SAMSUNG FIRE AND MARINE INSURANCE COMPANY, LTD.     25 CHALLENGER ROAD
## 2   002            BROTHERHOOD MUTUAL INSURANCE COMPANY            PO BOX 2227
## 3   003                         MID-CENTURY INS COMPANY     4680 WILSHIRE BLVD
## 4   004                  ACE PROPERTY & CASUALTY INS CO       1601 CHESTNUT ST
## 5   005               FIRST NONPROFIT INSURANCE COMPANY 111 NORTH CANAL STREET
## 6   006               EVEREST PREMIER INSURANCE COMPANY  477 MARTINSVILLE ROAD
##      ADDRESS_2 ADDRESS_3            CITY STATE   ZIP              NOTES
## 1         <NA>      <NA> RIDGEFIELD PARK    NJ 07660          COMM ONLY
## 2         <NA>      <NA>      FORT WAYNE    IN 07661          COMM ONLY
## 3         <NA>      <NA>     LOS ANGELES    CA 07662 PRIV PASS AND COMM
## 4 PO BOX 41484      <NA>    PHILADELPHIA    PA 07663          COMM ONLY
## 5    SUITE 801      <NA>         CHICAGO    IL 07664          COMM ONLY
## 6         <NA>      <NA>  LIBERTY CORNER    NJ 07665          COMM ONLY

The insurance dataset contains a field ID_NO which is the same as insurance_company_code in the Vehicles table. This common field can be used for performing join operations.

Pedestrians

get_njtr1(year = 2019, type = "Pedestrians")

Occupants

get_njtr1(year = 2019, type = "Occupants")