Graphs on a map of the USA accidents by State uses data from US National Highway Traffic Safety Administration
This package can be installed using the devtools package as follows:
```{r, eval = FALSE} library(devtools) install_github("tuliobaars/FARSpackage")
# Usage of the FARSpackage
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:
```{r, eval = FALSE}
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.
{r, eval= FALSE}
fars_map_state(state, year)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.