
Hello and Welcome to the course on “comprehensive data visualisation with matplotlib in Python”.
Needless to say, Python is one of the most popular programming languages on the planet right now, so is the opportunity associated with it. Although Python is a general-purpose programming language but still with the help of specific library (or module) it can perform pretty well in that particular Niche. Matplotlib is one of THE most popular and powerful libraries for data visualization. Although it is a third-party library eventually treated as a part of the python package. Matplotlib has enormous functions, that can cater to a wide range of applications. Many developers, students, professionals and hobbyist use Matplotlib package in Python for their day to day activities such as big data visualization, Machine Learning, Data science, classification and the list goes on and on and on.
In this course, you will learn to plot data on multiple plots such as scatter plot, XY plot, pie chart, stacked chart and several other. To make this course interesting, I have also included audio data analysis, time-series data visualization from Yahoo finance as well as a bit of reading images reading as well as playing with colouring schemes.
So overall this is a power-packed course with all the necessary information required to get you industry-ready on Data visualization. I will also keep updating this course as an when required so that you will always be updated with the latest information.
After finishing this course, you will be able to visualize and analyse any kind of data available to you and get meaningful information out of it.
Make sure to check out the next video, about the course curriculum, where you will understand the complete course content within 5 minutes and decide whether this course is suitable for you.
Thank you for watching and I will see you in the next section.
Welcome to this section on introduction to Matplotlib. Matplotlib is a comprehensive library for creating static, animated as well as interactive visualisation in Python. It is one of the best and most used libraries for plotting in 2D and 3D. Matplotlib is a third-party tool developed to work with Python. It does not come to the standard Python package, need to be installed separately. Matplotlib with Python makes scientific plotting simple & straight forward.
You would have probably heard that data is the new oil or data is a new electricity. In today’s world, we have a humongous amount of data from a plethora of sources. Once we have all these data available, we need to get meaningful information out it. In order to get meaningful information, data analysis is required. Matplotlib comes handy to visualize the data.
The Matplotlib is able to visualise the data through various kind of graphs and plots. In order to convey meaningful information, one needs some kind of pictorial representation of the true data and Matplotlib can help us a way forward by providing an extensive set of functionalities. Matplotlib helps to know more insight and the correlation among the data.
It’s already proven fact, backed by a lot of experimental stats, that human can understand visuals better than any other form of information. Matplotlib provides an extensive set of tools to plot data in various formats such as continuous distribution plot, scatter plot, pie chart, histogram, Images, 3D plots and much more.
In this module, you will learn about the dependencies that are associated with Matplotlib. There are certain dependencies with Matplotlib such as Numpy, dateutil, kiwsolver , cycler, setuptools and pyparsing. These modules are necessary for the functioning of Matplotlib. So, in this module, you will learn to install matplotlib and understand how the dependencies automatically get installed with the help of requirements.text file. Although we don't have to install all the dependencies as matplotlib takes care of everything by installing all those dependencies in the background.
Jupyter Notebook is one of the most popular and widely used IDE for the scenario like data visualisation and plotting the data. In this tutorial, you will understand to install Jupyter Notebook as a standalone package using PIP in Python. Jupyter Notebook, sometimes also known as Notebook. After installing Notebook, you will learn to execute the python script and some basic understanding of how the code works in Jupyter Notebook. One of the biggest advantages of Jupyter notebook is, you can see the result in the same cell.
This module is divided into six small section. You will learn to create a simple plot using pyplot. Pyplot is integral part of Matplotlib library and is derived from MATLAB. In case, you are not aware of pyplot then don’t worry, I will be discussing about pyplot in this module. Various options work and can be applied to pyplot such as labels, markers, specifying axis, title and many more we will proceed with systematic approach. As we progress through this course, you will learn the following topics in detail
- Introduction to Pyplot
- X labels and Y labels in the plot
- Formatting the plot style
- Specifying the axis in a plot
- Using Markers in the plot
- Specifying titles and Legends for a plot
You will learn about the pyplot in this section. Pyplot is a part of the matplotlib library, focused on creating plots. Pyplot is actually the collection of several functions each targeting a specific component. The functionalities of pyplot are inspired from MATLAB, so in case if you don't know, MATLAB is one of the best mathematical computing tools out there in the industry, in fact, the full form of MATLAB is MATrix-LABoratory. Each pyplot function makes some changes to figure for plot such as creating a figure itself, creating a plot area, adding data and so on. In this module, you will learn various properties associated with pyplot and how to play with those properties.
In this module, you will learn about creating labels, basically the X and Y labels, to a plot. Without a label, the user doesn't know about what exactly is in the x-axis and what exactly in the y-axis. It is required to put a label for a graph for better understanding of data present on the respective axis. The label is required in order to give meaningful information to the graph. You will learn to apply individual or both the labels in the plot.
In this section, you will learn some techniques to display the plotted lines with various colours and line style. By applying the formatting techniques, you can differentiate between two lines on the same plot representing the same data. The formatting techniques not only give meaningful information but also provides a decent look at the overall plot. The general format for applying the plot formatting is using a Marker, line and colour. I will make you understand what this means and how to use it with pyplot in this video. I will not be talking about the Markers in this video but will talk about line style and colour.
In this section, you will learn about specifying the axis in the plot. Pyplot module generally adjusts the axis based on the provided data. Matplotlib algorithm takes care of the axis arrangement based on the data. As soon as you provide the data axis is going to adjust accordingly. But let's say we don't want Matplotlib to take care of the axis arrangement rather you take the ownership to decide the axis range manually. You will learn to specify the custom axis range in Matplotlib.
In this module, you will learn about markers along with the line formatting. I will talk about markers and use various Marker for marking techniques. A marker is used prominently to show the data points along the line, so by applying a marker style you can point to the presence of data points in the Graph. I have discussed in module 3 of this lesson about the colour and line style, there I had demonstrated the line and colour option and I had told you that I will be discussing marker in the latter part of this lesson. In this video, I will be discussing Markers along with line and colour option. In this section, I am going to combine all of them together (which is Marker, Line style and Colour).
This is going to be the last module of this lesson. Till now, you have learnt about the pyplot how you can put X and Y labels to the plot & you have also learnt about formatting plot styles, specifying access in the plot and working with various marker options. In this section, you will learn about the title and legends. The title is basically the top heading which says about the plot (in a simple sense it is the name of the plot) and legends represent the components of a graph.
In this section, you will learn about scatter plot, categorical data plotting, lines and setp method. I am sure you have come across the term scatterplot right, it is basically the data points shown in two-dimensional space bounded by some X and Y range. It is also possible to plot the data in N-dimensional space. The data points in the scatter plot are not connected via any lines or something so they are spread or scattered across that space. The best example to visualise scatter plot is STARS in the sky. Every star appears to be placed randomly throughout the visible space.
You will also learn to plot data falling under a certain category. Category or group means a collection of a specific number of data falling under a certain category.
The entire section is divided into three modules, which are
- Scatter plot
- Categorical data plotting
- Lines and Setp method
I am sure that you would have come across the term scatterplot. It is basically the data points shown in the two-dimensional space bounded by some X and Y range of coordinates. however, it is also possible to plot the data in n-dimensional space but in this course, you will learn about scatter plot being displayed in two-dimensional space. Data points in the scatter plot are not connected via any lines or so. You are going to understand about scatter plot and how to plot to scatter plot using matplotlib functionalities.
In this module, you will learn about categorical plotting and how you can plot data as a categorical plot. Category or grouped data means, a specific number of data falling under certain categories. For instance, let say, out of the entire population of a city some XYZ number of people are below 18 years of age and XYZ number of people are above 60 years of age. So, we have created two categories one is below 18 and the other is above 60 right. We can plot a categorical plot of data on these two categories with the help of XYZ numbers. In this section, you will learn to plot the same using some hypothetical numbers.
In the last two modules, you have learnt about Scatter plot and Categorical plotting. In this module, you will quickly learn about two very useful methods which are Line and setp methods. The line basically will hold the complete plot information as a variable and setp method is helpful when you want to apply the bulk setting to a specific plot. All the lines and markers formatting will be of the same type and can be applied in one go using setp method.
You will be able to generate an interactive plot, wherein you get the facility to interact with the graph data. You can zoom in/out a portion of the graph, PAN the graph, save the graph and much more.
This video Lecture aims at providing information related to creating a custom UI such as slider, checkbox, Dropdown menu etc.., which will help in controlling the variables/parameter during the execution time. You will learn to create and use various UI controller elements to change the value during runtime and thus saving a lot of time. You will be amazed to learn this technique and able to analyze the data in a more productive way.
In this Section, you will learn about figures and subplot concept. You will also learn how and when to use subplot. In this section you will also learn to create subplots to accommodate several plots in the same area all together. Figures are specially a fixed empty area (or canvas), to display various artistic work. Subplot also uses figures to display data on various graph.
In this section you will learn the following topics in sequential order.
- Concepts of Figures and subplots
- Use multiple figure and subplots
- Show Grids on the plot
In matplotlib, specially pyplot, the figure is a Canvas or a blank reserve area to display something. You can imagine figure as a placeholder for plotting a subplot, so with the help of figures, subplot can be plotted and displayed in that specific area. Matplotlib can display a plot using figure. In this section, you will learn to create figures and use subplot to display all the data in one Canvas.
In this section, you will learn to create multiple figures as well as multiple subplots, in order to accommodate several plots together at one place. This section is going to be super useful especially when you want to plot variations of data at one place. By plotting variations of the same data at one place you leverage the functionalities of matplotlib to compare those data. In this tutorial you will understand how to plot multiple data at one place and how you can compare them easily.
In the last two modules, you have learnt about subplots and figures. In this section, you will learn to apply grids to the plot. Grids are useful especially when you want to subdivide the background into smaller sections, by doing so data points can easily be located in that particular area. It can be applied using a very simple method in matplotlib and you will see how to apply Grids to any plot in matplotlib.
I am glad that you are here to build the competency on visualising data with Matplotlib as well as I congratulate you as you are doing phenomenal. Matplotlib is probably one of the most advanced data visualisation tools available right now. Main intention of this lesson is to provide you with more visualisation via various other plot such as Histogram, bar charts, stacked bar chart and Pie chart. All of these plots help you to get more understanding of data as well get better insight about the data. As you already know that one plot doesn't fits into every requirement therefor understanding of multiple plots are necessary.
This section is divided into 4 modules, each module deals with one type of plot in details along with the demonstration.
Although you have learnt a bit about bar chart during categorical data plotting in the previous section, but that was just for one use-case. Here you will learn to play with various other parameters of a bar graph (or bar chart). A Bar chart is basically a collection of bars (or you can say data bars) which represents a value for that particular category or group. Several bars can be plotted in one bar graph, each bar can have same or different values. In this section you will learn how to plot a bar chart with the help of real-world data in matplotlib.
In this module you will learn about pie chart. Pie Charts are pretty charming, specially I feel this way. It is used as one of the fascinating ways of projecting the data with the help of labels and numbers with a circle having segmented coloured section. One of the important things to keep in mind about pie chart is that sum of numbers to be plotted on a pie chart should be 100 (hundred), which makes the representation easy otherwise you have to manually apply some method and tricks to compensate the gap. We will see the various options that can be applied to a pie chart using matplotlib library.
A box plot is a way to display a few statistical information, of a numerical dataset, using a box (mostly rectangular box). Statistical data includes a minimum value, first quartile (Q1), median, third quartile (Q3), and a maximum value. The maximum and minimum value are represented using an extended line (aka whisker) above the Third Quartile and below the first quartile respectively, that’s why box plot is also sometimes known as box-whisker plot. Box plots provide insight into distribution properties of the dataset.
This is going to be an exclusive lecture on understanding time-series data as well as plotting them on the graph using Matplotlib. Time series data is continuous data sequence associated with some kind of timestamp such as year, month, day, hours, minute, second as well as a millisecond. These kinds of data have no meaning if you remove the time components from them and keeping time intact with it provides meaningful information, hence known as Time series data.
Where are these data available?
These data are most likely can be obtained from the stock market, sales data, currency conversion rates, weather reports and many more. These data are basically generated along with the timestamp. I have collected currency conversion data from EURO to INR over a period of roughly one month. I'll be focusing on plotting these data using Matplotlib, displaying as well as visualizing the data.
Learn to generate and visualize three-dimensional data with matplotlib by building x, y, z values, creating a 3D surface with plot_surface, and applying color maps and color bars.
In this lesson, you will learn to plot, visualise and segment audio data. This is a little bit different from what you had learned till now. Till now, we have done 2-dimensional plotting, 3-dimensional plotting. This is a category of two-dimensional particularly but especially about audio data. Audio or sounds are an integral part of our life be it mobile app notification sound, OS notification, everyday audio from a musical instrument, wind blowing sound and countless others.
Almost everything in nature has been associated with some or other kind of sound (audio). There are various types of sound present in nature, some of them we can hear but some of them we can’t. A human can hear sound in the range of 20 Hz to 20 kHz.
For this lesson, I have downloaded a wave file from the University of Illinois. Reason for choosing a .wav file format is the easy availability to read wave file using wave library in Python. However, there are other audio formats supported by Python but I am not going to talk about them in this course. For this lesson, I'll be working exclusively on wave file and you will learn to read and display in an audio file in Matplotlib. You will also learn to get various properties of an audio file such as bitrate, sample rate, sampling frequency, slicing audio sample for a specific range as well as convert those sample signal to the frequency domain.
Hello, and welcome to the course on “Comprehensive Data visualization with Matplotlib in Python”. This course has been designed keeping in mind the working professionals, students and even hobbyist, who wanted to get meaningful information from the data and take appropriate action.
This course contains Quizzes and assignments, which will help you to evaluate your learning periodically. Python code for each module is included with this course as well, you can download them as base code and you can fully customize it.
If you are a student and wanted to participate in Datathon, Hackathon and similar competition as well as you wanted to analyse & visualize data as a part of the project. Then this course is for you.
If you are professional and working on a daily basis to explore data to get more insight and you are required to present the key information of the analysis with the help of several charts and plot. Then this course is for you.
If you are a hobbyist and always wanted to understand the raw data, available from various source (datasets), as a pro then this course is for you.
This course is power-packed with all the information that you need to from absolute basic to advance level. After finishing this course, you will be able to
1. The plot, visualize and analyse data in 2D as well as the 3D plot.
2. Handle, plot and interactively visualize both linear and Non-linear data
3. Get exposure on various plots such as bar chart, stacked chart, XY plot, Pie chart, Histogram, polar plots, logarithmic plot and much more
4. Get exposure on working with Time-series data (mostly from the finance field) and plot them as well as analyse them.
5. Work with Audio signals and plot, visualize and Analyse them
6. Work with Images up to certain extends and play with basic image manipulation such as extracting channel, applying colouring scheme to get more information.
7. Handle and visualize all sort of Data in Matplotlib.
Tools used in this Course
- Python 3 (any version >3.7 is perfect)
- Jupyter Notebook (IDE)
- Matplotlib (Data Visualization Library)
So, Let’s get started.
Visualize and Explore the Data together.
{Python
Data visualization with Python
Data visualization Matplotlib}