fars_map_state: Plots the location of accidents in a US state in a year

Description Usage Arguments Value Examples

Description

This function reads the 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. Then selects data from a specific state and a specific year and plots the location of the accidents in a map of the state.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A number of a state (numeric, integer or character).

year

A year number (numeric, integer or character).

Value

Plot of a map of the state and the location of the accidents in a year. Error if the introduced year and state aren't numbers. Error if the introduced year doesn't exist (file doesn't exist). Error if the introduced state doesn't exist in the data. Error if the number of accident is zero for given year and state.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_map_state(1,2015)
fars_map_state("1",2015)
fars_map_state(1.00,2015)
fars_map_state(1,"2015")
fars_map_state(1,2015.00)

## End(Not run)

LOT801106/FARS documentation built on May 10, 2019, 2:41 p.m.