Chapter3 - Visualization and Communication
Chapter3 - Visualization and Communication
Visualization
2
Outline
1. Why data visualization is important?
2. Data Visualization Design
3. Popular types of charts
4. Plotting charts
5. Communication
3
It helps people:
- to absorb information quickly, improve insights
- to increase understanding of data
- easily to compare data and use it to tell a story
- express data of varying types and sizes
4
Principles:
- Accurate: presenting information in a way that doesn’t
distort it.
- Helpful: Help users emphasize exploration and comparison.
- Scalable: Adapt visualizations for different device sizes
5
4. Plotting charts
Import libraries:
import matplotlib.pyplot as plt
import seaborn as sb
Setting the title, axis labels, ticks, and tick labels:
.set_title('My first matplotlib plot')
.set_xlabel(‘X axis')
.set_ylabel(‘Y axis')
30
4. Plotting charts
Bar plot:
plt.bar(data, height, width, bottom, align)
Or
data.plot(kind='bar')
Seaborn
Seaborn.barplot(data, x, y)
31
4. Plotting charts
Bar plot:
32
4. Plotting charts
Home work:
1. Plot 3 bar charts
2. Submit .ipynb file to Lab9-Bar Plot
Reference Videos:
https://www.youtube.com/watch?v=JpSMse3eVVg&list=PL
UaB-1hjhk8FE_XZ87vPPSfHqb6OcM0cF&index=62
33
4. Plotting charts
Line plot:
plt.plot(data) # Plot the chart
Or
data.plot()
Seaborn
Seaborn.lineplot (data, x, y)
34
4. Plotting charts
Line plot:
35
4. Plotting charts
Home work:
1. Plot 3 line charts
2. Submit .ipynb file to Lab10 – Line Plot
Reference Videos:
https://www.youtube.com/watch?v=JpSMse3eVVg&list=PL
UaB-1hjhk8FE_XZ87vPPSfHqb6OcM0cF&index=62
36
4. Plotting charts
Pie plot:
plt.pie(data)
Or
data.plot(kind='pie‘)
37
4. Plotting charts
Pie plot:
38
4. Plotting charts
Home work:
1. Plot 3 pie charts
2. Submit .ipynb file to Lab11 – Pie Plot
Reference Videos:
https://www.youtube.com/watch?v=JpSMse3eVVg&list=PL
UaB-1hjhk8FE_XZ87vPPSfHqb6OcM0cF&index=62
39
4. Plotting charts
Histograms plot:
plt.hist(data, bins)
Or
data.hist(bins)
Seaborn
Seaborn.histplot(data, x, y, bins)
40
4. Plotting charts
Histograms plot:
41
4. Plotting charts
Home work:
1. Plot 3 Histograms charts
2. Submit .ipynb file to Lab11 – Hist Plot
Reference Videos:
https://www.youtube.com/watch?v=JpSMse3eVVg&list=PL
UaB-1hjhk8FE_XZ87vPPSfHqb6OcM0cF&index=62
42
5. Communication
Why is it Important?
Communication works as the key to data analysis
Explaining your findings and recommendations to audiences
43
5. Communication
How to communicating data analysis results?
1. Know your audience: who your audience is and what they
need from you
2. Choose the right medium: such as text, visuals, or speech
3. Use clear and simple language
4. Highlight the key insights: summaries, bullet points, or
tables, colors, fonts to emphasize the main findings
44
5. Communication
How to communicating data analysis results?
5. Provide context and interpretation: use storytelling
techniques to demonstrate the applications of your data.
6. Make recommendations and call to action: invite your
audience to take the next steps or provide feedback.
Thanks!
Any questions?