Pie and Donut Charts
Learn how to build a pie chart and a donut chart in ggplot2.
Getting started with pie charts in ggplot2
A circular statistical graph with sections that show numerical proportion is known as a pie chart. The arc length of each slice in the pie chart is equivalent to the count or proportion of that slice.
Pie charts are useful for quickly comparing different categories of a variable in relation to the whole. However, pie charts are a better choice when used to represent a variable with just a few categories, whereas bar charts are generally considered a better option for comparing several categories at once.
For example, we have the following dataset:
Get hands-on with 1200+ tech skills courses.