knitr::opts_chunk$set(echo = TRUE)
library(fars)
library(readr)
library(dplyr)

External Dataset

The statistics about the accidents are collected and published by the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (NHTSF), which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

More information and the data files can be found on the website

@source https://www.nhtsa.gov/Data/Fatality-Analysis-Reporting-System-(FARS).

There are three data file (‘accident_2013’, ‘accident_2014’ and ‘accident_2015’) in the directory ~/inst/extdata.

They are used for tests, for examples and for show how to work with an dataset.

@Format

The fields of the csv files are shown here.

df <- fars_read( filename = "accident_2015.csv.bz2" )
str(df)

Example

Let's have a look at an output of the first 10 table entries for some fields.

knitr::kable( head(df, 10) )


ap-wi/fars documentation built on May 6, 2019, 4:37 p.m.