Data Science

Selecting Right Graphs For Your Data Visualisation Project

Guide to picking the appropriate graph for your exploratory analysis

Vishnu Arun
7 min readMay 2, 2022
Index Of Contens
· 1) Trend Charts
∘ 1.1) Line Charts
∘ 1.2) Area Charts
· 2) Distribution Charts
∘ 2.1) Histograms
∘ 2.2) Wordcloud
· 3) Comparision Charts
∘ 3.1) Column Charts
∘ 3.2) Slope chart
· 4) Part-Of-Whole / Composition Charts
∘ 4.1) Pie Charts
∘ 4.2) Treemaps
· 5) Geographical Charts
∘ 5.1) Pointers Maps
∘ 5.2) Choropleth Maps
Conclusion

Introduction

Data visualization is one of the most important steps in a “Data Science” or “Machine Learning” project. It has a direct impact on the output making it a single stage that will either make or break your project.

In other words, it aids in the interpretation of available data, the identification of patterns, trends, and inconsistencies, thereby influencing our understanding of the dataset and the choices that we make while training it.
Furthermore, in business firms, the decision-making management might have a limited understanding of the raw data. So as data scientists, it becomes our sole responsibility to pull out insights and portray them in an easy-to-understand structure thus helping the business make strategic data-driven decisions!

Selecting the right graph to help visualize your data is of tremendous importance and this can be quite confusing as there are hundreds of graphs to choose from.
In this article, we will try to generalize graphs into types based on the data available in the required output chart.
Here’s an overview of the types of graphs we will discuss in this blogpost:

1. Trend Charts

The trend charts show us the variation of values in the given dataset with respect to the flow of time. These are also called time-series charts. These charts come in very handy when we want to predict or forecast any metric or parameter based on the historical data.
Example: The variation of customer footfall in a store, The daily growth rate of a plant grown using hydroponics.

1.1) Line Charts

As the name suggests this type of graph plots a line that dips or raises based on the variation of input data wrt to the continuous flow of time. In other words, it shows the data as a sequence of points linked by line segments along the axis.
This is what a typical line chart looks like:

Source: Pic

1.2) Area Charts

The area chart is very similar to the line chart, however, it fills the entire area below its respective lines with its respective color. This colored area lets us as helps us understand the weight or magnitude that the values have wrt to the other columns in the dataset.
Here’s a what an area chart looks like:

Source: Pic

2. Distribution Charts

The distribution charts depict how a certain numerical attribute or a group of variables varies and gets distributed on the graph with the passage of time.
Example: A survey was undertaken to identify smokers across the entire country. Distribution charts like histograms, word clouds, etc can be used to comprehend the variation in the age and demographics of the smokers.

2.1) Histograms

There are mainly two types of histograms; line histogram and column histogram. It depicts the distribution of data across a continuous interval or time period as a series of bars. The bar height illustrates the frequency of the respective attribute.
Here’s an illustration of a couple of histograms:

Source: Pic

2.2) Wordcloud

Wordcloud is a fun way to illustrate the frequency distribution of keywords/phrases that are present in the dataset. Even though it is not an absolute metric, it gives us an intuition of the data.
Here’s an example of a wordcloud that displays the names of the countries that have sent the maximum number of athletes to the Olympics over the past 120 years.

Source: Pic

3. Comparison Charts

The comparison charts are also called relationship charts. It helps the user to compare one or more attributes, find the correlation, ranking, and some other patterns existing between them.
Example: Comparing the compensations of male and female employees of a particular company or the type of product sold in a supermarket.

3.1) Column Charts

Column charts consist of vertical bars that demonstrate the comparisons between certain attributes or categories. Usually, the category type is depicted on the x-axis and its corresponding values are shown on the y-axis.

Here’s what a column chart would look like:

Source: Pic

3.2) Slope chart

A slope chart consists of a line that is drawn between any two corresponding points on the x-axis. The slope of the line illustrates the magnitude of differentiation between the attributes.
Here’s an illustration of a slope chart that shows the website metrics before and after some design changes were made:

Source: Pic

4. Part-Of-Whole / Composition Charts

As the name suggests these graphs depict what percentage of the whole data (100%) does a certain attribute contribute(X%). These charts are very handy as they are pretty easy to understand and make sense of.
Example: Comparing what percentage of the total sales did online sales amount in a financial year.

4.1) Pie Charts

A pie chart is the go-to data visualization diagram when it comes to plotting the composition spread of a dataset. Each division of the pie chart depicts the percentage that an attribute occupies from wrt to the whole.
Here’s an example of a pie chart that depicts the monthly expenses of an individual.

Source: Pic

4.2) Treemaps

A treemap displays hierarchical data in the form of nested rectangles. Each level of these rectangles represents a certain categorical group and also highlights the corresponding numerical value and color.
Here is an example of a treemap that depicts the number of events under each sports category and the number of medals won by the participants categorized by gender.

Source: Pic

5. Geographical Charts

Geographical charts enable us to display data ranging from the most simple, such as placing markers on a map, to some complicated plots, such as the temperature and dispersion of ocean currents. Python has many libraries that can be made you plot geographical maps.
Example: Plotting a choropleth map that shows the spread of population density of a city or a country.

5.1) Pointers Maps

In pointer maps, markers like bubbles, cross marks, or other symbols are put over the user-defined geographical places on the map. For this reason, it is also called the “symbol map.”
Herer’s an example of a pointer map that shows all the cities that have hosted the Summer Olympic games until 2016:

Source: Pic

5.2) Choropleth Maps

Choropleth Maps depict geographical areas colored, shaded, or patterned in accordance with an input parameter. This facilitates the visualization of values over a geographical area, which might reveal variations or trends that otherwise might be difficult to visualize.
Herer’s an example of a choropleth map that shows the sales tax changes across the states of the USA:

Source: Pic

Conclusion:

I hope you enjoyed reading this post and gained useful insights from it.
Here is a brief summary of all the different graphs discussed in this post:
1. Trend Charts
Line Charts
Area Charts
2. Distribution Charts
Histograms
Wordcloud
3. Comparision Charts
Column Charts
Slope chart
4. Part-Of-Whole / Composition Charts
Pie Charts
Treemaps
5. Geographical Charts
Pointers Maps
Choropleth Maps

Please let me know in the comments if you think I’ve missed anything or if you think of some other type of visualization that should be on this list!

--

--

Vishnu Arun

A magical swordsman chasing butterflies through lores, breathing life into the enigmatic shadows of our collective past!