knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(MyPackage18)
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.
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.