layout: true <!-- <div class="my-footer"><span>arm.rbind.io/slides/xaringan</span></div> --> <!-- this adds the link footer to all slides, depends on my-footer class in css--> --- name: xaringan-title class: left, middle background-image: url(img/background.jpg) background-size: cover # <img src="img/pokemonggplot.jpg" alt="pokemonggplot" width="500" /> ### .fancy[R Data Visualization Workshop] .large[Winson Yang | Texas Tech University | 2021-07-13] <!-- this ends up being the title slide since seal = FALSE--> --- # Acknowledgements .pull-left[ .pull-left[ <img style="border-radius: 50%;" src="img/ttu_dept.jpg" width="150px"/> [TTU Department of Psychological Sciences](https://www.depts.ttu.edu/psy/) ] .pull-right[ <img style="border-radius: 50%;" src="img/rmorgan.jpg" width="150px"/> [Dr Robert Morgan, Department Chair](https://www.depts.ttu.edu/psy/people/rmorgan/index.php) ] ] .pull-right[ .pull-left[ <img style="border-radius: 50%;" src="img/Sean_Obryan2.jpg" width="150px"/> [Sean O'Bryan, Psychological Sciences Graduate Student Advisory Council](https://www.depts.ttu.edu/psy/caprockscience/people.php) ] .pull-right[ <img style="border-radius: 50%;" src="img/Josh_Brown.jpg" width="150px"/> [Joshua Brown, Psychological Sciences Graduate Student Advisory Council](https://www.depts.ttu.edu/psy/sith/people.php) ] ] <img style="border-radius: 50%;" src="img/allisonhorst.jpg" width="150px"/> [Artwork by Dr Allison Horst @allison_horst](https://twitter.com/allison_horst) --- class: right, middle <img class="rounded-circle" src="https://github.com/winsonfzyang.png" width="150px"/> # Find me at... [
@winsonfzyang](http://twitter.com/winsonfzyang) [
@winsonfzyang](http://github.com/winsonfzyang) [
winsonfzyang.github.io](https://winsonfzyang.rbind.io) [
winson.yang@ttu.edu](mailto:winson.yang@ttu.edu) --- # Who am I -- Third year Experimental (Cognitive) Psychology student. - Projects include Neuromodulation (neurofeedback, brain stimulation), Neuroscience of Meditation, Mental flexibility, Neurodegeneration, Cancer caregiving -- Other projects - data visualization, UX/UI, software development for neuroscientists and psychologists - Environmental sustainability for the neuroimaging community - Mentoring and Programming Education --- background-image: url(img/welcome_to_rstats_twitter.png) background-position: center background-size: contain class: center, bottom --- # Workshop aims learn how to use the `ggplot` package from the `tidyverse` collection: - data visualization and `ggplot2` grammar - creating different types of plots - customizing plots - emphasizing your data It is okay if you do not understand R at all. We have line-by-line examples and code for you to follow through --- class: inverse, middle, center # Day I: Basic Data Visualization --- background-image: url(img/ggplot2_exploratory.png) background-position: center background-size: contain class: center, bottom --- # Why ggplot * Automatic legends, colors, etc. * Easy superposition, facetting, etc. * Nice rendering (yet, I don't like the default grey theme). * Store any ggplot2 object for modification or future recall. Super useful for packages. * Lots of users (less bugs, much help on Stack Overflow). * Lots of extensions. * Nice saving option. --- # Grammar of ggplot <center> <img src="img/ggplot_grammar.jpg" width="500"> </center> --- # Three wild plots we will cover today! .pull-left[ <center> <img src="img/who_bar1.jpg" width="500"> </center> ] .pull-right[ .pull-top[ <center> <img src="img/who_histogram1.jpg" width="400"> </center> ] .pull-bottom[ <center> <img src="img/who_scatter1.jpg" width="400"> </center> ] ] --- class: center, middle # Sample plot we will create over the two days ![](Day1_basic-ggplot_files/figure-html/unnamed-chunk-1-1.png)<!-- --> --- class: center, middle # Additional notes Along the workshop, I will try to share as many best practices as possible. These will be denoted by an fyi box like this: <div class="fyi"> This is a best practice in R coding (or at least i think it is) </div> <div class="puzzle"> This is an exercise for you to complete </div> <div class="note"> This is a is a hint for the exercise </div> --- class: center, middle # Thanks! # Now let's get hands-on! Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan).