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