Description Usage Arguments Details Value Examples
A function which uses the maps package to plot the locations accidents in the FARS dataset for a given year and state. This function will return an error if the provided state number is invalid, or if there are no accidents in the dataset for the given state and year combination.
1 | fars_map_state(state.num, year)
|
state.num |
the number of the state in the FARS data - coerced to an integer |
year |
the year for which data is read |
Accidents with a longitude >900 or a latitude >90 have their lat/long set to NA
a map of the state, with accident locations plottec
1 | ## Not run: fars_map_state('51','2014')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.