Skip to content

🏆 Tiêu chuẩn — Code Review, Dashboard QA & Peer Review

Các tiêu chuẩn giúp bạn review code đúng cách, QA dashboard trước khi present, và peer review hiệu quả — 3 quality gates cho capstone project.

Tổng quan tiêu chuẩn buổi 19

Buổi 19 chuyển từ Code (analysis) → Dashboard → Executive Summary. Mỗi giai đoạn cần quality control riêng:

  1. Code Review Standards — Review Jupyter Notebook: structure, reproducibility, documentation
  2. Dashboard QA Checklist — Kiểm tra dashboard trước khi publish: accuracy, design, functionality
  3. Peer Review Framework — Quy trình review đồng nghiệp: structured feedback, scoring, iteration

📋 Danh sách tiêu chuẩn liên quan

#Tiêu chuẩnNguồn / Tham khảoÁp dụng cho Buổi 19
1Code Review StandardsGoogle Engineering Practices / PEP 8 / Jupyter Best PracticesReview Jupyter Notebook cho analysis quality
2Dashboard QA ChecklistIBCS (International Business Communication Standards) / Stephen FewQA dashboard trước khi present
3Peer Review FrameworkAgile Code Review / Design Critique guidelinesStructured peer review process

1️⃣ Code Review Standards — Jupyter Notebook

Giới thiệu

Code Review — quy trình kiểm tra code của người khác (hoặc chính mình) để đảm bảo chất lượng, reproducibility, và readability. Trong DA, code review quan trọng vì: sai code = sai insight = sai quyết định business.

Theo Google Engineering Practices, code review kiểm tra 4 khía cạnh:

Khía cạnhCâu hỏiVí dụ trong DA
CorrectnessCode có chạy đúng không?Merge data đúng key? Filter đúng condition?
ClarityNgười khác đọc hiểu không?Variable names, comments, section headers
ConsistencyStyle nhất quán không?PEP 8, naming convention, formatting
CompletenessCó thiếu gì không?Edge cases, null handling, documentation

Notebook Structure Checklist

✅ STRUCTURE
├── Title & Author (Markdown cell đầu tiên)
├── Table of Contents
├── 1. Setup & Import Libraries
│   ├── All imports ở đầu file
│   └── Version info (pandas, sklearn, etc.)
├── 2. Load Data
│   ├── File path rõ ràng
│   └── df.shape, df.head(), df.info()
├── 3. Data Cleaning
│   ├── Missing values handled
│   ├── Duplicates checked
│   └── Data types corrected
├── 4. Analysis Sections (per business question)
│   ├── Markdown header: Question
│   ├── Code cells: Analysis
│   ├── Visualization
│   └── Finding Box: What → So What → Now What
├── 5. Summary of Findings
└── 6. References / Data Sources

Code Quality Rules

RuleBad ❌Good ✅
Variable namesdf2, x, tempdf_cleaned, churn_rate, monthly_revenue
CommentsKhông comment# Filter churned users in last 30 days
Magic numbersdf[df['age'] > 25]MIN_AGE = 25; df[df['age'] > MIN_AGE]
ImportsImport giữa notebookTất cả imports ở cell đầu tiên
OutputPrint tất cả mọi thứPrint summary, hide intermediate steps
ChartsKhông title, không labelTitle, axis labels, legend, source
Cell orderCells chạy lộn xộn, skip cellsRun All → no errors, sequential

Reproducibility Checklist

REPRODUCIBILITY — "Người khác chạy lại được không?"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Random seed set: np.random.seed(42)
✅ File paths relative, not absolute: 'data/file.csv' (not 'C:\Users\...')
✅ Dependencies listed: requirements.txt hoặc comment
✅ Kernel → Restart & Run All → no errors
✅ Data source documented: file name, date, origin
✅ No hardcoded values that change: use variables
✅ Output cells saved: charts visible without re-running

Self-Review Template

Trước khi submit notebook, tự check:

#CheckPass?
1Markdown cells giải thích mỗi section?
2Variable names descriptive?
3No unused code cells?
4All charts have title + labels?
5Findings documented (What/So What/Now What)?
6Kernel → Restart & Run All → no errors?
7No sensitive data (passwords, API keys)?
8Summary section at the end?

2️⃣ Dashboard QA Checklist — Trước khi publish

Giới thiệu

