View source: R/fars_functions.R
fars_map_state | R Documentation |
This function creates a map of accidents for a state, specified by its state number. If there are no accidents to plot for that state, a message saying so will be printed. If a state does not exist which corresponds to the number inputted, an error will be thrown. An error will also be thrown if the state is out of bounds for plotting. This happens for the states of Alaska and Hawaii which are not part of the contiguous United States.
fars_map_state(state.num, year)
state.num |
A numeric object or character string representing the number of the state for which accidents should be mapped. |
year |
A numeric object or character string representing the year for which the state's accidents should be mapped. |
Null. Displays a state map with accident locations plotted on it by their longitude and latitude in the file browser tab. Nothing is displayed if no accidents to show.
## Not run: fars_map_state(48,2015) ## Not run: fars_map_state("13","2014")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.