Package Description

The package reads in data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS). It provides summaries of the data by months and maps the distribution of accidents per state.

Included data

Data files included within the package are:

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

Package Functions

Function fars_read

This function reads in csv data.

Function make_filename

This is a function that returns a filename in the format "accident_year.csv.bz2", where you can specify the year.

make_filename(2013)

Function fars_read_years

This is a function that reads in FARS data by using as an input the year.

fars_read_years(2013)

Function fars_summarize_years

This function summarizes "FARS" data per month in a given year, that is specifid in the input.

fars_summarize_years(2013)

Function fars_map_state

This function plots the geographical boundaries of a state and the distribution of reported accidents within the state.

state_num <- 18 
yr <- 2013
fars_map_state(state_num, yr)


MvT19/Fars documentation built on June 18, 2019, 7:57 a.m.