fars_map_state : This function takes the state number and the vector of years as input.
It will then find the relevant csv files using the make_filename function and will
read those csv files using the fars_read function. If the state number is not found
it will display an error. Otherwise, it will filter the dataset, filtering the data with the
given state number. It then plots the points where the accidents have occured in that state.
If no accidents occured, a message is displayed.
1 | fars_map_state(state.num, year)
|
a data.frame of filtered data, if there are no rows then returns invisible(NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.