TITANIC DASHBOARD IN POWER BI
allan-pg
Posted on August 14, 2024
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')
- Load csv file you downloaded
dataset = pd.read_csv(r'C:\Users\Admin\Desktop\csv files\train_and_test2.csv')
dataset.head(2)
- get a information of dataset
dataset.info()
- The dataset contains 12 columns and 1309 rows
- Copy your dataframe so as to remain with an original copy
df = dataset.copy()
- Check for null values
df.isna().sum()
- 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)
- 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
- To generate more insights from my data, I needed to write some DAX formulas to achieve this.
Communication and Insights
- 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.
- Male Passengers made up 64.5% while Female Passengers were 35.5%.
- 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.
- Most Passengers embarked as Southampton more than 65%.
- More than 70% of the Passengers did not survive from this tragedy.
- Most Passengers in third/economy class did not survive compared to other classes. In first class very few passengers died.
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.
Posted on August 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.