Description Usage Arguments Details Examples
Plots a map showing FARS crash locations for a specified state and year.
1 | fars_map_state(state.num, year)
|
state.num |
Integer state code. See https://crashstats.nhtsa.dot.gov/Api/Public/Publication/812315 (PDF), p. 26 for a list. |
year |
Integer year. |
The maps package must be loaded so that the the stateMapEnv object is
available. (The maps package does not export stateMapEnv.) Do this by
running library(maps) .
Crashes with LOGITUD > 900 or LATITUDE > 90 are excluded.
Invalid state or year values will produce errors.
1 2 | library(maps)
fars_map_state(19, 2015) # 19 is Iowa
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.