knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The fars package makes working with FARS data very easy.
The package includes 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, for the years 2013, 2014 and 2015.
fars_read()
to read .csv files.make_filename()
to get a string with the format name.fars_read_years()
to get a list of data frames.fars_summarize_years()
to get a list of data frames with the data summarized.fars_map_state()
to create a map of fars events given the state and the year.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.