ggplot2 package| How to create stacked and proportionate stacked bar charts?

Описание к видео ggplot2 package| How to create stacked and proportionate stacked bar charts?

Stacked bar charts usually represent a series of bars or columns stacked on top of one another. They are widely used to effectively portray comparisons of total values across several categories.

For e.g. We can show the year on year product sale using simple bar chart, but we can also add geography variable to it and show the same information using stacked bar chart..with each stack in the bar showing one particular geography....this way we can check the sale trend across various geographies.

Proportionate stacked bar chart shows relative proportions for each category standardized to 100% scale.

We will use Titanic Data set and try to come up with the answers to following questions using stacked bar and proportionate stacked bar charts.

Out of total male and female passengers on the Titanic ship, how many of them are survived?
Does survival rate of passengers has any bearing on its socio-economic class?
What is survival percentage of male and female passengers?
What is survival percentage of passengers based on socio-economic class?

We will also create contingency tables and use those in creating stacked bar charts.

The link for the first part video - How to draw bar charts is below:
   • ggplot2 package| How to create bar ch...  

The Github Repo for Rmarkedown file and Titanic Data set is:
https://github.com/siddharth-sahasrab...

Комментарии

Информация по комментариям в разработке