fars_map_state: Fatality Accident Reporting System-Mapping Function

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

fars_map_state(state.num, year) takes in the data from the FARS files and maps the number of incidents for the specified state for the given year. This function uses make_filename and fars_read functions. It also requires *dplyr*, *maps*, and *graphics* packages to use filter, map, and points functions, respectively.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

Numerical values which are integers that represents a spefic state and the year is the year of interest in mapping the incidents. state.num value in the FARS range from 1 to 56. Integer value outside this range will result in an error.

year

Numerical values and they must be four digit year integer value.

Value

function will return a map in a graphical form with incidents represented in a particular state based on locational information specified in FARS.

Examples

1
2
3
4
5
6
## Not run: 
 fars_map_state(1, 2013)
 fars_map_state(20, 2014)
 fars_map_state(50, 2015)
 
## End(Not run)

MoRudyKim/farsfunc documentation built on May 28, 2019, 1:54 p.m.