Pie charts are very popular data visualization tools with the lay public and scientists for representing fractions of a whole. In this Code Club, Pat will show how to create a pie chart in R using ggplot2. He'll also point out why a pie chart is rarely (ever?) the appropriate tool for the job. Regardless, if you're forced to use a pie chart, he'll show how you can use the ggplot R package to make the most of the medium.
Pat will use RStudio and the #coord_polar and #facet_wrap from the #ggplot2 package. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-05-14-pie-chart.
Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance!
If you're interested in taking an upcoming 3 day R workshop, email me at
[email protected]!
R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_data/releases/latest
Workshops: https://www.mothur.org/wiki/workshops
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/
0:00 Introduction
4:33 Critique of pie charts
9:15 Recreating stacked barcharts
10:22 Creating concentric pie charts / donut plots
17:19 Creating faceted pie charts
24:13 Recap