Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 2.79 KB

File metadata and controls

30 lines (22 loc) · 2.79 KB

Title: Titanic Dataset Visualization

Description: This project aims to visualize various aspects of the Titanic dataset using Matplotlib library in Python. The Titanic dataset contains information about the passengers onboard the Titanic, including their demographics, ticket information, and survival status. By visualizing this dataset, we can gain insights into different aspects of the passengers and their survival rates.

Tasks:

  1. Bar Plot: Passenger Class Distribution

    • Task: Create a bar plot to visualize the distribution of passenger classes (1st, 2nd, and 3rd class) onboard the Titanic. Customize the plot with appropriate labels, a title, and different colors for each passenger class.
  2. Pie Chart: Gender Distribution

    • Task: Generate a pie chart to illustrate the gender distribution among the passengers. Customize the plot by adding percentage labels and exploding the slice for the dominant gender (male or female).
  3. Histogram: Age Distribution

    • Task: Plot a histogram to visualize the distribution of passenger ages onboard the Titanic. Customize the plot by adjusting the number of bins, adding appropriate labels, and highlighting the bins with a higher number of passengers.
  4. Stacked Bar Plot: Survival by Passenger Class

    • Task: Create a stacked bar plot to compare the survival rates of passengers based on their class. The plot should display separate bars for each passenger class, with stacked sections representing the count of survivors and non-survivors. Customize the plot with appropriate labels, a legend, and different colors for survivors and non-survivors.
  5. Scatter Plot: Fare vs. Age

    • Task: Generate a scatter plot to visualize the relationship between passenger fare and age. Customize the plot with appropriate labels, a title, and different colors or marker styles to distinguish between survived and non-survived passengers.

Readme Content: The repository contains Python scripts and a Jupyter Notebook for visualizing the Titanic dataset using Matplotlib. The main script, titanic_visualization.py, includes functions to load the dataset, preprocess the data, and generate various types of plots. The Jupyter Notebook, titanic_visualization.ipynb, provides a step-by-step guide with code and explanations for each visualization task.

Instructions:

  1. Install the required libraries: Matplotlib, Pandas, and NumPy.
  2. Download or clone the repository to your local machine.
  3. Run the titanic_visualization.py script or open the titanic_visualization.ipynb notebook using Jupyter Notebook.
  4. Follow the instructions in the script or notebook to visualize the Titanic dataset using different types of plots and customization techniques.
  5. Customize the visualizations further or create additional plots based on your requirements.