Description Usage Arguments Value Examples
View source: R/fars_functions.R
This function accepts a specific year and a numeric value of US State. Afterwards, the accident data of that year is read. If the state number is invalid, error msg is displayed. Otherwise, accident out of that given state is filtered out. Further, when no accidents data are available, 'no accidents to plot' is to be shown. Otherwise, accidents data is to be mapped within the state geography.
1 | fars_map_state(state.num, year)
|
state.num |
Numeric value of US State (Min:1, Max:56) |
year |
An year of interest in which data to be read (2013-2015) |
Displays a plot of state map with accidents data. If there's no accidents in the state, 'no accidents to plot' is printed instead.
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.