class: center, middle, inverse, title-slide .title[ #
P4
| Interactive and dynamic data visualization ] .subtitle[ ## First steps with
shiny
] .author[ ###
Marta Coronado Zamora and Miriam Merenciano
] .date[ ### 13 March 2025 ] --- class: center, middle, animated, bounceInDown <style> .title-slide { background-image: url(https://fibvisiona.com/sites/default/files/inline-images/logo-upc.png); background-size: 300px; } </style> # Keep in touch | Miriam Merenciano | |:-:| | <a href="mailto:miriam.merenciano@univ-lyon1.fr"><i class="fa fa-paper-plane fa-fw"></i> miriam.merenciano@univ-lyon1.fr </a> | | <a href="https://lbbe.univ-lyon1.fr/fr/"><i class="fa fa-map-marker fa-fw"></i> Laboratory of Biometry and Evolutionary Biology </a> | --- layout: true class: animated, fadeIn --- # Session content - Solving doubts - Exercise: Interactive and dynamic visualization: first steps with `shiny` (`P4_exercises.Rmd`) - Group project: part C --- # Practice <i class="fas fa-cogs"></i> ## Interactive and dynamic visualization: first steps with `shiny` - Open the document `P4_exercises.Rmd` in RStudio and complete the exercises. - Upload the completed documents (app.R and Rmd files) to [ATENEA](https://atenea.upc.edu/login/index.php) at the end of the session. --- # Project ## Group project ### Parts - **Part A** | Understand the origin of our data set and the meaning of the variables - **Part B** | Visually describe our data set - **Part C** | Make figures interactive --- # Project ## Group project __Part A__ - Describe your data set: + Where and why was the information collected? + Which is the meaning of each variable? + Do the variables have unit? Which one? + Does the data set have a long format? --- # Project ## Group project __Part B__ - Write the code to: + Read it into R + Reshape the data if necessary into long format + Check the variable classes and update them if necessary - Explore your data using `ggplot2` graphics + Represent the __distribution of the variables__: pick one continuous variable and one discrete variable and use histograms or bar graphs to show their distribution + __Summarize the data__: use one geom to summarize data (e.g.: `geom_smooth`, boxplots, ...) of two variables - Explain your data with graphics and text + Choose the __three graphics__ that better describe your data + __Customize__ and __annotate__ them + Accompany the figures with your __hypothesis__ and/or __interpretation__ --- # Project ## Group project __Part C__ - Make your figures interactive in three different ways (one for each figure): + Make an interactive visualisation using some `htmlwidget` + Add __interactive controls__ with `shiny` input widgets to show some useful information (eg. focus on a subset, add a summary layer...). Use: modify what we see or filter the data. + Make an __interactive visualisation__ using `shiny` built-in interactive options in order to print the information of the individual observations. Use: making the plot itself interactive. - Decide which figure would benefit from each type of interactivity and justify your choice -- Add everything (__tidy__) to the initial `R Markdown` document and __submit it before the next practical session__ (one per group). ---