fars_map_state: Draw accidents on a map by year and by state

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

Draws a map of where the incidents of a given year occurred, based on the data of longitude and latitude present in the FARS data. FARS is US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric value with the state number to analyse. Must be present in FARS data

year

A numeric representing the year in 4 digits format YYYY. Must be present in FARS data

Value

NULL. The function plots a map with points marking accidents

Note

the function stops if state.num is not present in FARS data.

Examples

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

TizVic/BuildingAnRPackage documentation built on Sept. 11, 2017, 9:54 a.m.