Description Usage Arguments Details Value Examples
The fars_summarize_years
function is used to read in FARS data from a specified range of years
and return the monthly number of accident registered in FARS.
1 | fars_summarize_years(years)
|
years |
A year or a vector of years (in any class that can be coerced to numeric) to specify which FARS reports are to be read in |
The function internally uses the fars_read_years
function to read in and
extract the data and then uses dplyr
and tidyr
functions to summarise and
reformat the data.
Like fars_read_years
it reads the data from your working directory
and it will produce a warning if an invalid year is given as input. Please be aware that
the standard naming convention for FARS data has to be used (cf. make_filename
).
This function returns a tbl_df
object with one column for every year analysed and
twelve rows, one for each month. The columns contain the sum of accidents reported to
FARS in each month of the given year.
1 | ## Not run: fars_summarize_years(2013:2015) #Summarize FARS data for the years 2013, 2014 and 2015
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.