knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This package was generated an example of an R package for a "Building R packages" course.
FARS is a nationwide census providing NHTSA, Congress and the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.
The FARS package wraps the FARS dataset for the years 2013-2015 and provides some basic functionality to generate geographical maps plotting the locations of accidents per year and US state.
Below is a brief summary of amount of available functionality of the package, first a summary of all available datasets, followed by an example of how to make a plot
library(FarsPackage)
2013 Dataset
fars_summarize_years(list(2013))
2014 Dataset
fars_summarize_years(list(2013))
2015 Dataset
fars_summarize_years(list(2013))
Plot example, showing accident data for 2014 for Alabama (the 1st state alphabetically)
fars_map_state(1, 2014)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.