fars_map_state: plot fars data on map.

Description Usage Arguments Details Note Examples

Description

fars_map_state maps fars data for each year and to a state

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

integer referencing a state.

year

An integer, or a string

Details

takes a state number and a year, and creates a map image plotting the fars data point by long and lat, require mapdata package.

Note

If the state.num provided is not in the FARS file, an error is produced.

If there are no fatal crashes for the state and year, a message is provided.

LONGITUD values > 900 are set to NA, LATITUDE values > 90 are set to NA

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
fars_map_state(22, 2015)

## End(Not run)

## Not run: 
fars_map_state(1066, 0)   # error

## End(Not run)

Gregorypi/fars documentation built on May 23, 2019, 1:25 p.m.