Description Usage Arguments Details Note Examples
fars_map_state
maps fars data for each year and to a state
1 | fars_map_state(state.num, year)
|
state.num |
integer referencing a state. |
year |
An integer, or a string |
takes a state number and a year, and creates a map image plotting the fars data point by long and lat, require mapdata package.
If the state.num
provided is not in the FARS file, an error is produced.
If there are no fatal crashes for the state and year, a message is provided.
LONGITUD values > 900 are set to NA, LATITUDE values > 90 are set to NA
1 2 3 4 5 6 7 8 9 | ## Not run:
fars_map_state(22, 2015)
## End(Not run)
## Not run:
fars_map_state(1066, 0) # error
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.