fars_map_state: Generate a graphical map of accident data for a U.S. state

Description Usage Arguments Details Value Examples

Description

This is a function that creates a graphical map of highway accidents given a state number and year

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

a string or integer representing the position of a state in alphabetical order. One of the states in the R standard dataset state.names

year

a string or integer representing the year for which to load highway accidents.

Details

If a accident file with standard naming convention is not in currect working, a "invalid year" warning is generated. If state.num is not between 0 and 50, a "invalid STATE number" error is thrown. If a particular state had 0 accident records for a given year, a "invalid STATE number" error is thrown.

Value

a graphical map with points for individual highway accidents

Examples

1
2
3
4
5
## Not run: 
fars_map_state(1,1990)
fars_map_state("1","1990")

## End(Not run)

tcoopermont/fars documentation built on May 31, 2019, 7:29 a.m.