This is a function that creates a data frame based on a years vector and summarizes counts by year. This function needs to import bind_rows, group_by and summarize from the dplyr package as well as spread from tidyr.
A character or integer vector of the years a user wants to read in.
Wide data frame with counts by year
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.