fars_map_state: Graphical map of state fatalities

Description Usage Arguments Details Value Note Examples

Description

This function produces a graphical map of the state and shows the location of motor vehicle fatalities in the year. The map is then auto plotted to the plot window.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The state number as integer, or character to be coerced

year

The year as an integer

Details

The data for the year is first read in and a check is made to determine if state data exists. If this data is available it is filtered and, if accidents have occurred, their locations are plotted on the state map. If NA's exist in the LONGITUD or LATITUDE columns they are imputed.

Value

A plot rendered and shown

Note

Year cannot be vectorized or this function will produce an error

If the state number is invalid or doesn't exist in the data this function will produce an error

If there are no accidents in the state, a message will be produced and no plot will be rendered

Examples

1

megaquant/fars documentation built on June 1, 2019, 3:57 a.m.