class: middle, right, title-slide .title[ # Conclusion to Tidyverse ] .author[ ### Athanasia Monika Mowinckel ] --- layout: true <div class="my-sidebar"></div> --- - **Introduction to [tidyverse](https://www.tidyverse.org/) concepts** (15 minutes) - **Tidy data wrangling** - with translations to base-R (~ 2 hours) - plotting data with [ggplot2](https://ggplot2.tidyverse.org/) (~25 min) - sub-setting data with [dplyr](https://dplyr.tidyverse.org/) (~25 min) - chaining commands with the pipe `|>` (~10 min) - adding and altering variables with [dplyr](https://dplyr.tidyverse.org/) (~25 min) - **Lunch break** (30 min) - **Tidy data reshaping & summaries** - avoiding loops (~ 1.5 hours) - pivoting data with [tidyr](https://tidyr.tidyverse.org/) (~25 min) - grouped summaries with [dplyr](https://dplyr.tidyverse.org/) (~25 min) - working with nested data using [purrr](https://purrr.tidyverse.org/) (~25 min) --- background-image: url(img/hex_yes.png) background-size: 15% background-position: 37% 20% ## The packages .pull-left[ ### Covered here |Package|Functions| |------|--------| | dplyr | data manipulation - altering and adding variables in a dataset | | tidyr | data tidying - changing data shape and structure | | ggplot2 | data visualisation | | purrr | Enhancements on functional programming | ] --- background-image: url(img/hex_yes.png), url(img/hex_not.png) background-size: 15% background-position: 37% 20%, 90% 20% ## The packages .pull-left[ ### Covered here |Package|Functions| |------|--------| | dplyr | data manipulation - altering and adding variables in a dataset | | tidyr | data tidying - changing data shape and structure | | ggplot2 | data visualisation | | purrr | Enhancements on functional programming | ] .pull-right[ ### Not covered |Package|Functions| |------|--------| | readr | easy and fast importing of data | | tibble | variations on the R data.frame | | forcats | working with factors/categorical data | | stringr | working with strings/characters | ] --- background-image: url(img/dplyr.png) background-size: 8% background-position: 95% 5% # grammar of data manipulation .pull-left[ **provides a consistent set of verbs that help you solve the most common data manipulation challenges:** - `select()` picks variables based on their names. - `filter()` picks cases based on their values. - `mutate()` - adds or alters variables that are functions of existing variables - `summarise()` reduces multiple values down to a single summary. - `arrange()` changes the ordering of the rows. ] .pull-right[ <a style="color: #009fe3";> **Combined with functions like** </a> - `group_by()` - Group the data set by variables - `nest_by()` - Nest data by columns - `across` - Apply functions across multiple columns <a style="color: #94c11f";> **Tidy-selectors like: ** </a> - `contains()` - select by variables containing a string - `starts_with()` - select by variables starting with a string - `ends_with()` - select by variables ending with a string ] --- class: right background-image: url(img/hexs.png) background-size: contain ## Fin follow me: [@DrMowinckels](https://twitter.com/DrMowinckels) Read my blog: [DrMowinckels.io](https://drmowinckels.io/)