diff --git a/data-visualize.qmd b/data-visualize.qmd index 967e635..2c723fc 100644 --- a/data-visualize.qmd +++ b/data-visualize.qmd @@ -700,7 +700,7 @@ We can use stacked bar plots to visualize the relationship between two categoric For example, the following two stacked bar plots both display the relationship between `island` and `species`, or specifically, visualizing the distribution of `species` within each island. The first plot shows the frequencies of each species of penguins on each island. -The plot of frequencies show that there are equal numbers of Adelies on each island. +The plot of frequencies shows that there are equal numbers of Adelies on each island. But we don't have a good sense of the percentage balance within each island. ```{r} @@ -710,7 +710,7 @@ ggplot(penguins, aes(x = island, fill = species)) + geom_bar() ``` -The second plot is a relative frequency plot, created by setting `position = "fill"` in the geom is more useful for comparing species distributions across islands since it's not affected by the unequal numbers of penguins across the islands. +The second plot, a relative frequency plot created by setting `position = "fill"` in the geom, is more useful for comparing species distributions across islands since it's not affected by the unequal numbers of penguins across the islands. Using this plot we can see that Gentoo penguins all live on Biscoe island and make up roughly 75% of the penguins on that island, Chinstrap all live on Dream island and make up roughly 50% of the penguins on that island, and Adelie live on all three islands and make up all of the penguins on Torgersen. ```{r}