Overview

This package allows you to easily analyze data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

The specific functions in this package (see below) are designed to be used in reading and analyzing data from the Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes. More details

Make sure that you have downloaded FARS data before running the functions below. The data files should be at the root of your working directory.

# library(dplyr)
# library(readr)
# library(maps)
# library(week4pkg)

make_filename()

Create filenames that look like accident_.csv.bz2

make_filename(2015)

fars_read()

Creates a dataframe from the filename specified.

fars_read("accident_2015.csv.bz2")

fars_read_years()

Creates a dataframe for the years specified.

fars_read_years(2013:2015)

fars_summarize_years()

Summarizes the data for the years specified.

fars_summarize_years(2013:2015)

fars_map_state()

Map locations of accidents

fars_map_state('05', 2015)


engAnt/week4pkg documentation built on May 24, 2019, 8:54 a.m.