Skip to content

Commit

Permalink
Merge pull request #688 from jhudsl/images-added
Browse files Browse the repository at this point in the history
Added Allison Horst's awesome illustrations
  • Loading branch information
avahoffman authored Jan 21, 2025
2 parents 975d4b7 + 307198c commit f09c9af
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/Data_Visualization/Data_Visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ Slide Credit: Tanya Shapiro

- [ggplot2 gallery](https://www.r-graph-gallery.com/ggplot2-package.html)

```{r, fig.alt="ggplot with cartoon artists assembling works of art.", out.width = "40%", echo = FALSE, fig.show='hold',fig.align='center'}
knitr::include_graphics("img/ggplot2_masterpiece.jpeg")
```

Artwork by @allison_horst. https://allisonhorst.com/

## Tidy data

To make graphics using `ggplot2`, our data needs to be in a **tidy** format
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions modules/Manipulating_Data_in_R/Manipulating_Data_in_R.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ wide <- long %>% pivot_wider(names_from = "name",
wide
```

## `gather()` and `spread()`

```{r, fig.alt="Gather and spread functions in cartoon form.", out.width = "50%", echo = FALSE, align = "center"}
knitr::include_graphics("images/gatherspread.jpeg")
```

Artwork by @allison_horst. https://allisonhorst.com/

## Summary

- `tidyr` package (part of `tidyverse`) helps us convert between wide and long data
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f09c9af

Please sign in to comment.