S2-Data Visualization 101 - How To Choose A Chart Type - by Sara A. Metwalli - Towards Data Science
S2-Data Visualization 101 - How To Choose A Chart Type - by Sara A. Metwalli - Towards Data Science
Open in app
Search
Member-only story
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 1/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
When working on any data science project, one of the essential steps to explore and
interpret your results is to visualize your data. At the beginning of the project,
visualizing your data helps you understand it better, find patterns and trends.
At the end of the project, after you’ve done your analysis and applied different
machine learning models, data visualization will help you communicate your results
more efficiently.
Humans are visual creatures by nature; things make sense to us when it’s
represented in an easy to understand visualization. It’s way easier to interpret a bar
chart than it is to look at massive amounts of numbers in a spreadsheet.
Efficient data visualization can make or break your project. If you put tons of effort
into analyzing and modeling your data, but you ended up using the wrong chart type
to present your results, your audience will not grasp the effort you put in or how to
use these results.
There are many chart types, so many, the process of choosing the correct one can be
overwhelming and confusing. This article will — hopefully — give you a simple and
straightforward approach to selecting the best chart type that represents your data
perfectly and communicate it most efficiently.
How to start?
Before you start looking at chart types, you need to ask yourself 5 critical questions
about your data. These questions will help you understand your data better and
hence, choose the perfect chart type to represent it.
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 2/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Understanding the origin story of your data and knowing what it’s trying to deliver
will make choosing a chart type a much easier task for you.
№2. Who will you present your results to?
Once you figured out the story behind your data, next, you need to know who you
will be presenting your results for. If you’re analyzing stock market trends and you
will present your findings to some businessmen, you might use a different chart
type than if you were representing your finding for people getting started with the
stock market.
For example, piecharts work best with a small number of datasets; however, if
you’re using a significant amount of datasets, using a scatter plot will make more
sense.
You need to select a chart type that fits the size of your data best and represents it
clearly without cluttering.
Similarly, if you have categorical data, then using a bar chart or a pie chart may be a
good idea. You probably will not want to use a line chart with categorical data,
because by definition, you can’t have continuous categories. The has to be a discrete
finite amount of categories.
№5. How do the different elements of your data relate to each other?
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 3/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Finally, you need to ask yourself how do the different elements of your data relate. Is
your data order based on some factor — time, size, type? Doesn’t represent a ranking
based on some variable? Or a correlation between different variables?
The relationship between the values within your dataset may decide on what chart
type to use a bit more straightforward.
Bar Chart
When to use:
3. If you want to illustrate both positive and negative values in the dataset.
When to avoid:
2. If you have many categories, avoid overloading your graph. Your graph shouldn’t
have more than 10 bars.
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 4/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Pie Chart
When to use:
When to avoid:
Line Chart
When to use:
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 5/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
When to avoid:
1. Line charts work better with bigger datasets, so, if you have a small one, use a
bar chart instead.
Scatter Plot
When to use:
When to avoid:
Area Chart
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 6/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
When to use:
2. If you want to portray the volume of your data and not just the relation to time.
When to avoid:
When to use:
When to avoid:
Combined Chart
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 7/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
When to use:
When to avoid:
1. If you want to display more than 2~3 types of graphs. In that case, it’s better to
have separate graphs to make it easier to read and understand.
1. If you have categorical data, use a bar chart if you have more than 5 categories
or a pie chart otherwise.
2. If you have nominal data, use bar charts or histograms if your data is discrete, or
line/ area charts if it is continuous.
3. If you want to show the relationship between values in your dataset, use a scatter
plot, bubble chart, or line charts.
4. If you want to compare values, use a pie chart — for relative comparison — or
bar charts — for precise comparison.
6. If you want to show trends and patterns in your data, use a line chart, bar chart,
or scatter plot.
Conclusion
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 8/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Before you choose what chart type to use, you need to get to know your data better,
the story behind it, and your target audience/media. Whenever you try to create a
visualization, chose simple colors and fonts.
Always aim for simple visualization than complex ones. The goal of visualizing data
is to make it easier to understand and read. So, avoid overloading and cluttering
your graphs. Having multiple simple graphs is always better than one elaborate
graph.
This article is the first of three-part series on visualization 101. The next articles will
address tips for effective data visualization and the different visualization libraries
in Python and how to choose the best one based on your data and graph type.
Follow
Ph.D. candidate working on Quantum Computing. Traveler, writing lover, science enthusiast, and CS
instructor. Get in touch with me bit.ly/2CvFAw6
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 9/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
5 Games That Can Help You Improve Your Skills As a Data Scientist
Improve your skills and have fun at the same time.
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 10/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Aug 12 1K 11
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 11/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Aug 23 1.2K 20
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 12/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Jun 18 1.7K 12
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 13/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Aug 25 7.2K 69
Lists
ChatGPT prompts
48 stories · 1951 saves
AI Regulation
6 stories · 555 saves
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 14/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Apr 6 811 7
Why Polars Destroys Pandas in All Possible Ways for Data Scientists?
One of the first Data Science libraries, Pandas, has been improving the lives of many
developers across the globe, but Polars shows it is…
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 15/17
03/09/2024, 14:36 Data Visualization 101: How to Choose a Chart Type | by Sara A. Metwalli | Towards Data Science
Aug 8 616 10
Aug 9 2.4K 41
https://towardsdatascience.com/data-visualization-101-how-to-choose-a-chart-type-9b8830e558d6 17/17