Visualizing Data with Bar, Pie and Pareto Charts

Join over 2 million students who advanced their careers with 365 Data Science. Learn from instructors who have worked at Meta, Spotify, Google, IKEA, Netflix, and Coca-Cola and master Python, SQL, Excel, machine learning, data analysis, AI fundamentals, and more.

Start for Free
Iliya Valchanov 26 Apr 2023 7 min read

In statistics, there are numerous ways to visualize your data, however, some of the most common ones are bar, pie, and Pareto charts. In order to achieve that, you should know the data type and its measurement level. Sure, you can create beautiful charts without this knowledge, but intrinsically the whole visualization process is governed by these classifications.

Here’s the plan.

We will explore different graphs and tables, which will allow us to visually represent the data we are working with. Visualizing data is the most intuitive way to interpret it, so it’s an invaluable skill.

Types of data, pareto charts

How to Visualize Categorical Variables?

As you may know, there are two types of variables – categorical and numerical.

In this tutorial, we will focus on categorical variables.

categorical, pareto charts

Some of the most common ways to visualize them are frequency distribution tables, bar, pie, and Pareto charts.

representation of categorical variables, pareto charts

Frequency Distribution Tables

First, let’s see what a frequency distribution table looks like. As you can see in the picture below, it has two columns – the category itself and the corresponding frequency.

graphs and tables for categorical variables, pareto charts

Imagine you own a car shop and you sell only German cars. The table below shows the categories of cars: Audi, BMW and Mercedes. It also displays their frequency, or in plain English – the number of units sold. By organizing your data in this way, you can compare the different brands and see that Audis have sold the most.  

Bar Charts

Using the same table, we can construct a bar chart, also known as a column chart.

bar chart

The vertical axis shows the number of units sold.

Frequency,bar charts

Whereas each bar represents a different category, indicated on the horizontal axis.

Mercedes bmw audi

In this way, it is much clearer to see that Audi is the bestselling brand! Oh, and by the way, you can create a Bar Chart in Python using Matplotlib.

Pie Charts

Now, let’s try representing the same data as a pie chart. In order to build one, we need to calculate what percentage of the total each brand represents.

pie chart

In statistics, this is known as relative frequency. Naturally, all relative frequencies add up to 100%. Pie charts are especially useful when we want to not only compare items to each other but also see their share of the total.

market share, pie charts

Market Share

This example could be easily transformed into a business example of market share. Market share is so predominantly represented by pie charts that if you search for ‘market share’ in Google Images, you would get only pie charts!

market share image search

Imagine that the data in our table is representing the sales of Audi, BMW and Mercedes in a single German city, say Bonn. The chart will show us the market share that each of these brands has.

Pie chart

Pareto Charts

Lastly, we have the Pareto chart. In fact, a Pareto chart is nothing more than a special type of bar chart, where categories are shown in descending order of frequency.

By frequency, statisticians mean the number of occurrences of each item. As we said earlier, in our example, that’s the exact number of units sold.

Let’s go back to our frequency distribution table and order the brands by frequency.

order by frequency

Now, we can create the bar chart based on the reordered table.

order by frequency

What is shown in the picture is almost a Pareto chart.

Cumulative Frequency

There is one last touch to make it one – a curve on the same graph, showing the cumulative frequency.

The cumulative frequency is the sum of the relative frequencies. It starts at the frequency of the first brand, then we add the second, the third and so on until it finishes at 100%.

cumulative frequency

The polygonal line you see in the picture above is measured by a different vertical axis on the right of the graph. At each of its vertices it shows the subtotal of the categories to its left.

percentages

What Do Pareto Charts Consist of?

You might have noticed how the Pareto chart combines the strong sides of the bar and the pie chart – it is easy to compare the data both between categories and as a part of the total. Furthermore, if this was a market share graph, you could easily see the market share of the top two or top five companies.

top 3, bar charts

The Pareto Principle

One final note, it is named after Vilfredo Pareto. You may have heard of another idea of his – the Pareto principle, also known as the 80-20 rule.

It states that 80% of the effects come from 20% of the causes.

pareto principle, pareto charts

A real-life example is a statement by Microsoft that by fixing 20% of its software bugs, they managed to solve 80% of the problems customers experienced.

80 20 rule, pareto charts

A Pareto chart can reveal information like that. It is designed to show how subtotals change with each additional category and provide us with a better understanding of our data.

pareto charts

If you would like to read more about Charts and graphs, then have a read of our article on them here.

Different Ways to Visualize Data

In conclusion, we went over the main ways to visually represent categorical data. Now, you should know when to use a simple table or one of the charts we discussed, depending on the desired result. Pareto charts have an edge over the other 2 charts because they give much more information.

What about visualizing numerical data? Well, you may be surprised, but there are actually a few ways you can achieve that. You can get acquainted with the most useful graphs and tables for numerical data by jumping onto the linked tutorial.

***

Interested in learning more? You can take your skills from good to great with our statistics tutorials and Statistics course.

Next Tutorial: How to Visualize Numerical Data with Histograms

Iliya Valchanov

Co-founder of 365 Data Science

Iliya is a finance graduate with a strong quantitative background who chose the exciting path of a startup entrepreneur. He demonstrated a formidable affinity for numbers during his childhood, winning more than 90 national and international awards and competitions through the years. Iliya started teaching at university, helping other students learn statistics and econometrics. Inspired by his first happy students, he co-founded 365 Data Science to continue spreading knowledge. He authored several of the program’s online courses in mathematics, statistics, machine learning, and deep learning.

Top