Description Usage Arguments Value Note Examples
View source: R/fars_functions.R
Plots accidents occuring in a particular state on the state map (US).
1 | fars_map_state(state.num, year)
|
state.num |
The state number corresponding to a state in the US. This should be integer between 1 & 56 ( both lower & upper limits included). |
year |
The year for which the accident data should be take (can take any value from 2013, 2014, 2015) |
A plot of accidents occuring in a particular state on the state map (US). A NULL object is returned.
Requires 'readr', 'dplyr', 'tidyr' and 'maps' packages to be loaded first.
1 2 3 4 | ## Considering your data is in the present working directory
## The following would work fine and would return the subsetted data.
mydata <- fars_map_state(55, 2013)
str(mydata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.