Dashboard QA — quy trình kiểm tra chất lượng dashboard trước khi gửi cho stakeholders. Theo IBCS (International Business Communication Standards), dashboard cần đạt 3 tiêu chí: accurate, clear, và actionable.

Dưới đây là checklist QA chia theo 5 categories:

Data Accuracy

DATA ACCURACY — "Số có đúng không?"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Cross-check KPI cards với source data
   → Total Revenue trên dashboard = SUM(Revenue) trong dataset?
✅ Filters: khi filter 1 segment → tất cả charts update đúng
✅ Grand total = sum of parts (sanity check)
✅ Date range correct — dashboard shows đúng period
✅ No double counting — JOIN logic đúng
✅ Null/blank handling — nulls không bị ẩn hoặc tính sai
✅ Year-over-Year calculation — compare đúng period

Visual Design

VISUAL DESIGN — "Nhìn có dễ hiểu không?"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Visual hierarchy: KPI cards → Charts → Details (top → bottom)
✅ Font sizes: Title (18-20pt) > Chart title (12-14pt) > Labels (10-12pt)
✅ Color palette: max 5 colors, consistent across pages
✅ Same entity = same color across all charts
✅ White space: charts not cramped, room to breathe
✅ Alignment: charts aligned on grid
✅ Chart types appropriate:
   - Trend → Line chart
   - Comparison → Bar chart
   - Composition → Stacked bar / Donut
   - Correlation → Scatter plot
   - Distribution → Histogram / Box plot

Chart-Specific QA

Chart ElementChecklist
TitleDescriptive, includes time period: "Revenue by Product — FY2025"
AxesLabeled with units (VND, %, count). Y-axis starts at 0 (bar charts)
LegendPositioned consistently (top-right hoặc bottom). Readable
Data labelsOnly on key data points — not every bar
GridlinesLight/subtle or removed. Not distracting
TooltipsShow useful context on hover: value, %, period
Sort orderMeaningful: descending by value, chronological, alphabetical
Number formatConsistent: 1.2M or 1,200,000 — pick one style

Functionality & Interactivity

FUNCTIONALITY — "Interactive features hoạt động đúng?"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Slicer/Filter: Date, Region, Category — filter across all visuals
✅ Cross-filtering: click on bar → other charts update correctly
✅ Drill-down: Year → Quarter → Month (nếu applicable)
✅ Reset: có button/option reset về default view
✅ Navigation: page tabs clear, named descriptively
✅ Mobile view: dashboard readable on tablet (nếu deploy online)
✅ Performance: dashboard loads trong < 5 giây

Content & Insight

CONTENT — "Dashboard này có GIÁ TRỊ không?"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Mỗi page answer ít nhất 1 business question
✅ KPI cards có context: vs target, vs previous period, trend arrow
✅ At least 1 annotation/callout highlight key insight
✅ Recommendations page/section — không chỉ show data
✅ Dashboard title + subtitle + date range + data source
✅ "So what?" test — cho người khác xem 10 giây, họ biết insight chính?

QA Scoring Matrix

CategoryWeightScore (1-5)Weighted
Data Accuracy30%
Visual Design25%
Chart Quality20%
Functionality15%
Content & Insight10%
Total100%/5.0

Pass threshold: ≥ 3.5/5.0


3️⃣ Peer Review Framework — Review đồng nghiệp hiệu quả

Giới thiệu

Peer Review — quy trình để đồng nghiệp (hoặc bạn cùng lớp) review output của bạn, đưa feedback, và bạn cải thiện. Peer review không phải "chấm điểm" — mà là collaborative quality improvement.

Theo Agile methodology, peer review hiệu quả cần:

Nguyên tắcMô tả
Be specific"Chart 2 thiếu y-axis label" thay vì "charts chưa tốt"
Be kindFeedback về work, không phải về person
Be constructiveMỗi criticism đi kèm 1 suggestion
Be timelyReview SỚM — feedback ngày 1 quý hơn feedback ngày cuối

Peer Review Process

mermaid
flowchart LR
    A["1️⃣ Prepare<br/>Builder self-review<br/>trước peer session"] --> B["2️⃣ Present<br/>3 min walk-through<br/>no defending"]
    B --> C["3️⃣ Review<br/>Reviewers fill form<br/>5 min"]
    C --> D["4️⃣ Discuss<br/>Clarify feedback<br/>5 min"]
    D --> E["5️⃣ Iterate<br/>Fix top 3 issues<br/>15-30 min"]

