View source: R/fars_functions.R
| fars_map_state | R Documentation |
This function uses two previusly defined functions: make_filename (for creating a name of imported file) and make_filename (for loading csv file from file). In the secund step it verifies if the state.number is in the unique list of states. In case that number is not correct, than execution of function is stoped. Next step is to filter tibble by selected state. Secund check is done in order to verify if there are any accidents in mentioned state. Final step of function is to plot number of accindents on the map by lattitude and longitude
fars_map_state(state.num, year)
state.num |
Unique identifier of state |
year |
Single year that will be analyzed in map |
This function will return map of selected state with number of occurences by GPS cordinates with lattitude and longitude.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.