fars_map_state: fars_map_state

Description Usage Arguments Details Value Examples

Description

A function which uses the maps package to plot the locations accidents in the FARS dataset for a given year and state. This function will return an error if the provided state number is invalid, or if there are no accidents in the dataset for the given state and year combination.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

the number of the state in the FARS data - coerced to an integer

year

the year for which data is read

Details

Accidents with a longitude >900 or a latitude >90 have their lat/long set to NA

Value

a map of the state, with accident locations plottec

Examples

1
## Not run: fars_map_state('51','2014')

mattmalcher/farsdemopkg documentation built on May 4, 2019, 6:30 a.m.