Data Visualisation is a tool used by Data Scientist to convey important information represented by it to other people those who are not expert in the domain.
Data is an extremely required part of this new age era with the continuous growth of companies and industries which needs to be handled very carefully. These data can help in making many decisions that may lead to the growth of a business through Data Visualisation.
Data Visualisation will allow the data scientist to create bar charts, pie charts, histograms, counterplot, flow tree, etc. using data visualisation libraries.
Main Data Visualisation libraries:
Matplotlib: It is a python library used for data visualisation, this library helps create many different kinds of graphs and charts such as pie charts, histograms, error charts, etc. all these representations can be done by importing Matplotlib in our working module. Generally, we import matplotlib.pyplot which provides MATHLAB like plotting framework, pyplot combines the plotting sequences with NumPy which work as.
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
Matplotlib can be used in Python script, IPython shell, Jupyter notebook, web application servers, etc.
Seaborn: It is a python library integrated with Numpy and Pandas (which are other libraries for data representation), Seaborn is closely related to Matplotlib and allow the data scientist to create beautiful and informative statistical graphs and charts which provide a clear idea and follow of pieces of information within modules. Seaborn takes Data frames (when dealing with pandas) and a complete array of the dataset (when dealing with a Numpy array). Most of the work is done internally with required mapping within the information that users desire to have in their data. The Seaborn data graphics can include bar charts, pie charts, histograms, scatterplots, error charts, etc.
import seaborn as sns
#different styles can be added
#loading data from seaborn itself
fmri = sns.load_dataset(“fmri”)
sns.lineplot(x=”timepoint”, y=”signal”, hue=”region”, style=”event”, data=fmri)
Geoplotlib: Matplotlib is a complete data visualisation library which helps create charts and graphs and it still can’t deal with many geographical maps related data. Geoplotlib is an important Python library which deals with geographical data. Geoplotlib helps create many different types of geographical maps such as dot-density maps, choropleths, symbol maps, weather maps, etc. Geoplotlib requires Numpy and pyglet to be installed before using any map function of Geoplotlib, this library is an excellent option to deal with any geographically related data.
ggplot: It is said to be fun, powerful, and easy to learn. It’s a python data visualisation library that is based on ggplot2 which is created for the R programming language and implementation of the Grammar of Graphics, It is built for making professional-looking plots quickly with minimal code. To produce a plot with ggplot we need to decide on three main things:
- A data frame (within pandas) containing our data.
- How the columns of the data frame can be translated into positions, colours, sizes, etc. of graphical elements.
- The actual graphical elements to display.
ggplot in Python can create data visualisations such as bar charts, pie charts, histograms, scatterplots, error charts, etc.
ggplot2: It is the data visualisation library of R programming language, it is a system for creating graphs and charts based on “The Grammar of Graphics”. ggplot2 also follows the same steps as that of ggplot, we provide the data for which we want to create our plots, tell how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details. To work with ggplot2 we need to install the tidyverse. ggplot2 allows you to add different types of data visualisation components or layers in a single visualisation which ultimately creates histograms, scatterplots, error charts, bar charts, pie charts, scatterplots, etc.
Echarts: It is a JavScript library, echarts is a Declarative Framework for Rapid Construction of Web-based Visualisation, it is free, powerful, and provides an easy way to add customised, intuitive, interactive charts to any product. ECharts is an incubator project of the Apache Software Foundation. Echarts provides Multidimensional data analysis (Analysis of the relationship between multiple charts), and Charts for all sized devices. Echarts is used to create many types of charts like line charts, Bar charts, Pie charts, Scatter charts, Geo/maps, Graphs, etc.
To read more about Machine Learning, click here.
By Vikas Upadhyay