Review Roles

RoleResponsibilityDoDon't
BuilderPresent work, listen to feedbackTake notes, ask clarifying questionsDefend every choice, argue
ReviewerGive structured feedbackUse template, be specific + constructiveBe vague, criticize person
FacilitatorKeep time, ensure balanced discussionEnsure all reviewers speakLet 1 person dominate

Peer Review Form

┌──────────────────────────────────────────────────────────────┐
│  📋 PEER REVIEW FORM                                          │
│                                                               │
│  Builder: ________________  Reviewer: ________________       │
│  Date: ________________    Project: ________________          │
│                                                               │
│  ━━━━━━━━━ NOTEBOOK ━━━━━━━━━                                │
│  [ ] Code runs without errors?              (1-5): ___       │
│  [ ] Structure clear (sections, headers)?    (1-5): ___       │
│  [ ] Findings documented?                    (1-5): ___       │
│  Comment: _______________________________________________     │
│                                                               │
│  ━━━━━━━━━ DASHBOARD ━━━━━━━━━                               │
│  [ ] Answers business question?              (1-5): ___       │
│  [ ] Visual hierarchy clear?                 (1-5): ___       │
│  [ ] Data appears accurate?                  (1-5): ___       │
│  [ ] Interactivity works?                    (1-5): ___       │
│  Comment: _______________________________________________     │
│                                                               │
│  ━━━━━━━━━ EXECUTIVE SUMMARY ━━━━━━━━━                       │
│  [ ] 5 findings clear?                       (1-5): ___       │
│  [ ] What/So What/Now What structure?        (1-5): ___       │
│  [ ] Recommendations actionable?             (1-5): ___       │
│  Comment: _______________________________________________     │
│                                                               │
│  ━━━━━━━━━ OVERALL ━━━━━━━━━                                 │
│  🌟 What works well:                                          │
│  ___________________________________________________________  │
│  ___________________________________________________________  │
│                                                               │
│  🔧 Top 3 improvements:                                      │
│  1. ________________________________________________________  │
│  2. ________________________________________________________  │
│  3. ________________________________________________________  │
│                                                               │
│  Overall Score (1-5): ___                                     │
└──────────────────────────────────────────────────────────────┘

Feedback Quality Guide

LevelExample (Bad → Good)
❌ Vague"Dashboard chưa tốt"
⚠️ Better"Dashboard thiếu KPI cards"
✅ Best"Page 1 thiếu KPI cards ở top — thêm Revenue, Orders, AOV, Churn Rate với YoY comparison sẽ giúp viewer nắm context ngay"
LevelExample (Bad → Good)
❌ Only negative"Chart sai, color xấu, font nhỏ"
✅ Balanced"Trend chart insight hay! Suggestions: enlarge font to 12pt, use consistent blue palette, add annotation for Q3 dip"

Common Review Findings

#FindingFrequencyFix Time
1Missing axis labelsVery common2 min
2Inconsistent colors across pagesCommon5 min
3KPI cards without comparison periodCommon5 min
4Findings not documented in notebookCommon15 min
5Dashboard doesn't answer stated questionOccasional30 min
6Chart type inappropriate (pie for 10+ categories)Occasional10 min
7Code not reproducible (hardcoded paths, no seed)Occasional10 min
8Executive summary too vagueCommon20 min

📋 Tổng hợp — Quality Gates cho Capstone

mermaid
flowchart LR
    A["📓 Notebook<br/>Code Review<br/>Standards"] --> B["📊 Dashboard<br/>QA Checklist"]
    B --> C["👥 Peer Review<br/>Framework"]
    C --> D["📝 Executive<br/>Summary<br/>Review"]
    D --> E["✅ Ready to<br/>Present<br/>(Buổi 20)"]
GateStandardPass Criteria
Gate 1: CodeCode Review StandardsRestart & Run All = no errors. Findings documented
Gate 2: DashboardDashboard QA ChecklistQA Score ≥ 3.5/5. Data verified. Interactivity works
Gate 3: Peer ReviewPeer Review Framework≥ 2 reviewers. Top 3 issues fixed. Overall ≥ 3/5
Gate 4: SummaryWhat/So What/Now What5 findings. 3 recommendations with impact. 1-2 pages

🔗 Liên kết