fars_map_state: Create map with Fatality Analysis Reporting System data

Description Usage Arguments Value Note Examples

Description

This function creates a map with fatalities in motor vehicle crashes for a specific year and state. The function fails if an invalid year or state is passed as input.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric value with the state number to plot

year

A numeric value with the year for which the data will be plotted.

Value

Plots a map with points marking the locations of accidents.

Note

The csv files with the data need to be downloaded previously from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System website (https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars)

Examples

1
## Not run: fars_map_state(3, 2015)

rafaelcb/FARS documentation built on May 12, 2019, 2:03 p.m.