Python library

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

INTRODUCTION TO SEABORN. Skill Enhancement Courses (SEC).

Scene 2 (8s)

What is seaborn ?. Seaborn is a popular Python library used for data visualization tasks. It is built on top of Matplotlib, enhancing its functionality and providing additional features. Seaborn offers a high-level interface that simplifies the creation of complex visualizations. Seamlessly integrates with pandas data structures, making it easy to visualize data directly from pandas data frames. Seaborn provides built-in themes and color palettes for easy customization of plots, ensuring visually appealing visualizations..

Scene 3 (31s)

Feature of seaborn. "Seaborn enriches data visualization with its user-friendly interface and extensive functionality.".

Scene 4 (57s)

Different categories of plot in Seaborn. This plot is used to understand the relation between two variables..

Scene 5 (1m 22s)

# To install Seaborn, use the following pip command !pip install seaborn.

Scene 6 (1m 35s)

Different types of plot in Seaborn. A visual representation of data points in a graph, displaying the relationship between two variables through their Cartesian coordinates..

Scene 7 (2m 2s)

A method for graphically depicting groups of numerical data through quartiles, highlighting the median, and identifying outliers..

Scene 8 (2m 19s)

import seaborn as sns import matplotlib.pyplot as plt # Create some sample data data = # Create the scatter plot sns.scatterplot( x='x',y='y', hue='group', # Color based on 'group' variable size='size', # Size based on 'size' variable style='group', # Not adding visual difference here, but can be used for markers data=data) # Add title and show the plot plt.title('Sample Scatter Plot with Color, Size, and Labels') plt.xlabel('X-Value') plt.ylabel('Y-Value') plt.show().

Scene 9 (3m 0s)

BAR PLOT. 02.. import seaborn as sns import matplotlib.pyplot as plt # Create some sample data species = ['Cat', 'Dog', 'Rabbit', 'Bird'] lifespan = [15, 12, 8, 10] # Average lifespan (years) offspring_count = [4, 6, 8, 2] # Average offspring per year data = pd.DataFrame() # Create the bar plot with color, size, and label customization sns.barplot(x='Species',y='Lifespan',hue='Offspring Count',data=data) # Add title, axis labels, and rotate x-axis labels for readability plt.title(Average Lifespan by Species') plt.xlabel('Species') plt.ylabel('Average Lifespan') plt.xticks(rotation=45) # Rotate x-axis labels for better readability plt.show().

Scene 10 (3m 32s)

HISTOGRAM. 03.. import seaborn as sns import matplotlib.pyplot as plt import numpy as np # Generate random integer data data = np.random.randint(1, 100, size=1000) # Random integers between 1 and 100, with 1000 data points # Create the histogram using Seaborn sns.histplot(data, bins=30, kde=True, color='green') # Add title and axis labels plt.title('Histogram of Random Integer Data') plt.xlabel('Values') plt.ylabel('Frequency') # Show the plot plt.show().

Scene 11 (3m 54s)

HEATMAP. 04.. import seaborn as sns import matplotlib.pyplot as plt import numpy as np data = np.random.rand(20, 20) # Generating a 20x20 array of random values between 0 and 1 sns.heatmap(data, cmap='viridis’) # Add x-axis and y-axis labels with color plt.xlabel('X-axis', color='blue') plt.ylabel('Y-axis', color='green’) # Add title and show the plot plt.title('Simple Heatmap Example with Large Data') plt.show().

Scene 12 (4m 16s)

Box plot. 05.. import seaborn as sns # Load the fmri dataset fmri = sns.load_dataset("fmri") # Create a box plot sns.boxplot(x="timepoint", # x-axis represents the "timepoint" y="signal", # y-axis represents the "signal" values data=fmri) # Use data from the fmri dataset data = sns.load_dataset('tips') # create grouped boxplot sns.boxplot(x = data['day'], y = data['total_bill'], hue = data['size'], palette = 'husl').

Scene 13 (4m 35s)

catplot. 06.. import seaborn as sns exercise = sns.load_dataset("exercise") sns.catplot(x="time",y="pulse",hue="kind",col="diet", data=exercise).

Scene 14 (4m 54s)

Some more types of plot. Voilin plot. A combination of a box plot and a kernel density plot, providing a visual summary of the distribution of data for different categories..

Scene 16 (5m 39s)

- Seaborn is a powerful tool for creating visualizations in Python. - It simplifies the process of making graphs, even for beginners. - With Seaborn, you can easily customize the look of your graphs with themes and colors. - It works seamlessly with Pandas DataFrames, making data manipulation and visualization straightforward. - Whether you're a beginner or an expert, Seaborn empowers you to tell compelling stories with your data..

Scene 17 (5m 59s)

THANK YOU. Stay curious and keep exploring the world of data visualization!.