fars_map_state: Display a map of a state with the accidents plotted on the...

Description Usage Arguments Value Note Examples

Description

This function creates a figure of a state map. The points on the map correspond to accidents in the FARS data. Each accident is plotted according to the latitude and longitude of the accident site.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

An integer representing the number of a state as defined in the FARS data.

year

An integer corresponding to the year of the FARS accident data.

Value

A figure of a state map with accidents plotted by geographic location as specified by latitude and longitude is printed.

Note

If an invalid state number is used as input, the function stops with an error message.

If there are zero accidents for a particular state and year, a message is displayed and the function ends.

Examples

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

## End(Not run)

leigitcode/FARSanalysis documentation built on May 21, 2019, 3:06 a.m.