The goal of FARSfun is to determine the number of accidents per month in a given year in the United States National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS) data and map these accidents within each state.
Version: 0.1.0 Author: Michael Mahon mahonmb@miamioh.edu
You can install FARSfun from github with:
# install.packages("devtools")
devtools::install_github("mahonmb/FARSfun")
The data to be used in this package can be downloaded from the United States National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS)
Save the data in a folder of your choice, then set your working directory to this folder before beginning with this package.
Setting working directory to be able to use the package correctly (with Windows system).
#Setting working directory to folder location of saved files
setwd("C:/Users/YOURNAME/Documents/FARSdata")
Summarizing the number of fatal accidents per month in 2013.
#Getting summarized information about fata accidents in 2013
fars_summarize_years(2013)
Mapping the number of fatal accidents in Alabama in 2015.
#Mapping locations of accidents in Alabama in 2015
fars_map_state(1,2015)
United States National Highway Traffic Safety Administration. Fatality Analysis Reporting System (FARS). https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.