diff --git a/README.md b/README.md index a4ea3a3..2a851ee 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,9 @@ I'll get a blog post up at https://w1cdn.net at some point. - Main page: http://ah0a.org/FCC/index.html - FCC numbers as images of tables: https://sites.google.com/site/amateurradiodata/home - K8VSY's per capita estimates: https://k8vsy.radio/2021/09/ham-radio-licenses-us-states-per-capita.html + +# Rough Plots +![Alt text](plots/total-over-time-y.png) +![Alt text](plots/total-over-time.png) +![Alt text](plots/class-over-time.png) +![Alt text](plots/class-over-time-stacked.png) \ No newline at end of file diff --git a/bin/data-plots.R b/bin/data-plots.R index d256fe0..7491ae6 100644 --- a/bin/data-plots.R +++ b/bin/data-plots.R @@ -27,7 +27,6 @@ d_total_long <- d_total %>% names_to = "lclass", values_to = "count") - #### Plots #### ##### Total over time ##### ggplot(data = d_total, @@ -35,7 +34,7 @@ ggplot(data = d_total, y = Total, color = source_name)) + geom_line() + - geom_point() + + geom_point(size = 0.3) + scale_x_date(date_breaks = "10 years", date_minor_breaks = "1 year", date_labels = "%Y") + @@ -44,7 +43,10 @@ ggplot(data = d_total, labs(title = "US Amateur Licenses", subtitle = "ARRL, AH0A", caption = "w1cdn.net", - color = "Source") + color = "Source") + + theme(legend.position="bottom") + +ggsave("plots/total-over-time.png", width = 6, height = 4) ##### Total over time, y = 0 ##### ggplot(data = d_total, @@ -52,7 +54,7 @@ ggplot(data = d_total, y = Total, color = source_name)) + geom_line() + - geom_point() + + geom_point(size = 0.3) + scale_x_date(date_breaks = "10 years", date_minor_breaks = "1 year", date_labels = "%Y") + @@ -62,7 +64,10 @@ ggplot(data = d_total, labs(title = "US Amateur Licenses", subtitle = "ARRL, AH0A", caption = "w1cdn.net", - color = "Source") + color = "Source") + + theme(legend.position="bottom") + +ggsave("plots/total-over-time-y.png", width = 6, height = 4) ##### By license class ##### ggplot(data = d_total_long %>% filter(lclass != "Total"), @@ -70,7 +75,7 @@ ggplot(data = d_total_long %>% filter(lclass != "Total"), y = count, color = fct_reorder2(lclass, Date, count))) + geom_line() + - geom_point() + + geom_point(size = 0.3) + scale_x_date(date_breaks = "10 years", date_minor_breaks = "1 year", date_labels = "%Y") + @@ -81,7 +86,10 @@ ggplot(data = d_total_long %>% filter(lclass != "Total"), subtitle = "ARRL, AH0A", y = "Count", color = "Class", - caption = "w1cdn.net") + caption = "w1cdn.net") + + theme(legend.position="bottom") + +ggsave("plots/class-over-time.png", width = 6, height = 4) ##### By license class, stacked ##### ggplot(data = d_total_long %>% filter(lclass != "Total"), @@ -98,6 +106,9 @@ ggplot(data = d_total_long %>% filter(lclass != "Total"), labs(title = "US Amateur Licenses by Class", subtitle = "ARRL, AH0A", fill = "Class", - caption = "w1cdn.net") + caption = "w1cdn.net") + + theme(legend.position="bottom") + +ggsave("plots/class-over-time-stacked.png", width = 6, height = 4) diff --git a/plots/class-over-time-stacked.png b/plots/class-over-time-stacked.png new file mode 100644 index 0000000..b39129f Binary files /dev/null and b/plots/class-over-time-stacked.png differ diff --git a/plots/class-over-time.png b/plots/class-over-time.png new file mode 100644 index 0000000..9f8bbca Binary files /dev/null and b/plots/class-over-time.png differ diff --git a/plots/total-over-time-y.png b/plots/total-over-time-y.png new file mode 100644 index 0000000..25d6885 Binary files /dev/null and b/plots/total-over-time-y.png differ diff --git a/plots/total-over-time.png b/plots/total-over-time.png new file mode 100644 index 0000000..5acd2e8 Binary files /dev/null and b/plots/total-over-time.png differ