Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function returns a map showing the geographic locations of all of the accidents in the FARS database in a particular state for a particular year. Each accident is a dot in the outline of the state
1 | fars_map_state(state.num, year)
|
state.num |
A scalar of a type that can be coerced to an integer of the integer identifier of the state.
A list of the state identifying integers for the FARS data can be found
here. If |
year |
A scalar four-digit year of a type that can be coerced to integer representing the year
of data to be mapped. Currently, only the years 2013-2015 are in the data. If |
The FARS data can be found at the National Highway Traffic Safety Association
here.
2013-2015 data is distributed with this package. The location of the files can be found using
system.file('extdata',package='FARScoursera')
These files need to be in your working directory for this function to work correctly.
This function returns a graphical map of the locations of all of the accidents in the
FARS database in the given state in the given year. Each accident is a dot, and state outlines
are shown. If either state.num
or year
cannot be coerced to integer or do not
refer to a valid identifier, an error is thrown instead
1 2 | ## Not run: fars_map_state(1,2015)
## Not run: fars_map_state(6,2013)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.