Whole game feedback from O'Reilly (#1057)
* Redraw data science process diagrams * Polishing the whole game * Add reference to TMWR * Respond to visualization feedback * Minor changes * Better integrate workflow-scripts chapter * Minor getting help polishing * Update investing in yourself links * Redraw RStudio screenshots * More scripts/projects polishing Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>
This commit is contained in:
@@ -214,7 +214,7 @@ In hindsight, these cars were unlikely to be hybrids since they have large engin
|
||||
|
||||
In the above example, we mapped `class` to the color aesthetic, but we could have mapped `class` to the size aesthetic in the same way.
|
||||
In this case, the exact size of each point would reveal its class affiliation.
|
||||
We get a *warning* here, because mapping an unordered variable (`class`) to an ordered aesthetic (`size`) is generally not a good idea.
|
||||
We get a *warning* here: mapping an unordered variable (`class`) to an ordered aesthetic (`size`) is generally not a good idea because it implies a ranking that does not in fact exist.
|
||||
|
||||
```{r}
|
||||
#| fig-alt: >
|
||||
@@ -824,11 +824,16 @@ Other graphs, like bar charts, calculate new values to plot:
|
||||
- boxplots compute a robust summary of the distribution and then display that summary as a specially formatted box.
|
||||
|
||||
The algorithm used to calculate new values for a graph is called a **stat**, short for statistical transformation.
|
||||
The figure below describes how this process works with `geom_bar()`.
|
||||
@fig-vis-stat-bar shows how this process works with `geom_bar()`.
|
||||
|
||||
```{r}
|
||||
#| label: fig-vis-stat-bar
|
||||
#| echo: false
|
||||
#| out-width: "100%"
|
||||
#| fig-cap: >
|
||||
#| When create a bar chart we first start with the raw data, then
|
||||
#| aggregate it to count the number of observations in each bar,
|
||||
#| and finally map those computed variables to plot aesthetics.
|
||||
#| fig-alt: >
|
||||
#| A figure demonstrating three steps of creating a bar chart.
|
||||
#| Step 1. geom_bar() begins with the diamonds data set. Step 2. geom_bar()
|
||||
@@ -1149,7 +1154,8 @@ There are three other coordinate systems that are occasionally helpful.
|
||||
```
|
||||
|
||||
- `coord_quickmap()` sets the aspect ratio correctly for maps.
|
||||
This is very important if you're plotting spatial data with ggplot2 (which unfortunately we don't have the space to cover in this book).
|
||||
This is very important if you're plotting spatial data with ggplot2.
|
||||
We don't have the space to discuss maps in this book, but you can learn more in the [Maps chapter](https://ggplot2-book.org/maps.html) of *ggplot2: Elegant graphics for data analysis*.
|
||||
|
||||
```{r}
|
||||
#| layout-ncol: 2
|
||||
|
||||
Reference in New Issue
Block a user