fars_map_state: Create Fatality Analysis Reporting System incident map

Description Usage Arguments Details References See Also Examples

View source: R/fars_functions.R

Description

Draws a map of Fatality Analysis Reporting System (FARS) incidents of a given year for a state.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

(integer) An identifier specifying the state map to be drawn. (see also the dataset documentation)

state.num State Name state.num State Name
1 Alabama 31 Nebraska
2 Alaska 32 Nevada
4 Arizona 33 New Hampshire
5 Arkansas 34 New Jersey
6 California 35 New Mexico
8 Colorado 36 New York
9 Connecticut 37 North Carolina
10 Delaware 38 North Dakota
11 District of Columbia 39 Ohio
12 Florida 40 Oklahoma
13 Georgia 41 Oregon
15 Hawaii 42 Pennsylvania
16 Idaho 43 Puerto Rico
17 Illinois 44 Rhode Island
18 Indiana 45 South Carolina
19 Iowa 46 South Dakota
20 Kansas 47 Tennessee
21 Kentucky 48 Texas
22 Louisiana 49 Utah
23 Maine 50 Vermont
24 Maryland 52 Virgin Islands (since 2004)
25 Massachusetts 51 Virginia
26 Michigan 53 Washington
27 Minnesota 54 West Virginia
28 Mississippi 55 Wisconsin
29 Missouri 56 Wyoming
30 Montana
year

(character or (integer) ) The year for which the filename will be created.

Details

If FARS file for the given year does not exist in the current working directory or if an undefined state.num is selected, an error is thrown.

References

US National Highway Traffic Safety Administration
(https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars)

See Also

fars_read, make_filename

Examples

1
2
3
4
5
6
7
## Not run: 
# draw map of Alabama for year 2014
fars_map_state(1, 2014)
# draw map of Nevada for year 2015
fars_map_state(32, 2015)

## End(Not run)

philippB-on-git/fars documentation built on Dec. 22, 2021, 7:49 a.m.