Description Usage Arguments Details Examples
View source: R/fars_functions2.R
fars_map_state
maps state motor vehicle fatalities given a year and
state id number.
1 | fars_map_state(state.num, year)
|
state.num |
Numerical code for US state. |
year |
An integer, or a string or numeric that can be coerced to a string, of the year of interest. |
This function takes a state number and a year, and draws a state outline with dots to represent the location of motor vehicle fatalities for that year. This function will throw an error if an invalid state number is chosen or the chosen year's data does not exist.
You must have library(mapdata) loaded in your namespace for this to work.
1 2 3 4 5 6 7 8 | library(mapdata)
fars_map_state(12, 2014)
fars_map_state(36, 2014)
## Not run:
fars_map_state(3, 2014) # error
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.