Description Usage Arguments Details Value Examples
View source: R/fars_functions.r
This function plots individual FARS accidents' coordinates as points on a given state's map.
1 | fars_map_state(state.num, year)
|
state.num |
An |
year |
An |
The function returns an error invalid STATE number: state.num
if the provided number does not correspond to a STATE in the data of the given year. The function returns a message no accidents to plot
if the number of accidents for the given year and state comination is 0.
Otherwise, it constructs a file name using the provided year, reads the data file and plots points of individual accidents on the STATE map.
This function creates a plot of a state from map
and plots points corresponding to the coordinates of recorded accidents.
1 2 3 4 | ## Not run:
fars_map_state(49, 2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.