Data decision is a address that allows data scientists to catechumen raw data into charts and plots that accomplish admired insights. Charts reduce the complication of the data and make it easier to accept for any user.

There are many tools to accomplish data visualization, such as Tableau, Power BI, ChartBlocks, and more, which are no-code tools. They are very able tools, and they have their audience. However, when alive with raw data that requires transformation and a good amphitheater for data, Python is an accomplished choice.

Though more complicated as it requires programming knowledge, Python allows you to accomplish any manipulation, transformation, and decision of your data. It is ideal for data scientists.

There are many affidavit why Python is the best choice for data science, but one of the most important ones is its ecosystem of libraries. Many great libraries are accessible for Python to work with data like numpy, pandas, matplotlib, tensorflow.

Matplotlib is apparently the most accustomed acute library out there, accessible for Python and other programming languages like R. It is its level of customization and operability that set it in the first place. However, some accomplishments or customizations can be hard to deal with when using it.

Developers created a new library based on matplotlib called seaborn. Seaborn is as able as matplotlib while also accouterment an absorption to abridge plots and bring some unique features.

In this article, we will focus on how to work with Seaborn to create best-in-class plots. If you want to follow along you can create your own activity or simply check out my seaborn guide project on GitHub.

What is Seaborn?

Seaborn is a library for making statistical cartoon in Python. It builds on top of matplotlib and integrates carefully with pandas data structures .

Seaborn design allows you to analyze and accept your data quickly. Seaborn works by capturing entire data frames or arrays absolute all your data and assuming all the centralized functions all-important for semantic mapping and statistical accession to catechumen data into advisory plots.

It abstracts complication while acceptance you to design your plots to your requirements.

Installing Seaborn

Installing seaborn is as easy as installing one library using your admired Python amalgamation manager. When installing seaborn, the library will install its dependencies, including matplotlib, pandas, numpy, and scipy.

Let’s then install Seaborn, and of course, also the package notebook to get access to our data playground.

pipenv install seaborn notebook

Additionally, we are going to import a few modules before we get started.

import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib

Building your first plots

Before we can start acute anything, we need data. The beauty of seaborn is that it works anon with pandas dataframes, making it super convenient. Even more so, the library comes with some congenital datasets that you can now load from code, no need to manually downloading files.

Let’s see how that works by loading a dataset that contains advice about flights.


Scatter Plot

A besprinkle plot is a diagram that displays points based on two ambit of the dataset. Creating a besprinkle plot in the Seaborn library is so simple and with just one line of code.

sns.scatterplot(data=flights_data, x="year", y="passengers")