Update data and start plotting ARRL membership.
This commit is contained in:
@@ -53,6 +53,17 @@ ae7q_actions <- read.csv("data/ae7q-actions-scraped.csv") %>%
|
||||
#date_vec <- seq(min(ae7q_actions$date), max(ae7q_actions$date), by="days")
|
||||
#all(date_vec == unique(ae7q_actions$date))
|
||||
|
||||
#### ARRL ####
|
||||
arrl_raw <- read.csv("data/arrl membership over time.csv")
|
||||
qst_raw <- read.csv("data/qst-somc.csv")
|
||||
arrl <- arrl_raw %>%
|
||||
mutate(Date = as.Date(Date))
|
||||
qst <- qst_raw %>%
|
||||
mutate(Date = as.Date(form_month),
|
||||
paid_copies_mean_monthly = c15_year_copies_paid +
|
||||
a16_year_copies_digital_paid) %>%
|
||||
pivot_longer(cols = -c(form_month, Date))
|
||||
|
||||
#### Plots ####
|
||||
|
||||
##### Total over time, y = 0 #####
|
||||
@@ -356,3 +367,32 @@ ggplot(data = ae7q_actions %>% filter(date >= Sys.Date() - years(2)),
|
||||
guides(color = "none")
|
||||
|
||||
ggsave("plots/actions-over-time-2-years.png", width = 9, height = 6)
|
||||
|
||||
##### ARRL #####
|
||||
|
||||
ggplot(data = arrl,
|
||||
aes(x = Date,
|
||||
y = Members,
|
||||
color = source_name)) +
|
||||
geom_line() +
|
||||
geom_point(size = 0.3) +
|
||||
geom_line(data = qst %>% filter(name %in% c("paid_copies_mean_monthly")),
|
||||
aes(x = Date,
|
||||
y = value,
|
||||
color = name)) +
|
||||
scale_x_date(date_breaks = "10 years",
|
||||
date_minor_breaks = "1 year",
|
||||
date_labels = "%Y") +
|
||||
scale_y_continuous(labels = scales::comma,
|
||||
limits = c(0, NA)) +
|
||||
theme_bw() +
|
||||
labs(title = "ARRL Membership Indicators",
|
||||
caption = "w1cdn.net",
|
||||
color = "Source") +
|
||||
theme(legend.position="bottom")
|
||||
ggplotly()
|
||||
|
||||
ggsave("plots/arrl-over-time.png", width = 6, height = 4)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user