--- class: inverse ####From source .Rmd: --- ```default title: "flipbookr empathy" author: "Dr. Evangeline Reynolds" output: xaringan::moon_reader: lib_dir: libs css: [default, hygge, ninjutsu] seal: false nature: ratio: 16:9 highlightStyle: github highlightLines: true countIncrementalSlides: false seal: false beforeInit: "https://platform.twitter.com/widgets.js" ``` --- class: inverse ####From source .Rmd: --- ````default class: inverse, bottom background-image: url(https://images.unsplash.com/photo-1532012197267-da84d127e765?q=80&w=1587&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D) background-size: cover # .Large[flipbooks] ## .small[past, present, future] ## .small[bit.ly/flipbooks-llnl] #### .tiny[Dr. Evangeline Reynolds | 2023-11-16 | Lawrence Livermore National Lab R Users Meetup , Image credit: Jaredd Craig, Upsplash] ??? ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, message = F) options(tidyverse.quiet = TRUE) library(flipbookr) ``` ```` --- class: inverse, bottom background-image: url(https://images.unsplash.com/photo-1532012197267-da84d127e765?q=80&w=1587&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D) background-size: cover # .Large[flipbooks] ## .small[past, present, future] ## .small[bit.ly/flipbooks-llnl] #### .tiny[Dr. Evangeline Reynolds | 2023-11-16 | Lawrence Livermore National Lab R Users Meetup , Image credit: Jaredd Craig, Upsplash] ??? --- class: inverse ####From source .Rmd: --- ```default class: center, middle, inverse # flipbooks: An unfolding tale about empathy... -- draft manuscript: https://github.com/EvaMaeRey/flipbookr/blob/master/docs/draft_jasa_submission.pdf ``` --- class: center, middle, inverse # flipbooks: An unfolding tale about empathy... -- draft manuscript: https://github.com/EvaMaeRey/flipbookr/blob/master/docs/draft_jasa_submission.pdf --- class: inverse ####From source .Rmd: --- ```default class: inverse # Abstract: -- Flipbooks reveal code pipe-lines -- line-by-line -- and side-by-side with output, -- which yields an animated experience. ``` --- class: inverse # Abstract: -- Flipbooks reveal code pipe-lines -- line-by-line -- and side-by-side with output, -- which yields an animated experience. --- class: inverse ####From source .Rmd: --- ````default `r chunk_reveal("scatter", title = "## A code 'flipbook'")` ```{r scatter, include = F} library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + aes(size = pop/1000000000) + aes(color = continent) ``` <!-- --- --> <!-- ### This movie magic arises, because code and output are revealed in a slide show, and content is aligned from one slide to another, which makes differencing (seeing what's new) a effortless physiological process rather than a cognitive one (the case of visual search), availing more cognitive resources to task of interpretation of how code and output pair. --> <!-- --- --> <!-- ### Flipbooks are additionally powerful, because users can move at their own pace, and back and forth to help address their own specific doubts. The implementation allows users to copy and paste code, full pipelines or bits relevant to their problems. Highlighting newest code in a pipeline allows the consumer to focus on what's changing in the output space, rather than th --> <!-- --- --> <!-- ### Yet, flipbook *making* has been somewhat cumbersome (does not feel magical), requiring *detailed* know-how about tools like the knitr dynamic document system, YAMLs, and Xaringan. And their use has primarily been by educators creating material for students, in workshops, and presentations. --> <!-- --- --> <!-- ### New efforts to create `chunk_reveal_live` might put this tech in the hands of more coding newcomers; including on-the-fly classroom use. Arguably the people that might find flipbooks the most useful (people who aren't going to be able to 'just-read' a pipeline of code), might find them even more engaging when they are used to review and present on the most interesting pipelines: their own explorations of their own data. --> ```` --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r *library(ggplot2) ``` ] .panel2-scatter-auto[ ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) *gapminder::gapminder ``` ] .panel2-scatter-auto[ ``` ## # A tibble: 1,704 × 6 ## country continent year lifeExp pop gdpPercap ## <fct> <fct> <int> <dbl> <int> <dbl> ## 1 Afghanistan Asia 1952 28.8 8425333 779. ## 2 Afghanistan Asia 1957 30.3 9240934 821. ## 3 Afghanistan Asia 1962 32.0 10267083 853. ## 4 Afghanistan Asia 1967 34.0 11537966 836. ## 5 Afghanistan Asia 1972 36.1 13079460 740. ## 6 Afghanistan Asia 1977 38.4 14880372 786. ## 7 Afghanistan Asia 1982 39.9 12881816 978. ## 8 Afghanistan Asia 1987 40.8 13867957 852. ## 9 Afghanistan Asia 1992 41.7 16317921 649. ## 10 Afghanistan Asia 1997 41.8 22227415 635. ## # ℹ 1,694 more rows ``` ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% * dplyr::filter(year == 2002) ``` ] .panel2-scatter-auto[ ``` ## # A tibble: 142 × 6 ## country continent year lifeExp pop gdpPercap ## <fct> <fct> <int> <dbl> <int> <dbl> ## 1 Afghanistan Asia 2002 42.1 25268405 727. ## 2 Albania Europe 2002 75.7 3508512 4604. ## 3 Algeria Africa 2002 71.0 31287142 5288. ## 4 Angola Africa 2002 41.0 10866106 2773. ## 5 Argentina Americas 2002 74.3 38331121 8798. ## 6 Australia Oceania 2002 80.4 19546792 30688. ## 7 Austria Europe 2002 79.0 8148312 32418. ## 8 Bahrain Asia 2002 74.8 656397 23404. ## 9 Bangladesh Asia 2002 62.0 135656790 1136. ## 10 Belgium Europe 2002 78.3 10311970 30486. ## # ℹ 132 more rows ``` ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% * ggplot() ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_04_output-1.png)<!-- --> ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + * aes(y = lifeExp) ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_05_output-1.png)<!-- --> ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + * aes(x = gdpPercap) ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_06_output-1.png)<!-- --> ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + aes(x = gdpPercap) + * geom_point() ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_07_output-1.png)<!-- --> ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + * aes(size = pop/1000000000) ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_08_output-1.png)<!-- --> ] --- count: false ## A code 'flipbook' .panel1-scatter-auto[ ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + aes(size = pop/1000000000) + * aes(color = continent) ``` ] .panel2-scatter-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/scatter_auto_09_output-1.png)<!-- --> ] <style> .panel1-scatter-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-scatter-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-scatter-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <!-- --- --> <!-- ### This movie magic arises, because code and output are revealed in a slide show, and content is aligned from one slide to another, which makes differencing (seeing what's new) a effortless physiological process rather than a cognitive one (the case of visual search), availing more cognitive resources to task of interpretation of how code and output pair. --> <!-- --- --> <!-- ### Flipbooks are additionally powerful, because users can move at their own pace, and back and forth to help address their own specific doubts. The implementation allows users to copy and paste code, full pipelines or bits relevant to their problems. Highlighting newest code in a pipeline allows the consumer to focus on what's changing in the output space, rather than th --> <!-- --- --> <!-- ### Yet, flipbook *making* has been somewhat cumbersome (does not feel magical), requiring *detailed* know-how about tools like the knitr dynamic document system, YAMLs, and Xaringan. And their use has primarily been by educators creating material for students, in workshops, and presentations. --> <!-- --- --> <!-- ### New efforts to create `chunk_reveal_live` might put this tech in the hands of more coding newcomers; including on-the-fly classroom use. Arguably the people that might find flipbooks the most useful (people who aren't going to be able to 'just-read' a pipeline of code), might find them even more engaging when they are used to review and present on the most interesting pipelines: their own explorations of their own data. --> --- class: inverse ####From source .Rmd: --- ```default # Talk outline ## Chapter 1: Pairing code and independent plot elements is elegant, and *empathetic* (Lelend Wilkinson, Hadley Wickham) -- ## Chapter 2: step-by-step code-output reveal is gentle and *empathetic* (Garrick Aden-Bui, others) -- ## Backstory Chapter 3.0: Explaining your plot bit by bit makes your presentation stronger, because it is *empathetic* (Matt Blackwell; Hans Rosling) ``` --- # Talk outline ## Chapter 1: Pairing code and independent plot elements is elegant, and *empathetic* (Lelend Wilkinson, Hadley Wickham) -- ## Chapter 2: step-by-step code-output reveal is gentle and *empathetic* (Garrick Aden-Bui, others) -- ## Backstory Chapter 3.0: Explaining your plot bit by bit makes your presentation stronger, because it is *empathetic* (Matt Blackwell; Hans Rosling) --- class: inverse ####From source .Rmd: --- ```default ## Chapter 3: Sequential reveal allows for automating paired reveal, which is *self-empathetic* (Me; Emi Tanaka; Garrick Aden-Bui) ``` --- ## Chapter 3: Sequential reveal allows for automating paired reveal, which is *self-empathetic* (Me; Emi Tanaka; Garrick Aden-Bui) --- class: inverse ####From source .Rmd: --- ```default ## Chapter 4: {flipbookr} package is born. ``` --- ## Chapter 4: {flipbookr} package is born. --- class: inverse ####From source .Rmd: --- ```default ## Next Chapter: chunk_reveal_live()... Making flipbook making more accessible is *empathetic.* (via Kelly Bodwin; rstudioapi; Me) <!-- ### also faster feedback for iterative design process. --> ``` --- ## Next Chapter: chunk_reveal_live()... Making flipbook making more accessible is *empathetic.* (via Kelly Bodwin; rstudioapi; Me) <!-- ### also faster feedback for iterative design process. --> --- class: inverse ####From source .Rmd: --- ```default ## Yet another Chapter: Flipbookr for quarto: Keeping it up-to-date is empathetic (Kieran Healey; Kelly Bodwin; me?) ``` --- ## Yet another Chapter: Flipbookr for quarto: Keeping it up-to-date is empathetic (Kieran Healey; Kelly Bodwin; me?) --- class: inverse ####From source .Rmd: --- ```default # Chapter 1: pairing code with plot element is elegant and empathetic... ``` --- # Chapter 1: pairing code with plot element is elegant and empathetic... --- class: inverse ####From source .Rmd: --- ```default ## Leland Wilkinson's Grammar of Graphics work kind of discover the 'natural language' of chart definition. -- ## different gg implementations (Tableau, spss' etc) allow us great ability to express ourselves! ``` --- ## Leland Wilkinson's Grammar of Graphics work kind of discover the 'natural language' of chart definition. -- ## different gg implementations (Tableau, spss' etc) allow us great ability to express ourselves! --- class: inverse ####From source .Rmd: --- ````default ## Leland Wilkinson identified orthogonal elements in 'The Grammar of Graphics'. Wilkinson on the Policy Viz Podcast [here](https://policyviz.com/podcast/episode-201-leland-wilkinson/). ```{r, echo = F, eval = T, out.width="75%"} knitr::include_graphics("https://miro.medium.com/max/1400/1*MMZuYgeC_YjXNC1r4D4sog.png") ``` ```` --- ## Leland Wilkinson identified orthogonal elements in 'The Grammar of Graphics'. Wilkinson on the Policy Viz Podcast [here](https://policyviz.com/podcast/episode-201-leland-wilkinson/). <img src="https://miro.medium.com/max/1400/1*MMZuYgeC_YjXNC1r4D4sog.png" width="75%" /> --- class: inverse ####From source .Rmd: --- ```default ## But unlike natural languages, Japanese, English, Dutch... there wasn't anything freely available! -- ## Hadley Wickam reading the grammar of graphics: 'This is so beautiful, but there's no software." ``` --- ## But unlike natural languages, Japanese, English, Dutch... there wasn't anything freely available! -- ## Hadley Wickam reading the grammar of graphics: 'This is so beautiful, but there's no software." --- class: inverse ####From source .Rmd: --- ```default ### Hadley Wickham, ggplot2 author on it's motivation: > ### And, you know, I'd get a dataset. And, *in my head I could very clearly kind of picture*, I want to put this on the x-axis. Let's put this on the y-axis, draw a line, put some points here, break it up by this variable. -- > ### And then, like, getting that vision out of my head, and into reality, it's just really, really hard. Just, like, felt harder than it should be. Like, there's a lot of custom programming involved, ``` --- ### Hadley Wickham, ggplot2 author on it's motivation: > ### And, you know, I'd get a dataset. And, *in my head I could very clearly kind of picture*, I want to put this on the x-axis. Let's put this on the y-axis, draw a line, put some points here, break it up by this variable. -- > ### And then, like, getting that vision out of my head, and into reality, it's just really, really hard. Just, like, felt harder than it should be. Like, there's a lot of custom programming involved, --- class: inverse ####From source .Rmd: --- ```default > ### where I just felt, like, to me, I just wanted to say, like, you know, *this is what I'm thinking, this is how I'm picturing this plot. Like you're the computer 'Go and do it'.* -- > ### ... and I'd also been reading about the Grammar of Graphics by Leland Wilkinson, I got to meet him a couple of times and ... I was, like, this book has been, like, written for me. https://www.trifacta.com/podcast/tidy-data-with-hadley-wickham/ ``` --- > ### where I just felt, like, to me, I just wanted to say, like, you know, *this is what I'm thinking, this is how I'm picturing this plot. Like you're the computer 'Go and do it'.* -- > ### ... and I'd also been reading about the Grammar of Graphics by Leland Wilkinson, I got to meet him a couple of times and ... I was, like, this book has been, like, written for me. https://www.trifacta.com/podcast/tidy-data-with-hadley-wickham/ --- class: inverse ####From source .Rmd: --- ```default # ggplot2 let us "... create graphical 'poems'." - Hadley Wickham (2010) in 'A Layered Grammar of Graphics', *Journal of Computational and Graphical Statistics* ``` --- # ggplot2 let us "... create graphical 'poems'." - Hadley Wickham (2010) in 'A Layered Grammar of Graphics', *Journal of Computational and Graphical Statistics* --- class: inverse ####From source .Rmd: --- ````default `r chunk_reveal("scatter2", title = "## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared", display_type = "code")` ```{r, echo = F} library(tidyverse) gapminder_2002 <- gapminder::gapminder %>% filter(year == 2002) ``` ```{r scatter2, include = F} library(ggplot2) ggplot(data = gapminder_2002) + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + aes(size = pop/1000000000) + aes(color = continent) ``` ```` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r *library(ggplot2) ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) *ggplot(data = gapminder_2002) ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) ggplot(data = gapminder_2002) + * aes(y = lifeExp) ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) ggplot(data = gapminder_2002) + aes(y = lifeExp) + * aes(x = gdpPercap) ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) ggplot(data = gapminder_2002) + aes(y = lifeExp) + aes(x = gdpPercap) + * geom_point() ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) ggplot(data = gapminder_2002) + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + * aes(size = pop/1000000000) ``` --- count: false ## ggplot2 code is a sussinct graphical narrative, where the orthogonal components may independently declared ```r library(ggplot2) ggplot(data = gapminder_2002) + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + aes(size = pop/1000000000) + * aes(color = continent) ``` <style> .panel1-scatter2-auto { color: black; width: 99%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-scatter2-auto { color: black; width: NA%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-scatter2-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse ####From source .Rmd: --- ```default # 'Here's what I have in my head, I'm going to translate that to a grammatical representation.' ``` --- # 'Here's what I have in my head, I'm going to translate that to a grammatical representation.' --- class: inverse ####From source .Rmd: --- ```default class: inverse, center, middle > # "the Grammar of Graphics makes [building plots] easy because you've just got all these, like, little nice *decomposible components*" -- Hadley Wickham ### They actually map pretty well to how you might go about describing the sketch of the data visualization as you sketch it out. ``` --- class: inverse, center, middle > # "the Grammar of Graphics makes [building plots] easy because you've just got all these, like, little nice *decomposible components*" -- Hadley Wickham ### They actually map pretty well to how you might go about describing the sketch of the data visualization as you sketch it out. --- class: inverse ####From source .Rmd: --- ```default # Chapter 2: *showing* pairing by coodinated reveal is gentle and empathetic (Garrick Aden-Bui, others) ``` --- # Chapter 2: *showing* pairing by coodinated reveal is gentle and empathetic (Garrick Aden-Bui, others) --- class: inverse ####From source .Rmd: --- ```default <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Really dig how <a href="https://twitter.com/grrrck?ref_src=twsrc%5Etfw">@grrrck</a> builds up <a href="https://twitter.com/hashtag/ggplot2?src=hash&ref_src=twsrc%5Etfw">#ggplot2</a> syntax w/ 📊:<br>📽 "A Gentle Guide to the Grammar of Graphics with ggplot2" <a href="https://t.co/2Okhri7Hox">https://t.co/2Okhri7Hox</a> <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a> <a href="https://twitter.com/hashtag/dataviz?src=hash&ref_src=twsrc%5Etfw">#dataviz</a> <a href="https://t.co/qO43IeTtHG">pic.twitter.com/qO43IeTtHG</a></p>— Mara Averick (@dataandme) <a href="https://twitter.com/dataandme/status/995650384155693061?ref_src=twsrc%5Etfw">May 13, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ``` --- <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Really dig how <a href="https://twitter.com/grrrck?ref_src=twsrc%5Etfw">@grrrck</a> builds up <a href="https://twitter.com/hashtag/ggplot2?src=hash&ref_src=twsrc%5Etfw">#ggplot2</a> syntax w/ 📊:<br>📽 "A Gentle Guide to the Grammar of Graphics with ggplot2" <a href="https://t.co/2Okhri7Hox">https://t.co/2Okhri7Hox</a> <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a> <a href="https://twitter.com/hashtag/dataviz?src=hash&ref_src=twsrc%5Etfw">#dataviz</a> <a href="https://t.co/qO43IeTtHG">pic.twitter.com/qO43IeTtHG</a></p>— Mara Averick (@dataandme) <a href="https://twitter.com/dataandme/status/995650384155693061?ref_src=twsrc%5Etfw">May 13, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- class: inverse ####From source .Rmd: --- ```default # True to natural language aquisition... Point to each thing and name it... (like pair programming too.) https://pkg.garrickadenbuie.com/gentle-ggplot2/#1 ## ggplot2 lets you 'speaking your plot into existence'; write 'graphical poems' -- ## Garrick read the poem out loud (poetry slam!): Bedtime, picture book, where parent is pointing out new vocabulary in the pictures. ``` --- # True to natural language aquisition... Point to each thing and name it... (like pair programming too.) https://pkg.garrickadenbuie.com/gentle-ggplot2/#1 ## ggplot2 lets you 'speaking your plot into existence'; write 'graphical poems' -- ## Garrick read the poem out loud (poetry slam!): Bedtime, picture book, where parent is pointing out new vocabulary in the pictures. --- class: inverse ####From source .Rmd: --- ```default # Back Story for Chapter 3. ### Origins in presentation and *empathy* for your audience in presentation... <blockquote class="twitter-tweet"><p lang="en" dir="ltr">My best tip on how to give better quantitative presentations is to (a) use more plots and (b) build up your plots on multiple overlays, as in:<br><br>- Just x-axis (explain it)<br>- Add y-axis (explain it)<br>- Add 1 data point (explain it)<br>- Plot the rest of the data (explain it)</p>— Matt Blackwell (@matt_blackwell) <a href="https://twitter.com/matt_blackwell/status/991004129198854145?ref_src=twsrc%5Etfw">April 30, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ``` --- # Back Story for Chapter 3. ### Origins in presentation and *empathy* for your audience in presentation... <blockquote class="twitter-tweet"><p lang="en" dir="ltr">My best tip on how to give better quantitative presentations is to (a) use more plots and (b) build up your plots on multiple overlays, as in:<br><br>- Just x-axis (explain it)<br>- Add y-axis (explain it)<br>- Add 1 data point (explain it)<br>- Plot the rest of the data (explain it)</p>— Matt Blackwell (@matt_blackwell) <a href="https://twitter.com/matt_blackwell/status/991004129198854145?ref_src=twsrc%5Etfw">April 30, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- class: inverse ####From source .Rmd: --- ```default ## you are practicing empathy by using data visualization (it's fast); gonna make seeing patterns in your data feel effortless -- ## Visual information channels are "preattentively processed" -- Cleveland and McGill 1984 ## "preattentively processed" == effortlessness ``` --- ## you are practicing empathy by using data visualization (it's fast); gonna make seeing patterns in your data feel effortless -- ## Visual information channels are "preattentively processed" -- Cleveland and McGill 1984 ## "preattentively processed" == effortlessness --- class: inverse ####From source .Rmd: --- ````default ### but you can encode so much in a data viz... ```{r, echo = F, out.width="80%"} knitr::include_graphics("https://clauswilke.com/dataviz/aesthetic_mapping_files/figure-html/common-aesthetics-1.png") ``` Wilke's Fundamentals of data visualization -- ### ...So you really need to talk about *each* encoding (one by one) or the interpretation is lost. ```` --- ### but you can encode so much in a data viz... <img src="https://clauswilke.com/dataviz/aesthetic_mapping_files/figure-html/common-aesthetics-1.png" width="80%" /> Wilke's Fundamentals of data visualization -- ### ...So you really need to talk about *each* encoding (one by one) or the interpretation is lost. --- class: inverse ####From source .Rmd: --- ```default # And when people do, this it is really appreciated... Hans Rosling & BBC in 2010 <iframe width="767" height="431" src="https://www.youtube.com/embed/jbkSRLYSojo?list=PL6F8D7054D12E7C5A" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> https://www.youtube.com/embed/jbkSRLYSojo?list=PL6F8D7054D12E7C5A ``` --- # And when people do, this it is really appreciated... Hans Rosling & BBC in 2010 <iframe width="767" height="431" src="https://www.youtube.com/embed/jbkSRLYSojo?list=PL6F8D7054D12E7C5A" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> https://www.youtube.com/embed/jbkSRLYSojo?list=PL6F8D7054D12E7C5A --- class: inverse ####From source .Rmd: --- ````default # 'Here we go. Life expectancy on the y-axis' ```{r, out.width="80%", echo =FALSE} knitr::include_graphics("images/hans_y_axis.png") ``` ```` --- # 'Here we go. Life expectancy on the y-axis' <img src="images/hans_y_axis.png" width="80%" /> --- class: inverse ####From source .Rmd: --- ````default # 'On the x-axis, wealth' ```{r, out.width="80%", echo =FALSE} knitr::include_graphics("images/hans_x_axis.png") ``` ```` --- # 'On the x-axis, wealth' <img src="images/hans_x_axis.png" width="80%" /> --- class: inverse ####From source .Rmd: --- ````default # 'Colors represent the different continents' ```{r, out.width="80%", echo =FALSE} knitr::include_graphics("images/hans_colors.png") ``` ```` --- # 'Colors represent the different continents' <img src="images/hans_colors.png" width="80%" /> --- class: inverse ####From source .Rmd: --- ````default # 'Size represents population' ```{r, out.width="80%", echo =FALSE} knitr::include_graphics("images/hans_size.png") ``` ```` --- # 'Size represents population' <img src="images/hans_size.png" width="80%" /> --- class: inverse ####From source .Rmd: --- ```default class: inverse, center, middle # Response to empathic presentation? -- # 10 million views... -- (also does animation at the end... which I don't show) ``` --- class: inverse, center, middle # Response to empathic presentation? -- # 10 million views... -- (also does animation at the end... which I don't show) --- class: inverse ####From source .Rmd: --- ```default # Chapter 3. Sequential reveal and automation ## Not me: 'Wow, that is profoundly empathetic'. 🦉🦉🦉 -- ## Me: 'Neat-o! That sounds a lot like the *layered* presentation of graphics.' 🤓🤓🤓 ``` --- # Chapter 3. Sequential reveal and automation ## Not me: 'Wow, that is profoundly empathetic'. 🦉🦉🦉 -- ## Me: 'Neat-o! That sounds a lot like the *layered* presentation of graphics.' 🤓🤓🤓 --- class: inverse ####From source .Rmd: --- ```default <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Good ideas! Very <a href="https://twitter.com/hashtag/ggplot?src=hash&ref_src=twsrc%5Etfw">#ggplot</a>. A layered presentation of graphics. <a href="https://t.co/M4tRB9bGS5">https://t.co/M4tRB9bGS5</a></p>— Gina Reynolds (@EvaMaeRey) <a href="https://twitter.com/EvaMaeRey/status/991269331257487366?ref_src=twsrc%5Etfw">May 1, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ``` --- <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Good ideas! Very <a href="https://twitter.com/hashtag/ggplot?src=hash&ref_src=twsrc%5Etfw">#ggplot</a>. A layered presentation of graphics. <a href="https://t.co/M4tRB9bGS5">https://t.co/M4tRB9bGS5</a></p>— Gina Reynolds (@EvaMaeRey) <a href="https://twitter.com/EvaMaeRey/status/991269331257487366?ref_src=twsrc%5Etfw">May 1, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- class: inverse ####From source .Rmd: --- ```default <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Here, building up a <a href="https://twitter.com/hashtag/ggplot2?src=hash&ref_src=twsrc%5Etfw">#ggplot2</a> as slowly as possible, <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a>. Incremental adjustments. <a href="https://twitter.com/hashtag/rstatsteachingideas?src=hash&ref_src=twsrc%5Etfw">#rstatsteachingideas</a> <a href="https://t.co/nUulQl8bPh">pic.twitter.com/nUulQl8bPh</a></p>— Gina Reynolds (@EvaMaeRey) <a href="https://twitter.com/EvaMaeRey/status/1029104656763572226?ref_src=twsrc%5Etfw">August 13, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ``` --- <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Here, building up a <a href="https://twitter.com/hashtag/ggplot2?src=hash&ref_src=twsrc%5Etfw">#ggplot2</a> as slowly as possible, <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a>. Incremental adjustments. <a href="https://twitter.com/hashtag/rstatsteachingideas?src=hash&ref_src=twsrc%5Etfw">#rstatsteachingideas</a> <a href="https://t.co/nUulQl8bPh">pic.twitter.com/nUulQl8bPh</a></p>— Gina Reynolds (@EvaMaeRey) <a href="https://twitter.com/EvaMaeRey/status/1029104656763572226?ref_src=twsrc%5Etfw">August 13, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- class: inverse ####From source .Rmd: --- ```default ## Emi Tanaka; Semi-automation... <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Inspired by <a href="https://twitter.com/grrrck?ref_src=twsrc%5Etfw">@grrrck</a> and <a href="https://twitter.com/EvaMaeRey?ref_src=twsrc%5Etfw">@EvaMaeRey</a>, made the kunoichi + ninjutsu (ninja-theme) version of <a href="https://twitter.com/hashtag/ggplot?src=hash&ref_src=twsrc%5Etfw">#ggplot</a> tutorial although Garrick already does explaining this in his excellent blog <a href="https://t.co/msXfg14Ztn">https://t.co/msXfg14Ztn</a>. Gist for ninja-theme here: <a href="https://t.co/soHH4Qvz4F">https://t.co/soHH4Qvz4F</a> <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a> <a href="https://t.co/YlRHAGnaUm">pic.twitter.com/YlRHAGnaUm</a></p>— Emi Tanaka @emitanaka@fosstodon.org (@statsgen) <a href="https://twitter.com/statsgen/status/1041279648452108289?ref_src=twsrc%5Etfw">September 16, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ``` --- ## Emi Tanaka; Semi-automation... <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Inspired by <a href="https://twitter.com/grrrck?ref_src=twsrc%5Etfw">@grrrck</a> and <a href="https://twitter.com/EvaMaeRey?ref_src=twsrc%5Etfw">@EvaMaeRey</a>, made the kunoichi + ninjutsu (ninja-theme) version of <a href="https://twitter.com/hashtag/ggplot?src=hash&ref_src=twsrc%5Etfw">#ggplot</a> tutorial although Garrick already does explaining this in his excellent blog <a href="https://t.co/msXfg14Ztn">https://t.co/msXfg14Ztn</a>. Gist for ninja-theme here: <a href="https://t.co/soHH4Qvz4F">https://t.co/soHH4Qvz4F</a> <a href="https://twitter.com/hashtag/rstats?src=hash&ref_src=twsrc%5Etfw">#rstats</a> <a href="https://t.co/YlRHAGnaUm">pic.twitter.com/YlRHAGnaUm</a></p>— Emi Tanaka @emitanaka@fosstodon.org (@statsgen) <a href="https://twitter.com/statsgen/status/1041279648452108289?ref_src=twsrc%5Etfw">September 16, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- class: inverse ####From source .Rmd: --- ````default `r chunk_reveal("pairing", break_type = "replace", replace = '20', replacements = 1:9, display_type = "output", title = "### Unpaired pipeline_steps & graphical_elements")` ```{r pairing, include = F} tibble(function_name = paste0("ggplot2 func '", LETTERS[1:9],"'"), gg_element = paste("grammar move #", 1:9))[1:20,] ``` ```` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 1 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 2 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 3 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 4 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 5 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ## 5 ggplot2 func 'E' grammar move # 5 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 6 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ## 5 ggplot2 func 'E' grammar move # 5 ## 6 ggplot2 func 'F' grammar move # 6 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 7 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ## 5 ggplot2 func 'E' grammar move # 5 ## 6 ggplot2 func 'F' grammar move # 6 ## 7 ggplot2 func 'G' grammar move # 7 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 8 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ## 5 ggplot2 func 'E' grammar move # 5 ## 6 ggplot2 func 'F' grammar move # 6 ## 7 ggplot2 func 'G' grammar move # 7 ## 8 ggplot2 func 'H' grammar move # 8 ``` --- count: false ### Unpaired pipeline_steps & graphical_elements ``` ## # A tibble: 9 × 2 ## function_name gg_element ## <chr> <chr> ## 1 ggplot2 func 'A' grammar move # 1 ## 2 ggplot2 func 'B' grammar move # 2 ## 3 ggplot2 func 'C' grammar move # 3 ## 4 ggplot2 func 'D' grammar move # 4 ## 5 ggplot2 func 'E' grammar move # 5 ## 6 ggplot2 func 'F' grammar move # 6 ## 7 ggplot2 func 'G' grammar move # 7 ## 8 ggplot2 func 'H' grammar move # 8 ## 9 ggplot2 func 'I' grammar move # 9 ``` <style> .panel1-pairing-replace { color: black; width: 99%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-pairing-replace { color: black; width: NA%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-pairing-replace { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse ####From source .Rmd: --- ````default ### Usual pairing? (pairing at all is empathetic! output helps communicat intent of code. Afforeded by dynamic document systems: knitr, quarto, jupytr notebooks.) -- #### Complete code pipeline ```{r, code = knitr::knit_code$get("scatter"), eval = F} ``` -- #### Complete plot ```{r, code = knitr::knit_code$get("scatter"), eval = T, echo = F, out.height="30%"} ``` ```` --- ### Usual pairing? (pairing at all is empathetic! output helps communicat intent of code. Afforeded by dynamic document systems: knitr, quarto, jupytr notebooks.) -- #### Complete code pipeline ```r library(ggplot2) gapminder::gapminder %>% dplyr::filter(year == 2002) %>% ggplot() + aes(y = lifeExp) + aes(x = gdpPercap) + geom_point() + aes(size = pop/1000000000) + aes(color = continent) ``` -- #### Complete plot <img src="flipbooks-lawrence-livermore_double_crochet_files/figure-html/unnamed-chunk-82-1.png" height="30%" /> --- class: inverse ####From source .Rmd: --- ````default ### Possible pairings of functions and gg graphical moves. ```{r, echo = F} tibble(function_name = paste0("ggplot2 func '", LETTERS[1:9],"'")) %>% crossing(gg_element = paste("gg manipulation", 1:9)) %>% mutate(combo = function_name %>% paste(gg_element, sep = "->\n")) %>% ggplot() + aes(x = runif(81), y = runif(81)) + geom_label(aes(label = combo)) ``` # flipbook pairing is 'tidy', like vectors organized in a data frame... ```` --- ### Possible pairings of functions and gg graphical moves. ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/unnamed-chunk-84-1.png)<!-- --> # flipbook pairing is 'tidy', like vectors organized in a data frame... --- class: inverse ####From source .Rmd: --- ````default `r chunk_reveal("babynamesvectors", title = "## Pairing is powerful, 'tidy'; e.g. data frames\n### How many Minnies in 1880?")` ```{r babynamesvectors, include = F} babynames::babynames$name[1:10] babynames::babynames$n[1:10] babynames::babynames$year[1:10] # better when paired... babynames::babynames %>% select(name, year, n) %>% .[1:10,] ``` ```` --- count: false ## Pairing is powerful, 'tidy'; e.g. data frames ### How many Minnies in 1880? .panel1-babynamesvectors-auto[ ```r *babynames::babynames$name[1:10] ``` ] .panel2-babynamesvectors-auto[ ``` ## [1] "Mary" "Anna" "Emma" "Elizabeth" "Minnie" "Margaret" "Ida" ## [8] "Alice" "Bertha" "Sarah" ``` ] --- count: false ## Pairing is powerful, 'tidy'; e.g. data frames ### How many Minnies in 1880? .panel1-babynamesvectors-auto[ ```r babynames::babynames$name[1:10] *babynames::babynames$n[1:10] ``` ] .panel2-babynamesvectors-auto[ ``` ## [1] "Mary" "Anna" "Emma" "Elizabeth" "Minnie" "Margaret" "Ida" ## [8] "Alice" "Bertha" "Sarah" ``` ``` ## [1] 7065 2604 2003 1939 1746 1578 1472 1414 1320 1288 ``` ] --- count: false ## Pairing is powerful, 'tidy'; e.g. data frames ### How many Minnies in 1880? .panel1-babynamesvectors-auto[ ```r babynames::babynames$name[1:10] babynames::babynames$n[1:10] *babynames::babynames$year[1:10] ``` ] .panel2-babynamesvectors-auto[ ``` ## [1] "Mary" "Anna" "Emma" "Elizabeth" "Minnie" "Margaret" "Ida" ## [8] "Alice" "Bertha" "Sarah" ``` ``` ## [1] 7065 2604 2003 1939 1746 1578 1472 1414 1320 1288 ``` ``` ## [1] 1880 1880 1880 1880 1880 1880 1880 1880 1880 1880 ``` ] --- count: false ## Pairing is powerful, 'tidy'; e.g. data frames ### How many Minnies in 1880? .panel1-babynamesvectors-auto[ ```r babynames::babynames$name[1:10] babynames::babynames$n[1:10] babynames::babynames$year[1:10] # better when paired... *babynames::babynames %>% select(name, year, n) %>% .[1:10,] ``` ] .panel2-babynamesvectors-auto[ ``` ## [1] "Mary" "Anna" "Emma" "Elizabeth" "Minnie" "Margaret" "Ida" ## [8] "Alice" "Bertha" "Sarah" ``` ``` ## [1] 7065 2604 2003 1939 1746 1578 1472 1414 1320 1288 ``` ``` ## [1] 1880 1880 1880 1880 1880 1880 1880 1880 1880 1880 ``` ``` ## # A tibble: 10 × 3 ## name year n ## <chr> <dbl> <int> ## 1 Mary 1880 7065 ## 2 Anna 1880 2604 ## 3 Emma 1880 2003 ## 4 Elizabeth 1880 1939 ## 5 Minnie 1880 1746 ## 6 Margaret 1880 1578 ## 7 Ida 1880 1472 ## 8 Alice 1880 1414 ## 9 Bertha 1880 1320 ## 10 Sarah 1880 1288 ``` ] --- count: false ## Pairing is powerful, 'tidy'; e.g. data frames ### How many Minnies in 1880? .panel1-babynamesvectors-auto[ ```r babynames::babynames$name[1:10] babynames::babynames$n[1:10] babynames::babynames$year[1:10] # better when paired... babynames::babynames %>% select(name, year, n) %>% .[1:10,] ``` ] .panel2-babynamesvectors-auto[ ``` ## [1] "Mary" "Anna" "Emma" "Elizabeth" "Minnie" "Margaret" "Ida" ## [8] "Alice" "Bertha" "Sarah" ``` ``` ## [1] 7065 2604 2003 1939 1746 1578 1472 1414 1320 1288 ``` ``` ## [1] 1880 1880 1880 1880 1880 1880 1880 1880 1880 1880 ``` ``` ## # A tibble: 10 × 3 ## name year n ## <chr> <dbl> <int> ## 1 Mary 1880 7065 ## 2 Anna 1880 2604 ## 3 Emma 1880 2003 ## 4 Elizabeth 1880 1939 ## 5 Minnie 1880 1746 ## 6 Margaret 1880 1578 ## 7 Ida 1880 1472 ## 8 Alice 1880 1414 ## 9 Bertha 1880 1320 ## 10 Sarah 1880 1288 ``` ] <style> .panel1-babynamesvectors-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-babynamesvectors-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-babynamesvectors-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse ####From source .Rmd: --- ````default ### {flipbookr} was born ```{r, eval = F} remotes::install.github("EvaMaeRey/flipbookr") install.packages("xaringan") ``` RConsortium Grant. Thanks! ```` --- ### {flipbookr} was born ```r remotes::install.github("EvaMaeRey/flipbookr") install.packages("xaringan") ``` RConsortium Grant. Thanks! --- class: inverse ####From source .Rmd: --- ````default # Live demo - with flipbookr ```{r, eval = F} install.packages("xaringan") remotes::install_github("EvaMaeRey/flipbookr") ``` ## RStudio -> File -> New File -> R Markdown -> From Template -> Template: A Minimal Flipbook ```` --- # Live demo - with flipbookr ```r install.packages("xaringan") remotes::install_github("EvaMaeRey/flipbookr") ``` ## RStudio -> File -> New File -> R Markdown -> From Template -> Template: A Minimal Flipbook --- class: inverse ####From source .Rmd: --- ```default # In the backgroud flipbookr::chunk_reveal(): -- ## grabs code from chunk, -- parses it, -- explodes it into partial builds, -- inserts each partial build into individual slides for presentation in Xaringan ``` --- # In the backgroud flipbookr::chunk_reveal(): -- ## grabs code from chunk, -- parses it, -- explodes it into partial builds, -- inserts each partial build into individual slides for presentation in Xaringan --- class: inverse ####From source .Rmd: --- ```default # Flipbooks feel magical... -- # Flipbookr makes, creating a flipbook is manigeable, but not quite magical ... ``` --- # Flipbooks feel magical... -- # Flipbookr makes, creating a flipbook is manigeable, but not quite magical ... --- class: inverse ####From source .Rmd: --- ```default ### But it could magical w/ a chunk_reveal() modified behaivior for on-demand mini flipbooks from within live session (rmd/qmd). -- ### Using Bodwin's live chunk getting strategy as used in {flair}. https://github.com/EvaMaeRey/knitcodegetlive, (working) -- ### and rstudioapi::viewer... (not working) -- ### and maybe addin... (to be added). -- ### only getting started with .qmd (He) ``` --- ### But it could magical w/ a chunk_reveal() modified behaivior for on-demand mini flipbooks from within live session (rmd/qmd). -- ### Using Bodwin's live chunk getting strategy as used in {flair}. https://github.com/EvaMaeRey/knitcodegetlive, (working) -- ### and rstudioapi::viewer... (not working) -- ### and maybe addin... (to be added). -- ### only getting started with .qmd (He) --- class: inverse ####From source .Rmd: --- ```default # Stats 101 classroom goal... ### New efforts to create `chunk_reveal_live` might put this tech in the hands of more coding newcomers; including on-the-fly classroom use. Arguably the people that might find flipbooks the most useful --- people who aren't going to be able to 'just-read' a pipeline of code --- might find them even more engaging when they are used to review and present on the most interesting pipelines: their own explorations of their own data. ``` --- # Stats 101 classroom goal... ### New efforts to create `chunk_reveal_live` might put this tech in the hands of more coding newcomers; including on-the-fly classroom use. Arguably the people that might find flipbooks the most useful --- people who aren't going to be able to 'just-read' a pipeline of code --- might find them even more engaging when they are used to review and present on the most interesting pipelines: their own explorations of their own data. --- class: inverse ####From source .Rmd: --- ````default `r chunk_reveal("stats_101")` ```{r stats_101, include = F} library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + geom_point() + geom_smooth(method = lm, se = F) + stat_fit(method = lm, geom = "point", color = "blue") + stat_fit(method = lm, geom = "segment", color = "red") + geom_smooth(method = lm) ``` ```` --- count: false .panel1-stats_101-auto[ ```r *library(ggplot2) ``` ] .panel2-stats_101-auto[ ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) *library(ggsmoothfit) # stat fit below ``` ] .panel2-stats_101-auto[ ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below *mtcars ``` ] .panel2-stats_101-auto[ ``` ## mpg cyl disp hp drat wt qsec vs am gear carb ## Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 ## Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 ## Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 ## Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 ## Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 ## Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 ## Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4 ## Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2 ## Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2 ## Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4 ## Merc 280C 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4 ## Merc 450SE 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3 ## Merc 450SL 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3 ## Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3 ## Cadillac Fleetwood 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4 ## Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4 ## Chrysler Imperial 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4 ## Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1 ## Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2 ## Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1 ## Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 ## Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2 ## AMC Javelin 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2 ## Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4 ## Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2 ## Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 ## Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2 ## Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2 ## Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4 ## Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6 ## Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8 ## Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2 ``` ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% * ggplot() ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + * aes(x = wt) ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + * aes(y = mpg) ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + * geom_point() ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + geom_point() + * geom_smooth(method = lm, se = F) ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + geom_point() + geom_smooth(method = lm, se = F) + * stat_fit(method = lm, * geom = "point", * color = "blue") ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + geom_point() + geom_smooth(method = lm, se = F) + stat_fit(method = lm, geom = "point", color = "blue") + * stat_fit(method = lm, * geom = "segment", * color = "red") ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-stats_101-auto[ ```r library(ggplot2) library(ggsmoothfit) # stat fit below mtcars %>% ggplot() + aes(x = wt) + aes(y = mpg) + geom_point() + geom_smooth(method = lm, se = F) + stat_fit(method = lm, geom = "point", color = "blue") + stat_fit(method = lm, geom = "segment", color = "red") + * geom_smooth(method = lm) ``` ] .panel2-stats_101-auto[ ![](flipbooks-lawrence-livermore_double_crochet_files/figure-html/stats_101_auto_11_output-1.png)<!-- --> ] <style> .panel1-stats_101-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-stats_101-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-stats_101-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse ####From source .Rmd: --- ```default ## Flipbooks and proverb about learning ### Tell me and I forget. -- ### Show me, I remember. (creating flipbooks for others) -- ### Let me do and, I understand. (making flipbooks more accessible) ``` --- ## Flipbooks and proverb about learning ### Tell me and I forget. -- ### Show me, I remember. (creating flipbooks for others) -- ### Let me do and, I understand. (making flipbooks more accessible) --- class: inverse ####From source .Rmd: --- ```default ### Extending the proverb... ### Let me tell you about what I've done, I expose what I might not fully understand... -- (and then ask newcomers to talk you though *their* pipeline) ### Flipbooks I make myself, let me reflect on what I've done, -- in a step by step way. -- In a workshop or classroom setting, too, I can go through verbalizing with my peers & instructor about what I've done -- I understand more profoundly -- and my peers & instructor can help straighten out any misunderstandings. ``` --- ### Extending the proverb... ### Let me tell you about what I've done, I expose what I might not fully understand... -- (and then ask newcomers to talk you though *their* pipeline) ### Flipbooks I make myself, let me reflect on what I've done, -- in a step by step way. -- In a workshop or classroom setting, too, I can go through verbalizing with my peers & instructor about what I've done -- I understand more profoundly -- and my peers & instructor can help straighten out any misunderstandings. --- class: inverse ####From source .Rmd: --- ```default ## What'd be needed for the paper I want to publish. ## Data. -- Eyetracking data probably about how people are actually use and interact with flipbooks. ``` --- ## What'd be needed for the paper I want to publish. ## Data. -- Eyetracking data probably about how people are actually use and interact with flipbooks.