This package is intended to read in and visualize incidents from the National Highway Traffic Safety Administration (NHTSA) Fatality Analysis Reporting System (FARS) data. The package contains five functions. However, 3 are of primary use for interrogating data. Those will be explained below. Please note: package assumes FARS data files in the standard format and naming convention are available in the user's working directory.
This function returns a monthly summary of incidents. It takes a year in the form of an integer or string as an argument and then uses that value to read in a CSV as a tbl_df for data of that given year and and returns a monthly summary of the observations. Usage below.
This function returns the month and year corresponding to each FARS observation. It takes a year in the form of an integer or string as an argument and then uses that value to read in a CSV as a tbl_df for data of that given year and returns the month and year corresponding to each observation.
Return a map plot of incidents. This is a function that takes a state number and year in the form of an integer or string as an argument and then uses that value to generate a map plot of observations for that state and year.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.