Description Usage Arguments Details Value Note Examples
Creates a map of the state and plots the points where there is an accident.
1 | fars_map_state(state.num, year)
|
state.num |
A character containing State Number |
year |
A character containing a year |
This function expects a valid state number and year. This function uses internal method
make_filename
to construct a file name, fars_read
for reading the
file to a dtaframe. Once the dataframe is populated, this function validates if the user passed
state number exists in the dataframe and filters the records that match the state number. The coordinates
in the dataframe are filtered and draws a graph based on the range of latitudes and longitudes and
plots the points.
This function does not return anything. It draws a plot having a map and the points.
This function fails if the state number pased is invalid
This function fails if there are no entries of the state and year passed to the function.
1 2 3 4 5 6 | ## Not run:
fars_map_state(1)
fars_map_state("2013")
fars_map_state(1, "1999")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.