Of the 84 unique books on the recommentation lists, 59 were at the Seattle Public Library. About half of these books were first available in the library system within the last 5 years.
CHECKOUTFILES <- here("data/seattle_book_checkouts/")
checkout_files <- map_df(list.files(CHECKOUTFILES, full.names = T), read_csv)
Here is the average per year checkouts by book over the last 5 years (2015-2020):
checkout_files_with_years <- checkout_files %>%
group_by(title) %>%
summarize(total_checkouts = sum(total_checkouts)) %>%
left_join(checkout_files %>% count(title)) %>%
mutate(normalized_checkouts = total_checkouts/n,
title = fct_reorder(title, -normalized_checkouts)) %>%
arrange(-total_checkouts)
ggplot(checkout_files_with_years, aes(x = title, y = normalized_checkouts)) +
geom_bar(stat = "identity") +
theme_classic() +
ylab("Seattle Public Library book checkouts\n(Average per year)") +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))