Learning Path: Python:Data Visualization with Matplotlib 2.x
- Description
- Curriculum
- FAQ
- Reviews
Are you looking forward to learn powerful data visualization techniques to make your data more presentable and informative? If yes, then this Learning Path is for you.
Packtās Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
Matplotlib is a multi-platform data visualization tool built upon the NumPy and SciPy frameworks. One of the most important features of Matplotlib is its ability to work well with many operating systems and graphics backends. Big data analytics are driving innovations in scientific research, digital marketing, policy-making, and much more. Matplotlib offers simple but powerful plotting interface, versatile plot types and robust customization. Matplotlib supports dozens of backends and output types, which means you can count on it to work regardless of which operating system you are using or which output format you wish.
The highlights of this Learning Path are:Ā
- Construct different types of plot such as lines and scatters, bar plots, and histograms
- Customize and represent data in 3D
- Create data visualizations on 2D and 3D charts in the form of bar charts, bubble charts, heat maps, histograms, scatter plots, stacked area charts, swarm plots, and much more
- Leverage the various aspects of data visualization and plots
In this Learning Path, youāll hit the ground running and quickly learn how to make beautiful, illuminating figures with Matplotlib and a handful of other Python tools. Youāll understand data dimensionality and set up an environment by beginning with basic plots. Youāll enter into the exciting world of data visualization and plotting. You’ll work with line and scatter plots and construct bar plots and histograms. You’ll also explore images and contours in depth. Plot scaffolding is a very interesting topic wherein you’ll be taken through axes and figures to help you design excellent plots. You’ll learn how to control axes and ticks, and change fonts and colors. You’ll work on backend and transformations. Youāll then explore the most important companions for Matplotlib, Pandas and Jupyter, used widely for data manipulation, analysis, and visualization. Youāll acquire the basic knowledge on how to create and customize plots by Matplotlib.
Further, youāll learn how to plot different types of economic data in the form of 2D and 3D graphs, which give insights from a deluge of data from public repositories, such as Quandl Finance. Youāll learn to visualize geographical data on maps and implement interactive charts. Youāll learn to create intuitive infographics.
Youāll explore 3D plotting, one of the best features when it comes to 3D data visualization, along with Jupyter Notebook, widgets, and creating movies for enhanced data representation. Geospatial plotting will be also be explored. Finally, you’ll learn how to create interactive plots with the help of Jupyter.
By the end of this Learning Path, you’ll be well versed with Matplotlib and construct advanced plots with additional customization techniques to perform advanced data visualization using the Matplotlib library.
Meet Your Experts:
We have combined the best works of the following esteemed authors to ensure that your learning journey is smooth:
- Benjamin Keller is a postdoctoral researcher in the MUSTANG group at UniversitƤt Heidelberg’s Astronomisches Rechen-Institut. He obtained his PhD at McMaster University and got his BSc in Physics with a minor in Computer Science from the University of Calgary in 2011. His current research involves numerical modeling of the interstellar medium over cosmological timescales. As an undergraduate at the U of C, he worked with Dr. Jeroen Stil on stacking radio polarization to examine faint extragalactic sources. He also worked in the POSSUM Working Group 2 to determine the requirements for stacking applications for the Australian SKA Pathfinder (ASKAP) radio telescope. At McMaster, he worked with Dr. James Wadsley in the Physics & Astronomy department. His current research was focused around understanding how the energy released from supernovae explosions regulated the flow of gas through galaxies, and how that gas is converted into stars.
- Aldrin Kay Yuen Yim is a PhD student in computational and system biology at Washington University School of Medicine. Before joining the university, his research primarily focused on big data analytics and bioinformatics, which led to multiple discoveries, including a novel major allergen class (designated as a Group 24th Major allergen by WHO/IUIS Allergen Nomenclature subcommittee) through a multi-omic approach analysis of dust mites (JACI 2015), as well as the identification of the salt-tolerance gene in soybeans through large-scale genomic analysis (Nat. Comm. 2014). He also loves to explore sci-fi ideas and put them into practice, such as the development of a DNA-based information storage system (iGEM 2010, Frontiers in Bioengineering and Biotechnology 2014). Aldrin’s current research interest focuses on neuro-development and diseases, such as exploring the heterogeneity of cell types within the nervous system, as well as gender dimorphism in brain cancers (JCI Insight 2017). Aldrin is also the founding CEO of Codex Genetics Limited, which is currently servicing two research hospitals and the cancer registry of Hong Kong.
- Allen Chi Shing Yu, PhD, is a Chevening Scholar, 2017-18, and an MSc student in computer science at the University of Oxford. He holds a PhD degree in Biochemistry from the Chinese University of Hong Kong, and he has used Python and Matplotlib extensively during his 10 years’ experience in the field of bioinformatics and big data analysis. During his research career, Allen has published 12 international scientific research articles and presented at four international conferences, including on-stage presentations at the Congress On the Future of Engineering Software (COFES) 2011, USA, and Genome Informatics 2014, UK. Other research highlights include discovering the novel subtype of Spinocerebellar ataxia (SCA40), identifying the cause of pathogenesis for a family with Spastic paraparesis, leading the gold medalist team in 2011 International Genetically Engineered Machine (iGEM) competition, and co-developing a number of cancer genomics project. Apart from academic research, Allen is also the co-founder of Codex Genetics Limited, which aims to provide personalized medicine services in Asia through the use of the latest genomics technology. With financial and business support from the HKSAR Innovation and Technology Commission, Hong Kong Science Park, and the Chinese University of Hong Kong, Codex Genetics has curated and transformed recent advances in cancer and neuro-genomics research into clinically actionable insights.
- Claire Yik Lok Chung is now a PhD student at the Chinese University of Hong Kong working on Bioinformatics, after receiving her BSc degree in Cell and Molecular Biology. With her passion for scientific research, she joined three labs during her college study, including the synthetic biology lab at the University of Edinburgh. Her current projects include soybean genomic analysis using optical mapping and the next-generation sequencing of data. Claire started programming 10 years ago, and uses Python and Matplotlib daily to tackle Bioinformatics problems and to bring convenience to life. Being interested in information technology in general, she leads the Campus Network Support Team in college and is constantly keeping up with the latest technological trends by participating in PyCon HK 2016. She is motivated to acquire new skills through self-learning and is keen to share her knowledge and experience. In addition to science, she has developed skills in multilingual translation and graphic design, and found these transferable skills useful at work.
-
1The Course Overview
This video gives an overview of entire course.
-
2Understanding Data, Dimensionality, and Why We Plot
This video explains why do we need to plot data andwhat plots are appropriate for what kind of data.
-
3Setting Up Your Environment
This video explains how to get your machine ready to develop plots using matplotlib.
-
4Beginning with the Most Basic Plots
In this video, we will see how we can make some of the most common types of plots.
-
5Differentiating Line and Scatter Plots
This video explains how the simplest kind of data is co relational and how x versus y. plot() and scatter() can be used to visualize this kind of data.
-
6Constructing Bar Plots and Histograms
In this video, we will see how we can represent ordinal data, or the distribution of scalar datausing bar charts and histograms.
-
7Exploring Images and Contours
In this video, we will see how we can represent 3D scalar fields (that is, data with x,y, and z components) with images and contours.
-
8Working on Plots with Uncertainties
This video explains that not all numbers are created equal: some have uncertainties associated with them!
-
9Looking at Other Useful Plot Types
This video explains what if a region or area is what we want to show and Also, what if a scatter plot is too dense.
-
10Making Multiple Panel Plots
In this video, we will see how we can show multiple plots together.
-
11Using Color Bars and Legends
In this video, we will see how we can annotate the colors or styles in our plots.
-
12Working with the Components of a Matplotlib Plot
In this video, we will see what components are in a matplotlib plot and how do they work together.
-
13Figure and Axes ā How Do They Work?
In this video, we will learn which container objects are used for a plot,how can we construct and use them.
-
14Working with Transformations
In this video, we will see which coordinate systems are used in a matplotlib plot and how does a data point get translated to a position in the plot image.
-
15Controlling Axes and Ticks
In this video, we will see how matplotlib constructs the x and y axis andhow does it decide where the ticks go.
-
16Ticker Formatting
In this video, we will learn how matplotlib formats the labels for the ticks on the x and y axis.
-
17Working on Back Ends
In this video, we will see how matplotlib actually displays a plot on the screen or write to a file.
-
18The Jupyter Notebook
In this video, we will see how we can use Jupyter and the notebook to present and work with matplotlib effectively.
-
19Using Pandas to Manipulate Tabular Data
In this video, we will see how we can work with Pandas to make data manipulation easier.
-
20Slicing and Dicing Pandas Data
In this video, we will see how we can use the rich features of Pandas Dataframes to select and manipulate data.
-
21Pandas Built-in Plotting
In this video, we will see how we can use Pandas together with matplotlib to make plots efficiently.
-
22Test Your Knowledge
-
23The Course Overview
This video gives a glimpse of what this course offers you.
-
24Getting Started with Matplotlib
Before you start working on any new platform, it is important to understand the essential concepts mentioned in it. This video is that first step to Matplotlib!
-
25Setting Up the Plotting Environment
This video is your next essential step to explore Matplotlib, where you will learn to download, install and set up the environment on your machine. Letās do it together right now!
-
26Editing and Running Code
Now that we are all set with the environment set up, itās time to get our hands dirty and begin writing some code.
-
27Loading Data for Plotting
When you have to work with different types of data and dataset, you need to know the correct way to deal with them and load it for the processing purpose. This video will show you how to load data.
-
28Plotting Our First Graph
Itās time to end our curiosity and jump right into plotting our first graph. Letās have a look at some practical steps to plot a simple graph.
-
29Basic Structure of a Matplotlib Figure
Before we go ahead in our journey of plotting figures, we need to understand the basic structure which will let us code well and get the right output.
-
30Setting Colors in Matplotlib
Many elements in a Matplotlib figure can have their colors specified. There are several ways to do so. Letās explore these methods.
-
31Adjusting Text Formats
For an informative figure, we typically have a number of text elements, including the title,labels of axes and ticks, legend, and any additional annotations. This video will show you, how you can customize and adjust the text formats for these elements.
-
32Customizing Lines and Markers
Many times, we may want to customize the appearance of Lines and Marker to better distinguish datasets, or for better and more consistent styling. This video demonstrates the same in detail.
-
33Customizing Grids and Ticks
Lines of grids, ticks, and axes help us to visually locate and measure data values. Their distribution and style determine whether they make good visual aids for the plot or clutter the figure. Letās demonstrate the basic methods for these, in this video.
-
34Customizing Axes
Now that you know how to customize Grids and Ticks, letās go ahead to customize axes in our plots.
-
35Using Style Sheets
We have learned to set the style details step by step so far. Letās now move forward to use style sheets.
-
36Title and Legend
How can you facilitate quick comprehension of data context. Title and legends is the answer to this. This video will teach you to work with these amazing elements.
-
37Adjusting Layout
Figure layout, including the size and location of plots, directs the focus of readers. A figure with good layout facilitates data presentation in a logical flow. It is thus important to familiarize ourselves with layout settings when plotting. Let's see how to assign proper sizes, positions, and spacing to our plots.
-
38Adding Subplots
There are frequent occasions when you would prefer to have different plots aligned in the same figure. How to go about it? This video, shows few important steps to do this.
-
39Adjusting Margins
Letās take a step further to adjust the subplot axes or the plot area to fit the inner layout by using several ways.
-
40Drawing Inset Plots
While aligning relevant plots side by side, we also have the option to embed a smaller plot in the main figure to visualize data of a different scope. This video, will walk you through the steps to achieve this.
-
41Adding Text Annotations
Let us now learn to add text annotation to our figures by specifying the desired locations through some built-in functions in Matplotlib.
-
42Adding Graphical Annotations
How can you increase the interest of the readers of your plots to stay focused when you have a lot of text already added for explanation? Image annotations are an answer to this. Letās add image annotations to make our graph more attractive!
-
43Typical API Data Formats
APIs are important because they are the medium of offering data in websites. It is important to know the data formats used in them. Here, we will look at the most important formats used.
-
44Introducing Pandas
Beside NumPy and SciPy, pandas is one of the most common scientific computing libraries for Python. Hence, we will learn about them in this video.
-
45Visualizing the Trend of Data
Once we have imported the two datasets, we can set out on a further visualization journey. Letās visualize the data trend in this video.
-
46Visualizing Univariate Distribution
Seaborn makes the task of visualizing the distribution of a dataset much easier. Letās see how this works!
-
47Visualizing a Bivariate Distribution
As a follow up to the previous video, we will now learn how to visualize two variations in one graph. This improves the visualization of the data.
-
48Visualizing Categorical Data
In this video, we are going to implement a naive algorithm for classifying populations into one of the three categories. After that, we will explore different techniques of visualizing categorical data.
-
49Controlling SeabornFigure Aesthetics
While we can use Matplotlib to customize the figure aesthetics, Seaborn comes with several handy functions to make customization easier. Letās try that here.
-
50More About Colors
Color is perhaps the most important aspect of figure style, and thus it deserves its own video
-
51Getting End-of-Day (EOD) Stock Data from Quandl
This video will show you some practical steps to work with the Quandl dataset and retrieve data for End-of-Day stock.
-
52Two-Dimensional Faceted Plots
This video introduces three major ways to create faceted plots, which are seaborn.factorplot(), seaborn.FacetGrid(), and seaborn.pairplot().
-
53Other Two-Dimensional Multivariate Plots
This section will walk you through the two special plot types that come in handy if you want the maximize space efficiency. Those are Heatmaps and Candlestick plots.
-
54Three-Dimensional (3D) plots
This video will put more focus on 3D scatter plots and bar charts.
-
55Scraping Information from Websites
These data portals often provide Application Programming Interfaces for programmatic access to data. However, APIs are not available for some datasets; hence, we resort to good old web scraping techniques to extract information from websites.
-
56Non-Interactive Backends
Matplotlib backends differ much more than just in the support of graphical formats. Backends handle so many things behind the scenes! Letās have a look at the Non-interactive backends first.
-
57Interactive Backends
Through the use of interactive backends, plots in Matplotlib can be embedded in Graphical User Interface (GUI) applications
-
58Creating Animated Plots
Matplotlib was not originally designed for creating animations, and there are GPU-accelerated Python animation packages that may be more suitable for such a task.
-
59Effective Visualization ā Planning Your Figure
This video gives you some essential and general rules while plotting your figure and to make it more effective and appealing
-
60Effective Visualization ā Crafting Your Figure
Now you should be clear about the purpose and overall plan for every plot to make. It is time to make it good. This video will teach you to adapt your figures to make them more digestible for the brain.
-
61Visualizing Statistical Data More Intuitively
Letās revisit more variants of bar chartsāstacked bar chart and layered histograms, which are commonly used in scientific publications to summarize and describe data and make it more interesting.
-
62Methods for Dimension Reduction
In the era of big data analysis, it is common to deal with datasets with a large number of features or dimensions. Visualization of data with high dimensionality is extremely challenging. This video will teach you
-
63Visualizing Population Health Information
Letās take a step ahead to work with some real-world dataset which is really huge and visualize the statistics through plots.
-
64Map-Based Visualization for Geographical Data
This video will demonstrate how you can incorporate a map-based visualization, which is powered by the GeoPandas library.
-
65Combining Geographical and Population Health Data
This video will show you how you could combine both geographical and population health information of the US. Here we go!
-
66Survival Data Analysis on Cancer
Since we've spent a significant amount of time discussing death rate, let us conclude this section with one final analysis of two cancer datasets, in this video.
-
67Test Your Knowledge
Social Network