Search

# Exploratory Data Visualization - Data Science And Machine Learning

Updated: Mar 23 Exploratory Data Visualization - Data Science And Machine Learning

Data Science does not only depend only on the data organization but also on the parts of data visualization. Data visualization is to make data better for understanding and learning purposes.

In exploratory data, we have used different types of techniques for visualizing data in data science and used to explore and showcase your data.

To do this use matplotlib and skit-learn libraries which is easily working with python ML and Data Science.

In this, we will use different showcase which is given below:

• Line charts,

• bar plots,

• scatter plots,

• histograms, and

• box plots, etc.

These all of the above are used to better understand your data and help others understand your data as well.

### Line charts

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

# Data

df=pd.DataFrame(“data”)

# line plot

plt.plot( 'columnname1', ‘columnname2', data=df, marker='o', markerfacecolor='blue', markersize=12, color='skyblue', linewidth=4)

plt.legend()

### Bar plots

import matplotlib.pyplot as plt

plt.bar([2, 4, 6, 8],[3, 5, 7, 9], label="First bar graph")

plt.bar([4, 8, 12, 16],[3, 6, 9, 12], label="Second Bar graph", color='b')

plt.legend()

plt.xlabel('bar x lebel')

plt.ylabel('bar y label')

plt.title('Demo to create bar graph')

plt.show()

### Histograms

import matplotlib.pyplot as plt

ages = [20, 24, 26, 4, 8, 25, 21, 22, 28, 26, 40, 41, 51, 50, 56, 60, 59, 60, ]

bins = [0,10,20,30,40,50,60]

plt.hist(ages, bins, histtype='bar', rwidth=0.8)

plt.xlabel('x')

plt.ylabel('y')

plt.title('Histogram')

plt.legend()

plt.show()

It plots data in the intervals (like 10-15, 15-20, 20-25) and ages as frequency

### Box Plots

data1 = [20,25, 15, 22, 19]

data2 = [15,4, 10, 14, 8]

#plot box plot

box_plot_data=[value1,value2]

plt.boxplot(box_plot_data)

plt.show()

There are other visualization techniques like heat graph, etc., also used to show data in visual form. You can itself try it by taking data and create all graph for practice, these are basic graph for beginners.

If you want to create advanced-level visual effects then contact at Codersarts official website by clicking here.

We have also provided assignment help, Coding help, project help services, and hire developers for your project. ### Recent Posts

See All

#### Deploying Machine Learning Models in SageMaker - AWS Cloud.

Tel: (+91) 0120  4118730

Time :   10 : 00  AM -  08 : 00 PM IST