Visualizing the Pareto Chart in Python

Harsha S
2 min readJul 19, 2021

Before getting into Pareto chart, let’s understand what Pareto principle is all about.

Pareto principle states that 80% of the results come from the 20% of the actions. It was first put up by Vilfredo Pareto, an Italian economist, when he discovered that 80% of the land in Italy, was owned by 20% of the people.

It is also called as the 80/20 rule or the law of the vital few. This principle can be applied to everyday examples,

  • 20% of the apps account for 80% of your smartphone usage.
  • 20% of your house is where you stay, 80% of the time.
  • 20% of your clothes is what you wear, 80% of the time.

You could also use this principle to boost your productivity. We all have limited amount of time, but a lot of tasks to complete. Make a list of all these tasks, and figure out which task can have a major impact on your life. The 80/20 productivity rule is a prime example of working smart, over working hard.

What is the Pareto Chart?

A Pareto chart is a straightforward bar diagram that positions related measures in diminishing request of event. It is a kind of diagram that contains the bars and a line chart, where individual qualities are addressed in dropping request by bars, and the aggregate complete is addressed by the line.

Source: Wikipedia

Import the necessary libraries

Read the CSV file

Basic Preprocessing steps

Let’s consider only the year 2020

Set Country as the index

Plot the Pareto Chart using Matplotlib

Thanks for your time!

Connect with me on Linkedin: https://www.linkedin.com/in/harshavardhans198/

--

--

Harsha S

NLP Engineer | I love to write about AI in beginner way