fars_map_state: Display a map of accidents in a US state for a given year...

Description Usage Arguments References See Also Examples

Description

fars_map_state reads FARS accident data for the year requested. If the file for that year is found, the function plots a map of the state then plots the location of accidents in that year using the latitude and longitude provided in the data file. If the accident file is not found an error message is returned.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

numeric value for the US state to be mapped - must be of length 1 or an error message is returned. If the state value is not found in the accident file an error message is returned. For a list of numbers assigned to the states see the FARS Analytical Users Manual.

year

numeric value for the year to be mapped - must be of length 1 or an error message is returned

References

for more information on FARS data see https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars

See Also

make_filename for the file nameing convention used
fars_read for the data file input

Examples

1
2
3
4
## Not run: 
fars_map_state(17, 2016) #map accidents in Illinois for the year 2016

## End(Not run)

jrwalker-projects/farsfunctions documentation built on May 29, 2019, 1:50 a.m.