Data Visualization
Data
66
Analysis
The
process
of
inspecting cleansing transforming
, , ,
I
modelling data with the
goal of discovering useful
information
, informing conclusions and supporting
"
,
decision -
making .
-
[ Wikipedia]
of well defined
• Data analysis has the
objective answering a
-
research statement
problem :
Association : Is there relation between X IY ?
any
Causation : does X cause Y ?
Prediction :
given Xi ,
can we
predict Y ?
Classification of Data
Data
f \v
Qualitative / Quantitative
categorical Data Data
Kisii :'m::I:÷.is#::e:sgC::::IreIe::[Link]
•
Categorical Data
Nominal :
gender blood ele
is
group
.
,
,
o Ordinal : disease stage degree of pain
,
.
→ Likert scale for
pain ([ 1 (no pain ) ,
2C mild)
,
3 (
high )
,
4 ( too ) , Scsevere )] )
high
Binary
' '
I
'
0 : O I .
• Quantitative Data
o Discrete → bar chart
: → no of students in a class
eg
. .
of in each
• no .
computers department .
of items at the
no
buy grocery every
month .
you
• .
o continuous →
histograms ( single variable) scatter
plot
C two
,
variables )
eg :
- .
age ,
height weight ,
.
• Blood Pressure ,
Blood flow .
•
Temperature ,
Pressure .
NOTE : -
Choose statistical
analysis based on the
type of data .
Why visualize data ?
→ observe the patterns
→
identify the outliers that could
be anomalies .
for
→
easy interpretation .
Popular Plotting Libraries in
Python
1- Matplotlib
2
.
Pandas
3 .
Seaborn
of charts
Types
A- hine charts :
visual tools that illustrate trends in data
•
powerful over a
of time
period
• each value is plotted on the chart then the points are
,
connected to trend the compared time
display a over
span
the reader to make predictions projections for
•
helps Er)
future outcomes .
B .
Histogram :
bars of different
•
graphical representation of date
using
heights
.
each bar
•
groups no 's into
ranges
& the
height of
depicts the freq .
of each R
range @ )
bin .
• When to use ?
o to represent freq -
distribution of numerical variables .
( movies data .
Csv )
•
Matplottib implementation :
Better visualization : -
• Seaborn implementation : -
C .
Bar chart
•
presents categorical data with
rectangular bars with
lengths
proportional to the counts that
they represent
.
Bar charts be oriented
• can
vertically COR ) horizontally ;
vertical bar charts are known as column charts .
•
Horizontal bar charts are a
good option when
you
have
lot of bars to @ K) the labels them
a
plot ,
on
require
additional to be
space legible .
•
Matplotlib implementation : -
• Seaborn implementation : -
The variable you want to
map
anis W
.
on n -
syntax : -
sus .
countplot C '
ate .
; , III! )
d
of the function name of the dataframe
name
D) Scatter plot
two variables
•
displays values on numeric
using points
for each variable
positioned two on anis : one .
• demonstrates the relationship between the plotted variables -
whether the correlation positive
is
strong 0127 weak ,
linear
cops negative linear @ R2 non - .
•
helps in
identifying outliers -
•
Matplotlib implementation : -
• Seaborn implementation : -
this is True
by denfault .
Syntax : - sus .
veg plot ( n
,
y ,
marker =
"
*
"
,
fit !eg= False)
E.) Pie Chart
simplest & efficient visual tool for
• most
comparing parts
of a whole .
• is a circular chart divided into
wedge -
like sectors
,
illustrating proportion .
• The total value of the pie is
always loot .
.
Some more
Popular charts . . .
F) Bon Plot G.)
Doughnut chart
H)
.
Bubble Chart I) SPIDER @R) RADAR CHART
Reference
1
Wikipedia
.
"
5th edition
Picturing
''
2
Elementary Statistics the World
' -
-
Ron Larson Farber
Betsy
-
3 .
[Link]
4 .
[Link]
5 . [Link]
G .
[Link]