Description Usage Arguments Value Note Examples
This function creates a figure of a state map. The points on the map correspond to accidents in the FARS data. Each accident is plotted according to the latitude and longitude of the accident site.
1 | fars_map_state(state.num, year)
|
state.num |
An integer representing the number of a state as defined in the FARS data. |
year |
An integer corresponding to the year of the FARS accident data. |
A figure of a state map with accidents plotted by geographic location as specified by latitude and longitude is printed.
If an invalid state number is used as input, the function stops with an error message.
If there are zero accidents for a particular state and year, a message is displayed and the function ends.
1 2 3 4 | ## Not run:
fars_map_state(1,2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.