fars_map_state: Plot accidents in a state

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Given a state number which matches with state numbers in FARS data, this function draws map of the state overlaid with dots representing accidents.

Usage

1
fars_map_state(state.num, year, fname_transform = identity)

Arguments

state.num

state number (matching with state number in FARS data)

year

year to plot accidents for

fname_transform

Read fars_read_years documentation to find out.

Details

Function throws error if state number is invalid, and does not plot anything if there are no accidents to plot.

Value

draws a plot if inputs are valid, otherwise returns without plotting

Examples

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

## End(Not run)

nirmalpatel/farsdata documentation built on Aug. 7, 2019, 2:55 a.m.