Add more data, drop stacked plot until data are cleaner.

This commit is contained in:
mattbk
2024-01-11 21:13:02 -06:00
parent 239b1da005
commit b956604c30
8 changed files with 711 additions and 20 deletions

View File

@ -48,6 +48,7 @@ ggplot(data = d_total,
caption = "w1cdn.net",
color = "Source") +
theme(legend.position="bottom")
ggplotly()
ggsave("plots/total-over-time-y.png", width = 6, height = 4)
@ -95,22 +96,22 @@ ggplot(data = d_total_long %>% filter(lclass != "Total"),
ggsave("plots/class-over-time.png", width = 6, height = 4)
##### By license class, stacked #####
ggplot(data = d_total_long %>% filter(lclass != "Total"),
aes(x = Date,
y = count,
fill = fct_reorder2(lclass, Date, count))) +
geom_area() +
scale_fill_colorblind() +
scale_x_date(date_breaks = "10 years",
date_minor_breaks = "1 year",
date_labels = "%Y") +
scale_y_continuous(labels = scales::comma) +
theme_bw() +
labs(title = "US Amateur Licenses by Class",
fill = "Class",
caption = "w1cdn.net") +
theme(legend.position="bottom")
# ggplot(data = d_total_long %>% filter(lclass != "Total"),
# aes(x = Date,
# y = count,
# fill = fct_reorder2(lclass, Date, count))) +
# geom_area() +
# scale_fill_colorblind() +
# scale_x_date(date_breaks = "10 years",
# date_minor_breaks = "1 year",
# date_labels = "%Y") +
# scale_y_continuous(labels = scales::comma) +
# theme_bw() +
# labs(title = "US Amateur Licenses by Class",
# fill = "Class",
# caption = "w1cdn.net") +
# theme(legend.position="bottom")
ggsave("plots/class-over-time-stacked.png", width = 6, height = 4)
#ggsave("plots/class-over-time-stacked.png", width = 6, height = 4)