fars_map_state: Generates map of fatalities per state and year

Description Usage Arguments Value Examples

View source: R/farsfunctions.R

Description

This function produces a map of the location of fatalities per state and input year from a standard NHFTS FARS /hrefhttps://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars file containing that year in the filename.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

An integer representing each US state in the NHFTS FARS format file in the STATE attribute

year

A string of length 4 representing the year in the file name

Value

A plot of the state boundary polygon with fatalities as points. If an invalid state number or if there are no fatalities recorded for that state for the input year a warning message will be returned.

Examples

1
fars_map_state(6, 2013)

csgbloom/farspackage documentation built on May 20, 2020, 10:15 a.m.