The farsfunctions
package assists in reading and summarizing of US Department of Transportation data compiled by the National
Highway Traffic Safety Administration (NHTSA) provided in the Fatality Analysis Reporting System (FARS).
You can install farsfunctions from github with:
# install.packages("devtools")
devtools::install_github("jrwalker-projects/farsfunctions")
fars_summarize_years
reads accident files for one or more years and returns a table with counts of accidents in those years by month
accident_sum_tibble <- fars_summarize_years(2015:2016)
The fars_map_state
function plots a US state map showing the locations of accidents in a given year from available FARS
accident files:
fars_map_state(1, 2016)
Use of these functions is described in the package vignette. For more information on FARS data see the FARS website:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.