0% found this document useful (0 votes)
6 views20 pages

Data Visualization Project Guide

The document outlines a comprehensive guide for a data visualization project based on Kieran Healy's practical approach. It covers project planning, data collection and preparation, visualization development, and project delivery, emphasizing the importance of starting with a specific question and documenting the entire process. Key elements include defining objectives, selecting appropriate visualization techniques, and ensuring effective communication of insights through critiques and presentations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views20 pages

Data Visualization Project Guide

The document outlines a comprehensive guide for a data visualization project based on Kieran Healy's practical approach. It covers project planning, data collection and preparation, visualization development, and project delivery, emphasizing the importance of starting with a specific question and documenting the entire process. Key elements include defining objectives, selecting appropriate visualization techniques, and ensuring effective communication of insights through critiques and presentations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT V: DATA VISUALIZATION PROJECT

Detailed Notes with Healy's Practical Approach

Based on "Data Visualization: A Practical Introduction" by Kieran Healy

5.1 PROJECT PLANNING

1. Identifying a Problem Statement

Healy's First Rule: "Start with a question, not data. Visualization should answer
something."

How to Find Good Problems:

Personal Curiosity: "Why does my commute vary so much?"

Social Issues: "How equitable is public school funding in my state?"

Business Questions: "Which products are often bought together?"

Academic Exploration: "How does air quality correlate with hospital admissions?"

Example Problem Statements:

❌ Bad: "I want to visualize weather data" (Too vague)

✅ Good: "How has the frequency of extreme heat days changed in Delhi over 30
years, and which neighborhoods are most vulnerable?"

✅ Better: "Can we identify 'food deserts' in Bangalore by mapping grocery store


locations against income and public transport access?"
Healy's Tip: "Your problem should be specific enough to finish in weeks, but
interesting enough to keep you motivated."

2. Defining Objectives and Deliverables

Objectives = What you want to learn/achieve

Deliverables = What you'll produce

Example Project: "Air Pollution & Health in Mumbai"

Objectives Deliverables

1. Show PM2.5 trends over 5 years 1. Interactive time series chart

2. Compare pollution across wards 2. Choropleth map of ward-level pollution

3. Correlate pollution with respiratory ER visits 3. Scatter plot with trend line

4. Identify worst days & their causes 4. Calendar heatmap + weather overlay

5. Suggest mitigation strategies 5. Final report with 3 policy recommendations

Healy's Deliverable Framework:

Exploratory Notebook (for yourself - messy code, dead ends)

Polished Visualizations (3-5 clean, annotated charts)

Interactive Dashboard (if appropriate)

Written Analysis (1500 words connecting visuals to insights)

Presentation (10 slides, 15 minutes)

5.2 DATA COLLECTION AND PREPARATION


1. Collecting Data
Healy's Data Sources Pyramid:

text

Tier 1: Official Statistics

(Census, Government portals - most reliable)

↗ ↗

Tier 2: Academic Datasets Tier 2: API Feeds

(ICPSR, Kaggle, UCI) (Twitter, Weather, Transport)


↗ ↗

Tier 3: Web Scraping

(Last resort - ethical & legal checks needed)

Indian Context Sources:

[Link] (Government open data)

MOSPI (Ministry of Statistics)

NCRB (Crime statistics)

OpenStreetMap (Spatial data)

Indian Census (Demographic data)

Healy's Warning: "Spend 1 hour researching existing datasets before considering


scraping. Someone has probably cleaned it already."

2. Cleaning and Preparing Data

The 80/20 Rule of Data Visualization: "80% of your time will be spent cleaning data,
20% making beautiful charts."
Common Issues & Fixes:

A. Missing Values

python

# Healy's approach: Document EVERY decision

df['income'].isnull().sum() # Find missing

# Options:

# 1. Remove if few: [Link](subset=['income'])


# 2. Impute with median: df['income'].fillna(df['income'].median())

# 3. Flag as unknown: df['income'].fillna('Unknown')

# ↓ Document in code:

# "Income: 45 missing values (2.1%) imputed with median (₹28,500)"

B. Inconsistent Categories

Before Cleaning:

text

City: ["Mumbai", "mumbai", "Mumbai ", "Bombay", "MUM"]

