5 Common Graphs (O to Z)

This section covers common graphs and visualization techniques for examining and summarizing your data. Graphs range from O to Z.

Visualization Techniques:

  • Pie Charts:

5.1 Pie Chart

An example of a pie chart is shown below:

5.1.1 Overview and Summary

Pie charts are used to display proportions or percentages. Each “slice” of a pie represents a different category and will have an associated percentage.

5.1.2 Common Applications

Pie charts are useful to summarize and compare categories in percentage or relative terms.

5.1.3 Interpretation

Generally, the size of a slice corresponds to the proportion of the category relative to others. While pie charts are useful at a glance, it can be difficult to determine exactly how much larger or smaller one category is.

5.1.4 Doing It In R

In the below, we create pie charts that break down the GDP of Mauritania by sector. Data is pulled on 10/04/2020 from Wikipedia.

5.1.4.1 Pie Chart In Base R

Pie charts in base R can be created with the pie() function. The below is an example with code. To build one, you need a vector of values and a vector of labels. The vector of values do NOT have to be in percent form. They can be the original values - R will automatically scale them within the pie chart.

5.1.5 Sources and Useful Links

Sources:

Useful Links: