Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

A R package to read, summarize and visualize Fatality Analysis Reporting System (FARS) data from the [National Highway Traffic Safety Administration

License

Notifications You must be signed in to change notification settings

SanjayShetty01/farsfunctions

Repository files navigation

farsfunctions

R-CMD-check

Build Status

The package is to be used for manipulating the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System data, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes. All the operations are done as per the instructions given in the Cousera: Building R Packages Course.

Installation

To load the package. You must first install devtools package from CRAN.

install.packakes('devtools') # installing devtools

devtools::install_github('SanjayShetty01/farsfunctions')

Usage

About the functions,

fars_read : the function can be used to read the .csv.bz2 fileformat into a tibble

make_filename : the function is used to create a name for the accident file based on the year provided.

fars_read_year : This funciton utilizes the make_filename(YEAR) function to turn the years for which data is required into the character format. If a csv file for the given year does not exist the function with produce a warning message and return a NULL

fars_summarize_years : The function returns the monthly number of accident in each months in the years mentioned

fars_map_state : The function visualizes the location of accidents in given state for a given year

Use browseVignettes read the vignette provided in this package.

About

A R package to read, summarize and visualize Fatality Analysis Reporting System (FARS) data from the [National Highway Traffic Safety Administration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages