This package can be installed using the devtools package as follows:
library(devtools) install_github("josealburgos/CourseraPackage")
This package is intended to graph information from 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. This package shows fatalities by state.
Data can be downloaded from [https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars].
One way to use this package is to save your downloaded files into your working directory as follows:
setwd("file path here")
There are two main formulas in this package:
The first formula summarizes fatalities by year and month. The second formula displays fatalities in a map, depending of the state and year selected. The following code will map fatalities for a selected year and for selected states.
fars_map_state(state, year)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.