Update data and add new plots of last two years.
This commit is contained in:
@ -6,6 +6,7 @@ library(forcats)
|
||||
library(ggthemes)
|
||||
library(plotly)
|
||||
library(htmlwidgets)
|
||||
library(lubridate)
|
||||
|
||||
# Read in data from Wayback Machine archive of http://www.arrl.org/fcc-license-counts
|
||||
|
||||
@ -78,6 +79,25 @@ ggplot(data = d_total %>% filter(Date >= as.Date("2000-01-01")),
|
||||
|
||||
ggsave("plots/total-over-time-2000.png", width = 6, height = 4)
|
||||
|
||||
##### Total over time, 2 years #####
|
||||
ggplot(data = d_total %>% filter(Date >= Sys.Date() - years(2)),
|
||||
aes(x = Date,
|
||||
y = Total,
|
||||
color = source_name)) +
|
||||
geom_line() +
|
||||
geom_point(size = 0.3) +
|
||||
scale_x_date(date_breaks = "3 months",
|
||||
date_minor_breaks = "1 month",
|
||||
date_labels = "%Y-%m") +
|
||||
scale_y_continuous(labels = scales::comma) +
|
||||
theme_bw() +
|
||||
labs(title = paste0("US Amateur Licenses since ", Sys.Date() - years(2)),
|
||||
caption = "w1cdn.net",
|
||||
color = "Source") +
|
||||
theme(legend.position="bottom")
|
||||
|
||||
ggsave("plots/total-over-time-2-years.png", width = 6, height = 4)
|
||||
|
||||
##### By license class #####
|
||||
ggplot(data = d_total_long %>% filter(lclass != "Total"),
|
||||
aes(x = Date,
|
||||
@ -99,6 +119,28 @@ ggplot(data = d_total_long %>% filter(lclass != "Total"),
|
||||
|
||||
ggsave("plots/class-over-time.png", width = 6, height = 4)
|
||||
|
||||
##### By license class, 2 years #####
|
||||
ggplot(data = d_total_long %>% filter(lclass != "Total",
|
||||
Date >= Sys.Date() - years(2)),
|
||||
aes(x = Date,
|
||||
y = count,
|
||||
color = fct_reorder2(lclass, Date, count))) +
|
||||
geom_line() +
|
||||
geom_point(size = 0.3) +
|
||||
scale_x_date(date_breaks = "10 years",
|
||||
date_minor_breaks = "1 year",
|
||||
date_labels = "%Y") +
|
||||
scale_y_continuous(labels = scales::comma) +
|
||||
scale_color_colorblind() +
|
||||
theme_bw() +
|
||||
labs(title = paste0("US Amateur Licenses by Class since ", Sys.Date() - years(2)),
|
||||
y = "Count",
|
||||
color = "Class",
|
||||
caption = "w1cdn.net") +
|
||||
theme(legend.position="bottom")
|
||||
|
||||
ggsave("plots/class-over-time-2-years.png", width = 6, height = 4)
|
||||
|
||||
##### By license class, facet #####
|
||||
ggplot(data = d_total_long %>% filter(lclass != "Total"),
|
||||
aes(x = Date,
|
||||
|
Reference in New Issue
Block a user