Package Description

fars package can pickup some data and plot graphic whit you input arguments from FARS data.FARS is a database which had build by 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.

Require Packages

library(fars) 
library(maps) 

Included data

Data files included within the package:

list.files(system.file("extdata", package = "fars"))

Package Functions

Function make_filename

This function make .csv file names related to the argument year.

yr <- 2013
make_filename(yr)

Function fars_read_years

This function takes a vector of years and produces a list of tibbles,where each tibble is that year's FARS file year and MONTH observations.

yr <- 2015
fars_read_years(yr)

Function fars_summarize_years

This function summarizes yearly accidents data, by month.

#plot(fars_summarize_years(2015))
#fars_summarize_years(c(2015, 2014))

Function fars_map_state

This function provide a plot with a state map including the accidents location by year.

fars_map_state(35, 2013)


hsuzero/fars documentation built on Dec. 20, 2021, 4:51 p.m.