Whole game edits (#1184)
* Reflect new part structure * Mention all chapters * Hide the ruler * Crossref diagram * Fix crossref * Mention all import chapters * Fix link to following chapter * Fix title and summary * Add intros * Consistent chunk style?
This commit is contained in:
committed by
GitHub
parent
0b557e0da7
commit
69df813e31
@@ -15,7 +15,7 @@ R has several systems for making graphs, but ggplot2 is one of the most elegant
|
||||
ggplot2 implements the **grammar of graphics**, a coherent system for describing and building graphs.
|
||||
With ggplot2, you can do more and faster by learning one system and applying it in many places.
|
||||
|
||||
This chapter will teach you how to visualize your data using ggplot2.
|
||||
This chapter will teach you how to visualize your data using **ggplot2**.
|
||||
We will start by creating a simple scatterplot and use that to introduce aesthetic mappings and geometric objects -- the fundamental building blocks of ggplot2.
|
||||
We will then walk you through visualizing distributions of single variables as well as visualizing relationships between two or more variables.
|
||||
We'll finish off with saving your plots and troubleshooting tips.
|
||||
@@ -567,7 +567,7 @@ In the following sections you will learn about commonly used plots for visualizi
|
||||
|
||||
To visualize the relationship between a numerical and a categorical variable we can use side-by-side box plots.
|
||||
A **boxplot** is a type of visual shorthand for a distribution of values that is popular among statisticians.
|
||||
Each boxplot consists of:
|
||||
As shown in @fig-eda-boxplot, each boxplot consists of:
|
||||
|
||||
- A box that stretches from the 25th percentile of the distribution to the 75th percentile, a distance known as the interquartile range (IQR).
|
||||
In the middle of the box is a line that displays the median, i.e. 50th percentile, of the distribution.
|
||||
@@ -579,7 +579,10 @@ Each boxplot consists of:
|
||||
- A line (or whisker) that extends from each end of the box and goes to the farthest non-outlier point in the distribution.
|
||||
|
||||
```{r}
|
||||
#| label: fig-eda-boxplot
|
||||
#| echo: false
|
||||
#| fig-cap: >
|
||||
#| Diagram depicting how a boxplot is created.
|
||||
#| fig-alt: >
|
||||
#| A diagram depicting how a boxplot is created following the steps outlined
|
||||
#| above.
|
||||
@@ -848,7 +851,7 @@ We started with the basic idea that underpins ggplot2: a visualization is a mapp
|
||||
You then learned about increasing the complexity and improving the presentation of your plots layer-by-layer.
|
||||
You also learned about commonly used plots for visualizing the distribution of a single variable as well as for visualizing relationships between two or more variables, by levering additional aesthetic mappings and/or splitting your plot into small multiples using faceting.
|
||||
|
||||
We'll use visualizations again and again through out this book, introducing new techniques as we need them as well as do a deeper dive into creating visualizations with ggplot2 in @sec-layers through @sec-eda.
|
||||
We'll use visualizations again and again through out this book, introducing new techniques as we need them as well as do a deeper dive into creating visualizations with ggplot2 in @sec-layers through @sec-exploratory-data-analysis.
|
||||
|
||||
With the basics of visualization under your belt, in the next chapter we're going to switch gears a little and give you some practical workflow advice.
|
||||
We intersperse workflow advice with data science tools throughout this part of the book because it'll help you stay organize as you write increasing amounts of R code.
|
||||
|
||||
Reference in New Issue
Block a user