Data
Visualization
By Lecturer Mrs. D. P. M.
Perera
01 - Introduction
02 - History
03 - Data Visualization
04 - Conclusions
01
Introduction &
Foundations
What is Data Visualization
Data visualization is the graphical representation of data or information. It helps people
understand complex data by representing it visually using charts, graphs, maps, infographics,
etc.
Example:
When we look at a country’s COVID-19 case trends, a line graph tells the story much faster than
reading a table of numbers.
Why Visualization matters:
Human eyes detect patterns faster than reading text.
Helps spot trends, anomalies, and relationships.
Reduces cognitive load.
Improves data storytelling and communication.
What is Data Visualization Cont..
Real-world Example:
Google Analytics dashboards
Election results maps
Weather forecasts
Sales dashboards in Power BI
Diagram description:
A diagram showing “Data → Processing → Visualization → Insight.”
Goals of Visualization
Exploratory Visualization: to explore and Explanatory Visualization: to communicate
find unknown insights. a message.
Example: Scatter plot of height vs. Example: Pie chart showing market
weight to see correlation. share to show who leads the market
Data Types and Scales
Type Description Example Best Visual Forms
Categorical Labels without
Country names Bar chart, Pie chart
(Nominal) order
Ordinal Ordered categories Satisfaction levels Bar chart, Heatmap
Equal spacing, no
Interval Temperature (°C) Line chart
true zero
Histogram, Line
Ratio Has true zero Income, height
chart
Example:
Temperature chart vs. Sales revenue chart — both numeric but one is interval and one
ratio.
Basic Visualization Types
Bar chart: comparing categories
Line chart: trends over time
Pie chart: parts of a whole (use sparingly)
Histogram: distribution of numerical data
Scatter plot: relationships between two variables
Box plot: variability and outliers
Heatmap: matrix of values shown as colours
Visual example: (describe)
An example with bar chart vs. pie chart showing the
same dataset to compare readability.
02
Visual Encoding
& Advanced
Charts
Visual Encoding Channels
The way data is “encoded” into visual elements
Channel Type Example Strength
Position Planar Dot on x-y axis Very strong
Length Planar Bar height Strong
Angle Retinal Pie slice Moderate
Colour (Hue) Retinal Category colours Moderate
Weak for precise
Size (Area) Retinal Bubble size
comparison
Shape Retinal Different symbols Weak
Rule of thumb:
Prefer position and length for accuracy, use colour/size for highlighting.
Using Colour Effectively
Colour Palettes:
1. Categorical: distinct hues for categories (e.g., blue, red, yellow).
2. Sequential: gradient for ordered values (e.g., light to dark blue).
3. Divergent: two hues from midpoint (e.g., profit/loss).
Good practices:
Limit colours to 6–8 maximum.
Use consistent colour meanings.
Avoid red/green for accessibility.
Use contrast wisely (dark text on light backgrounds).
Example:
Weather temperature map (blue=cold, red=hot) – intuitive colour mapping.
Size, Shape and Composition
Size:
Used to show magnitude (bubble charts, proportional symbols).
Example: Population bubbles on a world map.
Shape:
Used for categories (circle, square, triangle) but only a few shapes can be clearly
distinguished.
Composition charts:
Stacked bar chart (part-to-whole comparison)
100% stacked bar (proportion only)
Stacked area chart (changes over time)
Size, Shape and Composition
Advanced types:
Streamgraph: Flowing layers over time (useful for music popularity trends).
Radar/Spider chart: Multivariate comparison (e.g., comparing smartphone specs).
Treemap: Hierarchical data as nested rectangles.
Streamgraph
Radar chart Tree map
03
Principles, Design
and Storytelling
Key Design Principles
Clarity: one clear message per chart.
Accuracy: no distortion of scale or proportion.
Efficiency: minimize ink but maximize
information (“Data-Ink Ratio” — Tufte).
Consistency: use same colour, font, style
throughout.
Accessibility: readable fonts, colour-blind
friendly, sufficient contrast.
Example:
Bar chart starting at 0 vs. one truncated at 80 —
truncation can mislead.
Data-Ink Ratio (Edward Tufte Concept)
“Above all else, show the data.”
Avoid:
3D effects, gradients, shadows
Excessive labels, borders, icons
Distracting backgrounds
Improve:
Remove non-data ink
Use white space effectively
Focus on message
Example:
Simplify a cluttered dashboard into a clean minimalist one.
Storytelling with Data
Structure of a Data Story:
1. Context: What’s the problem/question?
2. Conflict: What trend, issue, or insight appears?
3. Resolution: What should the audience learn or do?
Techniques:
Highlight key points (colour emphasis, annotations)
Use narrative order: setup → reveal → conclusion
Add context with labels or icons
Use dashboards as storytelling tools
Example:
Netflix “viewership by genre” story — use of colour, motion, and
narrative text.
Ethical Visualization
Always label axes correctly.
Avoid selective scaling.
Show uncertainty or sample size when relevant.
Never cherry-pick data to support bias.
Respect data privacy (mask sensitive info).
04
Practical
Application &
Integration
Case Study: Real world Dashboard
Scenario:
You are asked to design a “Sales Performance Dashboard” for a retail chain.
Steps:
[Link] audience → CEO (needs summary), Managers (need trends).
[Link] key metrics → Sales, Profit Margin, Units Sold.
[Link] chart types → Line for trends, Bar for regional comparison, Pie for
product share.
[Link] colour logic → Positive = green, Negative = red.
[Link] layout → Top summary cards, middle charts, bottom filters.
Common Mistakes and Fixes
Mistake Impact Fix
Too many colours Confusing Limit to palette
3D charts Distortion Use flat charts
Missing labels Misleading Label clearly
Clutter Hard to read Simplify
Truncated axis Exaggerated change Start from zero
Wrong chart type Miscommunication Match chart to data/task
Practical Exercise
Dataset: Students receive sample CSV (e.g., “Sales by Region and Product”).
Task:
Identify question → “Which product performs best by region?”
Choose chart → grouped bar chart or heatmap.
Apply colour rules.
Annotate main insight.
Tools (optional): Excel, Google Sheets, Tableau Public, or Power BI.
Output:
Each student presents one visual with explanation:
What is your insight?
Why did you choose this design?
Review & Wrap Up
Recap Key Lessons:
Know your data and audience.
Choose appropriate visual encoding (position, colour, size).
Follow design principles (clarity, simplicity, ethics).
Tell a story with your visuals.
Practice — design, test, and iterate.
Further Learning Resources:
Storytelling with Data — Cole Nussbaumer Knaflic
The Visual Display of Quantitative Information — Edward Tufte
Tableau Public Gallery (explore real dashboards)
Google Data Studio tutorials
Thanks