fars_map_state: Create useful summary of fars data

Description Usage Arguments Value State Number Reference Table Examples

View source: R/farsfunctions.R

Description

This function will plot a subset of fars data for a given state and year using map. The data is read in for the year specified via fars_read by loading the proper data file using make_filename as an input to fars_read. LONGITUD > 900 or LATITUDE > 90 are removed from the plot.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The numeric code coresponding to the state of interest. This will be coerced to integer. See State Number Reference Table.

year

The year associated with the data file. year can be of any single value basic type capable of being coerced to character string.

Value

This function returns a plot object of the data with the given parameters.

State Number Reference Table

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

Examples

1
## Not run: fars_map_state(30,2013)

JJNewkirk/Rfars documentation built on May 7, 2019, 10:12 a.m.