fars_map_state: Map of state specific accidents

Description Usage Arguments Details Value Source Examples

Description

This function takes two inputs which are used to extract traffic fatality information for a given state and year. This information is used to place markers, indicated as points on a map, showing where a traffic fatality occured. If there were no fatalities in a state during a given year the function will generate an error stating there is no accident to plot. If you input an incorrect state number then an error will indicate there is no state for the given number.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

a number between 1 and 51, excluding 3, that identifies a US state.

year

An integer or an object that can be coerced to an integer. Should be 2013, 2014, or 2015.

Details

This function will throw and error if there is an invalled state given to the program. A message will be displayed if a specific state for a given year reports no fatalities.

Value

This function returns a picture of a state and a dot at each geographical location where an accident has occurred during the specified year.

Source

US National Highway Traffic Safety Administration's Fatality Analysis Reporting System

Examples

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

greegreg/fars documentation built on May 31, 2019, 8:07 a.m.