-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-components-of-closeread.qmd
46 lines (35 loc) · 1.36 KB
/
1-components-of-closeread.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: "Components of Closeread"
format: html
---
This article is an introduction to the different components of a Closeread document. The three components of every Closeread document are:
1. A cr-section
2. One or more stickies
3. Triggers to draw focus to stickies
To kick the tires on these components, let's look at an simplified example of a study of penguins. It will feature three stickies: an image, a table generated from data, and a plot generated from data.
Penguins can be found as far north as the beaches of South Africa.
![Credit: Casey Allen (westbeach013), Unsplash](images/beach-penguins.jpg)
For this analysis we'll look at data collected on penguins in the Palmer Archipelago in Antarctica.
Here is a glimpse of the first 10 penguins in the data set.
```{r}
#| message: false
library(tidyverse)
library(palmerpenguins)
library(gt)
penguins |>
slice_head(n = 10) |>
select(species, island, bill_length_mm, bill_depth_mm) |>
gt()
```
Not surprisingly, the depth of the bill increases as the length of the bill increases. However, each species has distinct ranges of length and depth that are observed.
```{r}
#| warning: false
#| fig-width: 5
#| fig-asp: 0.618
ggplot( penguins,
aes(x = bill_length_mm, y = bill_depth_mm,
color = species, shape = species)) +
geom_point() +
labs(x = "Bill length (mm)", y = "Bill depth (mm)") +
theme_bw()
```