Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
expand learning outcomes for chapter 2

Co-authored-by: Joel Ostblom <joelostblom@users.noreply.github.com>
  • Loading branch information
rorywhite200 and joelostblom authored Nov 4, 2024
1 parent 6a78cf6 commit bb15e36
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions textbook/2_grouping.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ def show_df(df):
```

::: {.callout-note title="Learning outcomes"}
- **Explain** how grouping allows you to directly compare categories and helps you to avoid making incorrectly generalized conclusions (e.g., Simpson’s Paradox).
- **Explain** the two main purposes of grouping:
1. Making direct comparisons between categories/groups, e.g. observations in group A tends to have higher values that those in group B
2. Avoid making incorrectly generalized conclusions, e.g. there is a general positive trend when all data is looked at together, but grouping reveals that there is actually a negative trend for each group.

- **Apply** grouping strategies using color, size, shape and position to visually distinguish between categories via `.encode(color='category')` and `aes(color=category)`.
- **Evaluate** which grouping strategy is the most suitable in a specific context.
- Position, color, shape, and size are the most effective to compare exact values between groups since they enable observations to be drawn close to each other in the same chart.
- Faceting is the most effective when compare overall patterns or trends between groups, since it shows all the values for each group separately from the other groups' values.

- **Apply** grouping strategies using color, size, shape and position to visually distinguish between categories, e.g. `encode(color='category')` and `aes(color=category)`.

- **Apply** the faceting grouping strategy via `facet` and `facet_wrap` method to split data into separate facets/subplots.

- **Apply** the `facet` method to split data into separate subplots, revealing patterns in each group.

- **Select** the grouping strategy that best highlights your key comparison. Use color to focus on specific values, and apply faceting to reveal broader trends across categories.

:::

Expand Down

0 comments on commit bb15e36

Please sign in to comment.