class: inverse, left, bottom background-image: url(https://images.unsplash.com/photo-1542204165-65bf26472b9b?auto=format&fit=crop&q=80&w=1548&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D) background-size: cover # .Large[# My featurette] ## .small[featuring [{}]() ...] #### .tiny[Gina Reynolds | 2023-10-25 |Image credit: Denise Jans, Upsplash] ??? Title --- count: false .panel1-feature-auto[ ```r *library(tidyverse) ``` ] .panel2-feature-auto[ ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) *major = c("C", "G", "D", "A", "E", "B", * "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") ``` ] .panel2-feature-auto[ ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") *minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", * "Bbm", "Fm", "Cm", "Gm", "Dm") ``` ] .panel2-feature-auto[ ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") *major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") ``` ] .panel2-feature-auto[ ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") *major ``` ] .panel2-feature-auto[ ``` ## [1] "C" "G" "D" "A" "E" "B" "F#/Gb" "C#/Db" "G#/Ab" ## [10] "Eb" "Bb" "F" ``` ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% * tibble(minor) ``` ] .panel2-feature-auto[ ``` ## # A tibble: 12 × 2 ## . minor ## <chr> <chr> ## 1 C Am ## 2 G Em ## 3 D Bm ## 4 A F#m ## 5 E C#m ## 6 B G#m ## 7 F#/Gb Ebm ## 8 C#/Db Bbm ## 9 G#/Ab Fm ## 10 Eb Cm ## 11 Bb Gm ## 12 F Dm ``` ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% * ggplot() ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + * aes(fill = major) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + * ggwedge:::geom_pie(show.legend = F, * color = "black", * alpha = .4, * linewidth = .1) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + * aes(r = 1) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + * coord_polar(start = -pi/12) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + coord_polar(start = -pi/12) + * ggwedge:::geom_pie_label(aes(label = after_stat(major)), * r_prop = .85, size = 6) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + coord_polar(start = -pi/12) + ggwedge:::geom_pie_label(aes(label = after_stat(major)), r_prop = .85, size = 6) + * aes(angle = after_stat(angle_wedge -90+180/12)) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_13_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + coord_polar(start = -pi/12) + ggwedge:::geom_pie_label(aes(label = after_stat(major)), r_prop = .85, size = 6) + aes(angle = after_stat(angle_wedge -90+180/12)) + * ggwedge:::geom_pie_label(aes(label = after_stat(minor)), * r_prop = .5, size = 4.5) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_14_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + coord_polar(start = -pi/12) + ggwedge:::geom_pie_label(aes(label = after_stat(major)), r_prop = .85, size = 6) + aes(angle = after_stat(angle_wedge -90+180/12)) + ggwedge:::geom_pie_label(aes(label = after_stat(minor)), r_prop = .5, size = 4.5) + * theme_void() ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_15_output-1.png)<!-- --> ] --- count: false .panel1-feature-auto[ ```r library(tidyverse) major = c("C", "G", "D", "A", "E", "B", "F#/Gb","C#/Db", "G#/Ab", "Eb", "Bb", "F") minor = c("Am", "Em", "Bm", "F#m", "C#m", "G#m", "Ebm", "Bbm", "Fm", "Cm", "Gm", "Dm") major_roman = c("I", "V", "II", "VI", "III", "VII", rep("",5), "IV") major %>% tibble(minor) %>% ggplot() + aes(fill = major) + ggwedge:::geom_pie(show.legend = F, color = "black", alpha = .4, linewidth = .1) + aes(r = 1) + coord_polar(start = -pi/12) + ggwedge:::geom_pie_label(aes(label = after_stat(major)), r_prop = .85, size = 6) + aes(angle = after_stat(angle_wedge -90+180/12)) + ggwedge:::geom_pie_label(aes(label = after_stat(minor)), r_prop = .5, size = 4.5) + theme_void() + * geom_hline(yintercept = 1.2, alpha = 0) ``` ] .panel2-feature-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature_auto_16_output-1.png)<!-- --> ] <style> .panel1-feature-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-feature-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-feature-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- --- count: false .panel1-feature2-auto[ ```r *last_plot() ``` ] .panel2-feature2-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature2_auto_01_output-1.png)<!-- --> ] --- count: false .panel1-feature2-auto[ ```r last_plot() + * ggwedge:::geom_pie_label(show.legend = F, * color = "black", r_prop = 1.1, * aes(label = after_stat(major_roman)), * linewidth = .1) ``` ] .panel2-feature2-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature2_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-feature2-auto[ ```r last_plot() + ggwedge:::geom_pie_label(show.legend = F, color = "black", r_prop = 1.1, aes(label = after_stat(major_roman)), linewidth = .1) + * ggwedge:::geom_pie(alpha = 0, color = "grey", * aes(r0 = 1, r = 1.2, * lty = after_stat(ifelse(major_roman == "I", "a", * ifelse(major_roman %in% c("V", "IV"), "b", * ifelse(major %in% c("Bb", "D"), "c", "d"))))) * ) ``` ] .panel2-feature2-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature2_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-feature2-auto[ ```r last_plot() + ggwedge:::geom_pie_label(show.legend = F, color = "black", r_prop = 1.1, aes(label = after_stat(major_roman)), linewidth = .1) + ggwedge:::geom_pie(alpha = 0, color = "grey", aes(r0 = 1, r = 1.2, lty = after_stat(ifelse(major_roman == "I", "a", ifelse(major_roman %in% c("V", "IV"), "b", ifelse(major %in% c("Bb", "D"), "c", "d"))))) ) + * theme(legend.position = "none") ``` ] .panel2-feature2-auto[ ![](wedge-circle-of-5ths_files/figure-html/feature2_auto_04_output-1.png)<!-- --> ] <style> .panel1-feature2-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-feature2-auto { color: black; width: 49%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-feature2-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- # Go black and white... ```r ggwipe::last_plot_wipe(1) + ggwedge:::geom_pie(alpha = 0, color = "grey35") ``` ![](wedge-circle-of-5ths_files/figure-html/unnamed-chunk-1-1.png)<!-- --> --- ### Contribute - https://github.com/EvaMaeRey/ggcirclepack --- ### Check out {packcircles} which does the computation in ggcirclepack - https://github.com/mbedward/packcircles --- ### Check out flipbookr, used to build this featurette - https://github.com/EvaMaeRey/flipbookr - discussion: https://github.com/EvaMaeRey/flipbookr/blob/master/docs/draft_jasa_submission.pdf --- ### Check out more featurettes - https://EvaMaeRey.github.io/featurette <style type="text/css"> .remark-code{line-height: 1.5; font-size: 100%} @media print { .has-continuation { display: block; } } </style>