Pareto Charts in R (and in life)

posted in: Technology | 0

Pareto charts are a fantastic tool to visually expose the “vital few” in the “useful many”

Mike's R Publication with Pareto ChartsThe vital few being the largest contributing factors to a situation or problem. For example, a Pareto chart can highlight the most severe weather events in terms of human safety. A city planner or insurance provider may be interested in to know what events are responsible for the most injuries and fatalities in a region. A Pareto chart clearly shows the vital few deadliest events (Spoiler alert: tornados). I published a brief example analysis of severe weather events in the U.S. Click here to see the analysis along with the Pareto chart.

The Pareto Principle

An Italian economist, Vilfredo Pareto, found that 20 percent of the population in Italy owned 80 percent of the property. Ever since, he and many others have noticed a similar ratio where most results are determined by a small number of causes. The Pareto principle is also commonly known as the 80/20 rule. Awareness of this seemingly natural tendency is very useful in everyday life. It can help focus your energies on what is most important to you. For example,

  • 20% of your time may produce 80% of your accomplishments
  • 20% of your network may contribute 80% of your opportunities
  • In the example above, three severe weather event types account for 80% of injuries and fatalities in the U.S.

The actual ratio may vary, but the point is to focus on the vital few.

The Pareto Chart

Below is the Pareto chart from the severe weather analysis.  There are three axes presented,

  1. Along the bottom, the x-axis shows the category
  2. The y-axis on the left shows the sum of the occurrences of each category
  3. The y-axis on the right shows the accumulative percentage of all risks

You can quickly see that tornadoes are the riskiest weather event. The accumulative risk line indicates that only three event types are responsible for 80% of all fatalities and injuries.

Of course, there are numerous ways to create Pareto charts. Throughout my career, I have used Excel, R, PowerBI, and Minitab. Below is how to create one in R.

Creating Pareto Charts in R

My preferred library for Pareto charts is QCC. It produces a nice visualization along with the underlying table. Below is an example of the R syntax and the resulting chart

Pareto chart example using the QCC R library

Leave a Reply