Various plots for data visualisation
Reference Notebook : notebook
If using Collab : you can simply copy the code snippets and tweak the parameters to obtain various plots or change the data, to change the plots accordingly.
If you want to run the code on your local envoirnment :
-
Download & Install python3 :
https://www.python.org/downloads/
-
Either install Jupyter-lab or install Jupyter-notebook (install any one, Jupyter-lab preferred)
-
Install Matplotlib :
pip install matplotlib
-
Install Seaborn :
pip install seaborn
-
Install Numpy :
pip install numpy
A line graph is commonly used to display change over time as a series of data points connected by straight line segments on two axes. Line graphs are useful in that they show data variables and trends very clearly and can help to make predictions about the results of data not yet recorded.
Scatter plot's primary uses are to observe and show relationships between two numeric variables. The dots in a scatter plot not only report the values of individual data points, but also patterns when the data are taken as a whole.
Bar graphs are used to compare things between different groups or to track changes over time. However, when trying to measure change over time, bar graphs are best when the changes are larger.
There are two primary use cases for a pie chart: If you want your audience to have a general sense of the part-to-whole relationship in your data and comparing the precise sizes of the slices is less important. To convey that one segment of the total is relatively small or large.
A histogram is used to summarize discrete or continuous data. In other words, it provides a visual interpretation. This requires focusing on the main points, factsof numerical data by showing the number of data points that fall within a specified range of values (called “bins”). It is similar to a vertical bar graph.
It is used to Show the counts of observations in each categorical bin using bars.
A box and whisker plot (sometimes called a boxplot) is a graph that presents information from a five-number summary.A box and whisker plot is a way of summarizing a set of data measured on an interval scale. It is often used in explanatory data analysis. This type of graph is used to show the shape of the distribution, its central value, and its variability.
Violin plots are used when you want to observe the distribution of numeric data, and are especially useful when you want to make a comparison of distributions between multiple groups. The peaks, valleys, and tails of each group's density curve can be compared to see where groups are similar or different.
Read this for information about distribution plot!!
Heatmaps are used to show relationships between two variables, one plotted on each axis. By observing how cell colors change across each axis, you can observe if there are any patterns in value for one or both variables.