B .T E C H · C S E / I S / I T — S E M E S T E R V | I N T R O D U C T I O N T O D ATA S C I E N C E Chapter 4 Data Visualization and Real-World Analytics Visualization, Dashboards, Storytelling and Case Studies C H A P T E R R O A D M A P What We'll Cover 4.1–4.2 Foundations Why visualization matters & principles of effective design 4.3–4.8 The Core Charts Selection logic, histograms, scatter, line, pie, box plots 4.9–4.10 Communication Dashboards and storytelling with data 4.11 Tooling Tableau, Power BI and the Python visualization ecosystem 4.12 Case Studies Healthcare, finance, social media, agriculture, cybersecurity Chapter 4 · Data Visualization and Real-World Analytics 2 C H A P T E R I N T R O D U C T I O N Learning Outcomes Upon completing this chapter, students will be able to: 1 Explain the purpose of visualization in exploratory analysis and decision- making 2 Apply clarity, accuracy, proportionality and simplicity in visual design 3 Select suitable charts for comparison, distribution, relationship, trend and composition 4 Construct and interpret histograms, scatter plots, line charts, pie charts and box plots 5 Design effective operational, analytical and executive dashboards 6 Build a coherent data story connecting evidence, insight and action 7 Compare Tableau, Power BI and major Python visualization libraries 8 Analyse real-world visualization needs across five industry domains Chapter 4 · Data Visualization and Real-World Analytics 3 K E Y C O N C E P T S Glossary of Key Terms Visual Encoding Mapping data values to position, length, angle, size, colour or shape. Data Storytelling Communicating insights using narrative, visuals and context together. Dashboard A consolidated interface monitoring multiple related metrics and KPIs. KPI A measurable value used to track progress toward an objective. Interactive Visualization Supports filtering, zooming, drill-down and highlighting. Chart A structured graphical display representing one or more variables. Chapter 4 · Data Visualization and Real-World Analytics 4 4 . 1 I N T R O D U C T I O N T O D ATA V I S U A L I Z AT I O N Why Visualization Matters 1 Pattern Detection Reveals trends, seasonality, clusters and gaps hidden in raw tables. 2 Comparison Makes differences between categories, products or regions easy to judge. 3 Distribution Shows how values are spread — symmetric, skewed or affected by outliers. 4 Relationships Lets analysts explore whether two or more variables move together. 5 Communication Converts technical findings into a form non-technical audiences understand. 6 Decision Support Focuses attention on KPIs, exceptions and opportunities needing action. Key Insight: A visualization is effective when it answers a question clearly — with the least possible ambiguity. Chapter 4 · Data Visualization and Real-World Analytics 5 4 . 1 . 2 T W O M O D E S O F V I S U A L I Z AT I O N Exploratory vs Explanatory Exploratory Visualization PURPOSE Discover patterns, questions and anomalies AUDIENCE Analysts, data scientists, technical teams STYLE Many views, quick iterations, dense detail KEY QUESTION What is happening? What else to investigate? EXAMPLES EDA notebooks, interactive filtering, diagnostics Explanatory Visualization PURPOSE Communicate a selected finding or message AUDIENCE Decision-makers, clients or wider team STYLE Focused view, reduced clutter, annotations KEY QUESTION What should the audience understand or do? EXAMPLES Management reports, presentations, briefings Chapter 4 · Data Visualization and Real-World Analytics 6 4 . 2 P R I N C I P L E S O F E F F E C T I V E V I S U A L I Z AT I O N Design Principles That Matter Start with the Question Clarify the decision before selecting a chart Choose the Right Encoding Position and length beat area, angle or volume Preserve Proportionality Axes and scales must represent differences honestly Reduce Clutter Remove gridlines, 3-D effects and redundant labels Use Colour Purposefully Colour should group, highlight or encode meaning Label Clearly Titles, units, legends should need no guessing Maintain Consistency Same units, ordering and conventions across charts Show Uncertainty Use confidence intervals or error bars when relevant Chapter 4 · Data Visualization and Real-World Analytics 7 4 . 2 . 1 V I S U A L E N C O D I N G Perceptual Accuracy Ranking Viewers judge these encodings with decreasing accuracy — choose the strongest one your data allows. Position Scatter / dot plot Length Bar chart Slope / Direction Line chart Area / Size Bubble chart, treemap Angle Pie chart Colour Intensity Heatmap Design Rule: The most attractive chart is not necessarily the most accurate — clarity beats novelty. Chapter 4 · Data Visualization and Real-World Analytics 8 4 . 3 T Y P E S O F C H A R T S A N D G R A P H S Chart Selection Matrix Analytical Task Recommended Charts Typical Business Question Comparison Bar, column, dot plot Which product or region performs best? Distribution Histogram, box plot, density How are delivery times distributed? Relationship Scatter, bubble, heatmap Does ad spend relate to sales? Trend / Time Line, area, sparkline How has revenue changed monthly? Composition Pie, donut, stacked bar, treemap What share comes from each category? Ranking Sorted bar, lollipop Which branches are top performers? Geography Symbol map, choropleth Where are incidents concentrated? Chapter 4 · Data Visualization and Real-World Analytics 9 4 . 4 H I S T O G R A M Histogram: Distribution at a Glance Divides a continuous variable's range into bins and counts observations in each — bars are adjacent because order is meaningful. • Centre: Typical / average level • Spread: Variability of the process • Shape: Symmetric, skewed or uniform • Modes & Gaps: Subgroups or missing ranges Do Not Confuse: A histogram answers "how are values distributed?" A bar chart answers "how do separate categories compare?" 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 25 30 Distribution of Examination Scores Score Bin Frequency Chapter 4 · Data Visualization and Real-World Analytics 10 4 . 5 S C AT T E R P L O T S Scatter Plots: Studying Relationships Each point plots two quantitative variables — ideal for spotting association, clusters, nonlinearity and outliers. • Positive Association Points rise left to right • Negative Association Points fall left to right • Clusters Distinct groups = possible segments • Outliers Isolated points needing investigation Correlation does not imply causation. A third variable, reversed influence, or coincidence may explain the pattern. 0 2 4 6 8 10 12 14 16 18 0 10 20 30 40 50 60 70 80 90 100 Advertising Spend vs Sales Advertising Spend ( 000s) ₹ Sales ( 000s) ₹ Chapter 4 · Data Visualization and Real-World Analytics 11 4 . 6 L I N E C H A R T S Line Charts: Trend Over Time Connects observations in a meaningful order — almost always time — to show trend, seasonality and turning points. Use time in chronological order Keep consistent time intervals Highlight the most important series Annotate major events Avoid too many overlapping lines Use a zero baseline for magnitude comparisons Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 0 10 20 30 40 50 60 70 80 Monthly Revenue Trend Chapter 4 · Data Visualization and Real-World Analytics 12 4 . 7 P I E C H A R T S Pie Charts: Part-to-Whole, Used Sparingly USE WHEN Only a few categories ✓ Values sum to a meaningful 100% ✓ One or two slices clearly dominate ✓ AVOID WHEN Many categories or tiny slices ✕ Values don't sum to a real whole ✕ Several slices have similar size ✕ 38% 26% 18% 12% 6% Revenue Share by Product Product A Product B Product C Product D Other Best Practice: a sorted bar chart usually beats a pie chart for precise comparison. Chapter 4 · Data Visualization and Real-World Analytics 13 4 . 8 B O X P L O T S Box Plots: Five-Number Summary Summarises a distribution using minimum, Q1, median, Q3 and maximum — ideal for comparing spread across groups. 0 2 4 6 8 Region A Region B Region C Delivery Time (hours) IQR = Q3 − Q1. Points beyond Q1 − 1.5×IQR or Q3 + 1.5×IQR are flagged as potential outliers for investigation. Chapter 4 · Data Visualization and Real-World Analytics 14 4 . 9 D A S H B O A R D S Dashboards: Monitoring at a Glance Operational Cadence: Real-time to hourly Network ops, bed status Analytical Cadence: Daily to monthly Customer behaviour, cohorts Strategic Cadence: Weekly to quarterly Revenue growth, market share Tactical Cadence: Daily to weekly Campaign & branch performance Design Principles • Identify primary users and their decisions • Place key KPIs and exceptions first • Limit charts to what's quickly interpretable • Use consistent scales and units Every Component Should Answer: What is the current state? What has changed? What requires attention or action? Chapter 4 · Data Visualization and Real-World Analytics 15 4 . 1 0 S T O R Y T E L L I N G W I T H D ATA The Data Storytelling Arc 1 Context Business situation & baseline 2 Tension What changed or underperformed 3 Evidence The visual/metric proving the claim 4 Explanation Plausible drivers behind the pattern 5 Recommendation The action the organisation should take Storytelling Techniques • Use a message-oriented title, not a generic label • De-emphasise background, highlight the key series • Annotate events directly on the chart • End with a measurable recommendation Chapter 4 · Data Visualization and Real-World Analytics 16 4 . 1 1 V I S U A L I Z AT I O N T O O L S Tableau · Power BI · Python Dimension Tableau Power BI Python Primary Audience Analysts & BI developers Business analysts & enterprise BI Data scientists & engineers Learning Style Visual, drag-and-drop Visual + DAX & modelling Programming-based Reproducibility Moderate Moderate to high High (scripts, version control) Best Fit Fast visual analytics Enterprise / MS-centric BI Custom analytics, ML workflows Python Library Landscape Matplotlib Flexible, publication-quality static charts Seaborn Concise statistical & distribution plots Plotly Interactive, web-ready, dashboard-friendly Chapter 4 · Data Visualization and Real-World Analytics 17 4 . 1 2 R E A L - W O R L D C A S E S T U D I E S Five Domains, One Common Pattern Domain data → chart selection → insight → decision 1 Healthcare Readmissions & bed capacity 2 Finance Fraud & portfolio risk 3 Social Media Engagement & sentiment 4 Agriculture Crop yield & precision farming 5 Cybersecurity SOC anomaly monitoring Chapter 4 · Data Visualization and Real-World Analytics 18 4 . 1 2 . 1 H E A LT H C A R E C A S E S T U D Y Hospital Readmission & Capacity Question Visual Insight / Decision Readmission rate by diagnosis Sorted bar Target discharge planning for high-risk groups Length-of-stay distribution Histogram / box plot Detect long-stay tails, compare wards Daily bed occupancy Line chart + target band Recognize capacity pressure early Ward performance summary Dashboard Combine occupancy, readmissions, LOS Business Application: Patient data is sensitive — visualizations must apply privacy controls, role-based access and careful aggregation. Chapter 4 · Data Visualization and Real-World Analytics 19 4 . 1 2 . 2 F I N A N C I A L A N A LY T I C S C A S E S T U D Y Fraud, Risk & Portfolio Monitoring Question Visual Insight / Decision Where are fraud alerts concentrated? Heatmap / geo map Prioritize investigation resources Are transaction amounts unusual? Histogram / box plot Separate normal variation from extremes How is delinquency changing? Line chart by segment Detect portfolio deterioration early What needs immediate review? Risk dashboard + alerts Direct analysts to high-severity accounts Business Application: A high alert count doesn't equal high fraud loss — dashboards must pair volume with confirmed-loss metrics and false-positive rates. Chapter 4 · Data Visualization and Real-World Analytics 20