Beginning the Journey

Welcome to our lesson on Heat Maps for Monthly Data Analysis. In this session, we'll dive deeper into the more complex visualizations using the Seaborn library to plot heat maps.

Heat maps are a superb tool for displaying multivariate datasets in a two-dimensional image. They visually represent data through colors, where different color gradients represent different values. This is very useful in fields like Data Science, as heat maps are powerful tools for exploring and understanding patterns in a given dataset.

In our context of analyzing air travel data, what if we could find out how the monthly passenger count has fluctuated over the years? Which month or year had the highest passenger count? Does the count exhibit a pattern or trend? Heat maps are a great tool to answer these questions, and we'll learn to do exactly that in this lesson.

Delving Into Heat Maps

Heat maps are generated using the Seaborn library, which builds on Matplotlib and integrates seamlessly with pandas data structures. Let's start by developing a heat map for monthly passenger trends in air travel.

We start by loading up the flights dataset, as before:

Since our interest is on a year-by-year and month-by-month basis, a pivot table fits our requirements best. The pivot table will have months as rows, years as columns, and passenger counts as the cell values. Python's pandas library makes creating this pivot table straightforward:

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal