The functions provided in the fars
package facilitate working with 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.
You can install the package from GitHub using the devtools
package:
devtools::install_github("vadimus202/fars")
The package includes sample csv files for 2013-2015 data.
library(fars) library(magrittr) library(knitr) my_file <- system.file("extdata", "fars_data.zip", package = "fars") unzip(my_file, junkpaths = TRUE)
file_name <- make_filename(2015) df <- fars_read(file_name) df %>% head() %>% kable()
fars_summarize_years(2013:2015) %>% kable()
fars_map_state(6,2014)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.