Description Usage Arguments Value Examples
fars_map_state
function allows to plot cases on a map based on a state number and specfic year data
the function takes two arguments: a state number and year which serve as inputs in the first 2 functions
created above. to make sure the remaining functions work appropiately, state number is converted as integer
then, if the state number is not included in the data, an error will appear as "invalid STATE number xxxxx"
otherwise the data will be filtered with that state number. in case the filtered data does not have any cases
a message will appear that no accidents can be ploted. If there cases, longitude and latitude data are assigned
to cases with NULL longitude and latitude. finally, a map with cases ploted is created based on the state
and year specified as arguments
1 | fars_map_state(state.num, year)
|
state.num |
A state number to plot cases in a map |
year |
A year of data to plot cases in a map |
a graphic that shows the map of cases for a specific state number and year
1 | ## Not run: fars_map_state(1, 2015)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.