After Cleaning:

python

# Create mapping dictionary

city_map = {

'mumbai': 'Mumbai',
'mumbai ': 'Mumbai',

'bombay': 'Mumbai',

'mum': 'Mumbai'

df['city_clean'] = df['city'].[Link]().[Link]().map(city_map)
C. Date/Time Issues
Critical for time series:

python

# Parse dates consistently

df['date'] = pd.to_datetime(df['timestamp'],

format='%d/%m/%Y', # Indian format

errors='coerce') # Put problematic dates as NaT

df['year'] = df['date'].[Link]
df['month'] = df['date'].dt.month_name() # "January" not "01"

df['day_of_week'] = df['date'].dt.day_name()

D. Outlier Detection

Healy's Method: "Visualize first, then decide."

python

# Step 1: Box plot to see outliers

import seaborn as sns

[Link](x=df['house_price'])

# Step 2: Examine extreme values

df[df['house_price'] > df['house_price'].quantile(0.99)].head()

# Step 3: Decide action

# Option A: Cap at 99th percentile (if data entry errors)


# Option B: Keep but use log scale in visualization

# Option C: Create separate "luxury" category

Data Cleaning Checklist:

Consistent date formats


Standardized categories (trim whitespace, same case)

Handled missing values (document method)

Removed exact duplicates

Identified and addressed outliers

Normalized where needed (per capita, per area)

Created metadata file explaining each column

5.3 DATA VISUALIZATION DEVELOPMENT

1. Visualization Techniques Selection

Healy's Matching Principle: "Let your data type choose the chart."

Data Type Question Chart Recommendation

Comparison Compare categories Bar chart (horizontal if long names)

Distribution Show spread Histogram, Box plot, Violin plot

Relationship Correlation Scatter plot (add trend line)

Composition Part-to-whole Stacked bar, Pie (only if ≤5 categories)

Change Over Time Trends Line chart (multiple lines if <5 series)

Geospatial Location patterns Choropleth, Point map


Hierarchical Tree structure Treemap, Sunburst

Network Connections Node-link diagram (force-directed)

Example Workflow:

text
Project: "Electricity Consumption Patterns"
Step 1 → Temporal: Line chart of usage by hour

Step 2 → Comparison: Bar chart of monthly bills

Step 3 → Distribution: Histogram of daily usage

Step 4 → Correlation: Scatter plot (temp vs usage)

Step 5 → Geospatial: Map of consumption by district

2. Designing Effective Visualizations

Healy's Design Hierarchy:

Level 1: Basic Clarity

Labels: Every axis labeled with units

Title: Descriptive, not just "Chart 1"

Colors: Colorblind-friendly (avoid red-green)

Legends: Only if needed (direct labeling often better)

Before & After Example:

text

BEFORE: AFTER:

📊 Sales Data 📊 Monthly Sales (2023)

| |

| ███ | Jan │████████████ 12.4L

| ████ | Feb │██████████████ 15.1L

| ██ | Mar │██████████ 9.8L

|_____ | Apr │███████████████ 16.3L

Q1 Q2 | (with consistent spacing,


| aligned labels, K/L format)
Level 2: Enhanced Readability

Annotations: Highlight important points

Reference Lines: Averages, targets, thresholds

Small Multiples: Instead of one cluttered chart

Healy's Annotation Example:

python

# Highlight COVID peak in time series

[Link]('Lockdown Begins',

xy=('2020-03-25', 5000),

xytext=('2020-02-15', 15000),

arrowprops=dict(arrowstyle='->'),

fontsize=10)

Level 3: Narrative Flow

Order: Chronological, alphabetical, by value

Grouping: Related charts together

Progression: Simple → complex

3. Developing Interactive Visualizations

When to Add Interactivity (Healy's Test):

Multiple dimensions to explore

Different audiences with different questions


Too much data for one static view

Natural "what-if" questions arise

Build Progression:

text
Stage 1: Static Prototype

↓ (Get feedback)

Stage 2: Add Tooltips (easiest interactivity)

↓ (Test usability)

Stage 3: Add Filter (dropdown/slider)

↓ (Refine based on use)

Stage 4: Linked Views (if needed)

Example Interactive Dashboard Structure:

python

# Using Plotly Dash

[Link] = [Link]([

# 1. Controls Panel

[Link]([

[Link](id='city-select', options=cities),
[Link](id='year-slider', min=2010, max=2023),

[Link](id='metric-select', options=metrics)

], style={'width': '25%', 'display': 'inline-block'}),

# 2. Visualization Area
[Link]([
[Link](id='time-series-chart'),

[Link](id='map-view'),

[Link](id='comparison-bar')

], style={'width': '75%', 'display': 'inline-block'})

])

# Callback connects controls to charts

@[Link](
Output('time-series-chart', 'figure'),

[Input('city-select', 'value'),

Input('year-slider', 'value')]

Healy's Interactive Elements Guide:

Element Best For Example

Hover Tooltips Details without clutter Showing exact values on line chart

Click to Filter Drilling down Click state to see district data

Slider Time series exploration Animate population growth 1950-2020

Dropdown Category selection Choose between GDP, HDI, Life Expectancy

Brush/Select Subset highlighting Drag rectangle on scatter plot

Play Button Animation over time Daily COVID cases progression

5.4 PROJECT DELIVERY

1. Critiquing Visualization
Healy's Critique Framework (PPP Method):

Praise → Probe → Propose

Example Critique:

text
Student's Chart: Bar chart of state literacy rates

PRAISE: "Good choice of bar chart for comparison.

Clear title and axis labels."

PROBE: "Why alphabetical order instead of sorted by value?

Would a horizontal bar chart work better with long state names?

Have you considered adding the national average as a reference line?"

PROPOSE: "1. Sort descending to highlight top/bottom states

2. Use horizontal bars for readability

3. Add dashed line at national average (74%)

4. Annotate the highest and lowest states"

Self-Critique Checklist:

Can I understand it in 30 seconds without explanation?

Does the chart type match the data and question?

Are colors meaningful (not just decorative)?

Is all text readable (size, contrast)?

Are there any misleading aspects (truncated axis, wrong scale)?

What's the main takeaway? Is it obvious?

2. Presenting Data Visualization


Healy's Presentation Structure:
The 5-Slide Framework:

The Problem (1 slide)

What question are we answering?

Why does it matter?

The Data (1 slide)

Where from? How clean?

Sample size, time period

Show raw data glimpse

Key Findings (2-3 slides)

ONE chart per insight

"As you can see..." + clear takeaway

Build narrative (simple → complex)

Implications & Next Steps (1 slide)

So what? Who cares?

Recommendations
Limitations & future work

Presentation Tips:

Talk to the chart: Point at elements as you explain

Progressive reveal: Build complex charts piece by piece

Anticipate questions: "You might wonder why X... here's why"

Practice timing: 2 minutes per chart maximum

Example Presentation Script:

text

"Slide 3 shows Delhi's air quality from 2018-2023.

[POINT] Notice the seasonal pattern - peaks every November.

[POINT] This peak in 2020 was lower due to lockdowns.

[POINT] The red line shows the safe limit - we're above it 80% of days.

The takeaway: Despite some improvement, Delhi's air remains dangerously polluted
most of the year."

3. Final Project Delivery

Healy's Complete Submission Package:

A. Project Repository Structure:

text

project_title/

├── data/

│ ├── raw/ # Original, untouched data

│ ├── processed/ # Cleaned versions

│ └── [Link] # Data dictionary

├── code/

│ ├── 01_data_collection.ipynb

│ ├── 02_data_cleaning.ipynb

│ ├── 03_exploratory_analysis.ipynb

│ ├── 04_visualization.ipynb

│ └── [Link] # Python packages

├── outputs/

│ ├── static_charts/ # PNG/PDF versions

│ ├── interactive/ # HTML dashboards

│ └── summary_statistics.csv

├── documentation/

│ ├── project_report.pdf # 5-10 page writeup

│ ├── presentation_slides.pdf

│ └── [Link] # How to run your code

└── deliverables/

├── executive_summary.pdf # 1-page overview

├── technical_appendices.pdf

└── video_demo.mp4 # 3-min screen recording

B. Project Report Template (Healy Style):


markdown
# TITLE: [Clear, Descriptive]

## 1. Introduction

- Problem statement

- Why it matters

- Research questions

## 2. Data
- Sources (with links)

- Collection methods

- Cleaning steps (be specific!)

- Limitations (missing data, biases)

## 3. Methodology

- Tools used (Python/R libraries)

- Why chosen visualizations?

- Statistical methods (if any)

## 4. Results & Visualizations

**Figure 1:** [Title]

- Description of what shows

- Key insight 1

- Key insight 2

**Figure 2:** [Title]

...

## 5. Discussion
- What do findings mean?
- Surprises? Expected results?

- Implications for stakeholders

## 6. Conclusion

- Summary of main findings

- Recommendations

- Future work

## References

- Data sources

- Code libraries

- Inspiration/references

C. Peer Review Exchange:

Healy's Feedback Form:

text

Project: __________________

Reviewer: _________________

1. CLARITY (1-5): Can you understand the main point quickly?

Comments: _________________________________

2. DESIGN (1-5): Appropriate chart types? Good use of color?


Comments: _________________________________

3. INTERACTIVITY (if applicable): Useful? Intuitive?

Comments: _________________________________

4. INSIGHT (1-5): What did you learn? Surprising findings?


Comments: _________________________________

5. ONE thing to improve: ______________________

6. ONE thing done well: _______________________

HEALY'S PROJECT PHILOSOPHY

1. The "Show Your Work" Principle

"Document your failures. That scatter plot that showed no correlation? Include it in
an appendix with 'We tried X, it didn't work because Y.' This is honest science."

2. The "So What?" Test

After each visualization, ask:

"So what?" → What does this mean?

"Who cares?" → Who benefits from knowing this?

"Now what?" → What action should be taken?

3. The Iterative Process

text

┌─────────────┐

│ Plan │

│ (5.1) │

└──────┬──────┘


┌─────────────┐

│ Collect & │ ←────┐

│ Clean (5.2)│ │

└──────┬──────┘ │
↓ │

┌─────────────┐ │

│ Visualize │ │

│ (5.3) │ │

└──────┬──────┘ │

↓ │

┌─────────────┐ │

│ Critique & │ │

│ Present (5.4) │

└──────┬──────┘ │

↓ │

"Good enough?" ─────┘

Yes → Deliver

No → Refine

PROJECT TIMELINE (7-Week Schedule)

Week 1-2: Problem & Data

Day 1-3: Brainstorm problems, research data availability

Day 4-7: Finalize question, gather data

Day 8-14: Clean data, document process

Week 3-4: Exploration

Day 15-21: Create 10+ exploratory charts

Day 22-28: Identify 3-5 key insights worth sharing


Week 5-6: Refinement

Day 29-35: Polish best charts, add interactivity

Day 36-42: Write report, create presentation

Week 7: Delivery

Day 43-45: Peer review exchange

Day 46-47: Incorporate feedback

Day 48-49: Final polish

Day 50: Submit complete package

COMMON PITFALLS & HEALY'S SOLUTIONS

Pitfall Solution

Too ambitious scope "Start with one question. Answer it well."

Beautiful but empty charts "Substance before style. What does it TELL us?"

Interactive for sake of interactive "Will a static version work 80% as well?"

Hiding messy data work "Include cleaning script. Transparency builds trust."
No story/narrative "Connect charts with 'and therefore...'"

Ignoring audience "Technical audience? Show code. Executives? Show bottom


line."

Final Healy Quote to Remember:

"A data visualization project isn't done when you've made the charts. It's done when
someone looks at your work and says, 'Oh! Now I understand.'"
UNIT V CHECKLIST FOR SUCCESS:

Problem statement is specific and answerable

Data is cleaned and documented

Chosen visualizations match data types and questions

Charts are clear without explanation

Interactivity (if used) serves a purpose

Report tells a story with beginning-middle-end

Presentation highlights key insights

Code is reproducible (others can run it)

Limitations are acknowledged

You can explain "So what?" in one sentence

Based on the practical, principled approach of Kieran Healy's "Data Visualization: A


Practical Introduction" - focusing on clear communication, honest methodology, and
purposeful design throughout the project lifecycle.

You might also like