title: "Fatality Analysis Reporting System (FARS)"
author: "Savinay Sehgal"
date: "r Sys.Date()
"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Vignette Title}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
Week4BuildingRPackages
package reads and plots Fatality Analysis Reporting System data from the [US National Highway Traffic Safety Administration]
[FARS] is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes
library(Week4BuildingRPackages) library(maps) library(tidyr) library(magrittr) library(dplyr) library(readr)
Data files included within the package are:
list.files(system.file("extdata", package = "Week4BuildingRPackages"))
make_filename
This function makes a file in CSV format which is related to the given year:
yr <- 2013 make_filename(yr)
fars_read_years
This function takes an input as years and then filters the information for that given list
fars_read_years(2013)
fars_summarize_years
This function takes an input as years and then summarizes the information for that given list
fars_summarize_years(2013)
fars_map_state
This function takes an input as year and state.num. It then display that information in graphical format
state_num <- 1 yr <- 2013 fars_map_state(state_num, yr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.