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.

fars_summarize_years

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.

fars_read_years

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.

fars_map_state

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.



mikemcclendon/farsfunctions documentation built on May 5, 2019, 5:53 p.m.