knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(MyPackage18)

Introduction

Some functions are available to read and study data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

Reading the data

The accident data can be read into R using fars_read().

fars_read('../data/accident_2013.csv.bz2')

If the file name of the data is unkown, make_file(year) can be used to get the file path and name. Only 2013 to 2015 are currently available.

make_filename(2013)

Summarising the data

Some useful ways of summarsaring the data are available as functions such as

fars_read_years(2013)
fars_summarize_years(2013)
fars_map_state(1, 2013)


ekawabata/MyPackage18 documentation built on May 18, 2020, 12:03 a.m.