Description Usage Arguments Details Value Note Examples
View source: R/fars_functions.R
This function returns a monthly comparison of the number of accidents in each year.
1 | fars_summarize_years(years)
|
years |
A list or vector of years to compare |
The accident report CSV for each year is read using fars_read_years, a summary of the counts is created using dplyr::summarize, and the data is then converted into a wide table for easier comparison using tidyr::spread.
A dataframe of the accident counts for each month of each request year. There is a column per year, and a row for each month.
Invalid years will be ignored, and a warning message will be printed.
1 2 3 4 | ## Not run:
fars_summarize_years(2013:2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.