diff --git a/source/viz.Rmd b/source/viz.Rmd index 71c9e924e..aabd7107d 100644 --- a/source/viz.Rmd +++ b/source/viz.Rmd @@ -895,10 +895,13 @@ islands_df Here, we have a data frame of Earth's landmasses, and are trying to compare their sizes. The right type of visualization to answer this question is a bar plot. -In a bar plot, the height of the bar represents the value of a summary statistic -(usually a size, count, proportion or percentage). -They are particularly useful for comparing summary statistics between different -groups of a categorical variable. +In a bar plot, the height of each bar represents the value of an *amount* +(a size, count, proportion, percentage, etc). +They are particularly useful for comparing counts or proportions across different +groups of a categorical variable. Note, however, that bar plots should generally not be +used to display mean or median values, as they hide important information about +the variation of the data. Instead it's better to show the distribution of +all the individual data points, e.g., using a histogram, which we will discuss further in Section \@ref(histogramsviz). We specify that we would like to use a bar plot via the `geom_bar` function in `ggplot2`. @@ -995,7 +998,7 @@ visualization for answering our original questions. Landmasses are organized by their size, and continents are colored differently than other landmasses, making it quite clear that continents are the largest seven landmasses. -### Histograms: the Michelson speed of light data set +### Histograms: the Michelson speed of light data set {#histogramsviz} The `morley` data set \index{Michelson speed of light} contains measurements of the speed of light collected in experiments performed in 1879.