Description Usage Arguments Value Note Examples
This function creates a map with fatalities in motor vehicle crashes for a specific year and state. The function fails if an invalid year or state is passed as input.
1 | fars_map_state(state.num, year)
|
state.num |
A numeric value with the state number to plot |
year |
A numeric value with the year for which the data will be plotted. |
Plots a map with points marking the locations of accidents.
The csv files with the data need to be downloaded previously from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System website (https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars)
1 | ## Not run: fars_map_state(3, 2015)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.