Titanic Dataset

Dataset Description

PassengerId: This is a unique number assigned to each passenger. It’s simply a way to number each row in the dataset, and it doesn’t have any real-world meaning about the passenger themselves.

Survived: This is our target variable, which we would like to predict if we were building a machine learning model. It indicates whether the passenger survived (1) or did not survive (0).

Pclass: This refers to the passenger’s ticket class, a proxy for socio-economic status. It’s an ordinal integer feature where 1 = 1st class (Upper), 2 = 2nd class (Middle), and 3 = 3rd class (Lower).

Name: The name of the passenger.

Sex: The gender of the passenger. It’s a categorical feature with two values, male or female.

Age: The age of the passenger. There may be many missing values in this column, as indicated by the NaN (Not a Number) in the first row for the Cabin column.

SibSp: This is the number of siblings or spouses the passenger had aboard the Titanic.

Parch: This is the number of parents or children the passenger had aboard the Titanic.

Ticket: This is the ticket number of the passenger.

Fare: This is how much the passenger paid for their ticket.

Cabin: This is the cabin number of the passenger. Like the Age column, this column may also have many missing values.

Embarked: This is the port at which the passenger boarded the Titanic. It’s a categorical feature with three possible values: C = Cherbourg, Q = Queenstown, S = Southampton.

Summary

Summary & Structure

  PassengerId        Survived          Pclass          Name          
 Min.   : 892.0   Min.   :0.0000   Min.   :1.000   Length:418        
 1st Qu.: 996.2   1st Qu.:0.0000   1st Qu.:1.000   Class :character  
 Median :1100.5   Median :0.0000   Median :3.000   Mode  :character  
 Mean   :1100.5   Mean   :0.3636   Mean   :2.266                     
 3rd Qu.:1204.8   3rd Qu.:1.0000   3rd Qu.:3.000                     
 Max.   :1309.0   Max.   :1.0000   Max.   :3.000                     
                                                                     
     Sex                 Age            SibSp            Parch       
 Length:418         Min.   : 0.17   Min.   :0.0000   Min.   :0.0000  
 Class :character   1st Qu.:21.00   1st Qu.:0.0000   1st Qu.:0.0000  
 Mode  :character   Median :27.00   Median :0.0000   Median :0.0000  
                    Mean   :30.27   Mean   :0.4474   Mean   :0.3923  
                    3rd Qu.:39.00   3rd Qu.:1.0000   3rd Qu.:0.0000  
                    Max.   :76.00   Max.   :8.0000   Max.   :9.0000  
                    NA's   :86                                       
    Ticket               Fare            Cabin             Embarked        
 Length:418         Min.   :  0.000   Length:418         Length:418        
 Class :character   1st Qu.:  7.896   Class :character   Class :character  
 Mode  :character   Median : 14.454   Mode  :character   Mode  :character  
                    Mean   : 35.627                                        
                    3rd Qu.: 31.500                                        
                    Max.   :512.329                                        
                    NA's   :1                                              
'data.frame':   418 obs. of  12 variables:
 $ PassengerId: int  892 893 894 895 896 897 898 899 900 901 ...
 $ Survived   : int  0 1 0 0 1 0 1 0 1 0 ...
 $ Pclass     : int  3 3 2 3 3 3 3 2 3 3 ...
 $ Name       : chr  "Kelly, Mr. James" "Wilkes, Mrs. James (Ellen Needs)" "Myles, Mr. Thomas Francis" "Wirz, Mr. Albert" ...
 $ Sex        : chr  "male" "female" "male" "male" ...
 $ Age        : num  34.5 47 62 27 22 14 30 26 18 21 ...
 $ SibSp      : int  0 1 0 0 1 0 0 1 0 2 ...
 $ Parch      : int  0 0 0 0 1 0 0 1 0 0 ...
 $ Ticket     : chr  "330911" "363272" "240276" "315154" ...
 $ Fare       : num  7.83 7 9.69 8.66 12.29 ...
 $ Cabin      : chr  "" "" "" "" ...
 $ Embarked   : chr  "Q" "S" "Q" "S" ...

Histogram

Barchart {data-width=350} ———————————————————————–

Barchart

Heatmap {data-width=350} ———————————————————————–

Heatmap