fars_map_state: fars_map_state(): Maps accident data of specific state in a...

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function accepts a specific year and a numeric value of US State. Afterwards, the accident data of that year is read. If the state number is invalid, error msg is displayed. Otherwise, accident out of that given state is filtered out. Further, when no accidents data are available, 'no accidents to plot' is to be shown. Otherwise, accidents data is to be mapped within the state geography.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

Numeric value of US State (Min:1, Max:56)

year

An year of interest in which data to be read (2013-2015)

Value

Displays a plot of state map with accidents data. If there's no accidents in the state, 'no accidents to plot' is printed instead.

Examples

1
2
3
4
## Not run: 
fars_map_state(1,2013)

## End(Not run)

staedi/fars documentation built on Sept. 3, 2020, 8:45 a.m.