Visualizing comparisons in your data
Comparisons are very common in data analysis and we have different ways to present them. Let's start with the bar chart. I am sure you have seen many reports that have used this type of visualization.
Bar charts can be used to compare one variable among different classes; for example, a car's price across different models or population size per country. In the following graph, we have used a bar chart to present the number of Covid-19 cases per state in India, until June 2020:
Sometimes, we can also use stacked column charts to add another dimension to the data that is being analyzed. For example, in the following graph, we are using a stacked bar chart to show how many people were on board the Titanic, per gender. Additionally, we are breaking down the number of people who survived (positive class) and those who did not (negative class):