knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(farspackage) library(dplyr) library(tidyr) library(knitr)
This package read, summarize and plott data from the plotting out data from the "Fatality Analysis Reporting System" project.
To read data from a particular year, run:
fars_data <- fars_read_years(2015)
To summarize and view the accidents from 2013 to 2015:
knitr::kable(fars_summarize_years(years = c(2013:2015)))
To plot the locations of the accidents in a year:
```r fars_map_state(12, 2014)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.