This is the vignette for the 'farsAssignment' package.
The FARS (Fatality Accident Reporting System) data collected by the NTSE provides records fatal accident reports for a given year. The tools in this package enable reading, summarizing and plotting the FARs data for one or several years. The package also includes three years of FARS data.
Each of the FARS data files is in "comma separated value" format. Any of these data sets can be loaded with fars_read() as a data.frame (actually, a tbl_df). The data sets available in this package are:
The NHTSA Fatality Analysis Reporting System data is described here The data contains 50 variables with column names as below:
setwd("..") source("R/fars_functions.R") setwd("..") farsDF2014 <- fars_read(make_filename(2014)) colnames(farsDF2014)
make_filename(2014)
fars_read("accident_2014.csv.bz2")
fars_read_years(list(2013,2014))
fars_summarize_years(list(2013, 2014, 2015))
fars_map_state(1, 2014)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.