DEV Community

Cover image for TITANIC DASHBOARD IN POWER BI
allan-pg
allan-pg

Posted on

TITANIC DASHBOARD IN POWER BI

INTRODUCTION

On April 15, 1912, the Titanic sank after hitting an iceberg in the North Atlantic, with nearly 1500 people still on board. The Titanic dataset is popular for data analysis and machine learning. It contains information about the passengers onboard the Titanic, including features like age, gender, fare, cabin, and survival status.

About the Analysis

I carried out this project to analyze the survival of passengers on-board in the Titanic. I wanted to check how many passengers were on-board, how passengers were distributed per class, the number of survivors per class, gender of survivors, and to check the age of most affected passengers.

Insights from this report will enable to understand how passengers survived based on gender, class and age.

Tools Used

  • POWER QUERY
  • POWER BI

Data collection

The data was downloaded from Kaggle.

Exploratory Analysis

After collecting the data, it was imported into Python where proper cleaning of the data was done.

  • import python libraries
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import os
import missingno as msn
plt.style.use('ggplot')
Enter fullscreen mode Exit fullscreen mode
  • Load csv file you downloaded
dataset = pd.read_csv(r'C:\Users\Admin\Desktop\csv files\train_and_test2.csv')
dataset.head(2)
Enter fullscreen mode Exit fullscreen mode
  • get a information of dataset
dataset.info()
Enter fullscreen mode Exit fullscreen mode
  • The dataset contains 12 columns and 1309 rows
  • Copy your dataframe so as to remain with an original copy
df = dataset.copy()
Enter fullscreen mode Exit fullscreen mode
  • Check for null values
df.isna().sum()
Enter fullscreen mode Exit fullscreen mode
  • In the embarked column there are two rows with null values
  • I decided to delete from the data set since they dont sum up to over 5 percent
df = df.loc[~df['Embarked'].isna()].reset_index(drop = True)
Enter fullscreen mode Exit fullscreen mode
  • further import into POWER BI to create dashboard for further analysis.

Data Visualization

After cleaning the data, it was imported into POWER BI for proper visualization

Power Bi Dashboard

  • To generate more insights from my data, I needed to write some DAX formulas to achieve this.

Power Bi Measures

Communication and Insights

KPI`s

  • There were 1307 Passengers where 843 were male and 464 were female. Total amount spent on fare by passengers was $43, 400. The average age for passengers was 29 years and the average fare paid was $33.

passenger%

  • Male Passengers made up 64.5% while Female Passengers were 35.5%.

Passengers per class

  • Third class had 54.25% Passengers and this is where most passengers were. Second Class had 24.5% of the passengers while First class only had 21.2% passengers.

Location for embarking

  • Most Passengers embarked as Southampton more than 65%.

survivors

  • More than 70% of the Passengers did not survive from this tragedy.

survivors per class

  • Most Passengers in third/economy class did not survive compared to other classes. In first class very few passengers died.

survivors by age
236 Passengers aged 28 died the most and only 59 of them survived.

Conclusion

  • If you were a Passenger in third/economy class there were high chances you could not have made it out alive
  • If you were a female Passenger in middle/second class or in first class there were very high chances you could have made it alive from the titanic. Check out my GitHub profile for the project.

Top comments (0)