Description Usage Arguments Details Value Examples
This function plots the accident reports of a given year and in a given state on a map of the state.
1 | fars_map_state(state.num, year)
|
state.num |
the numeric code for the state or territory to be plotted. |
year |
A 4-digit year number (YYYY) specifying the FARS file to be read. |
The function will fail if the state code is not in FARS file. If there are no accidents to plot, a message is produced to that effect.
The following functions are imported: maps::map
, graphics::points
, dply::filter
.
The function returns a NULL value.
1 2 3 | fars_map_state(1, 2014)
# following will fail
#not run, will fail: fars_map_state(1, 2019)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.