Appearance
🏆 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:
- Code Review Standards — Review Jupyter Notebook: structure, reproducibility, documentation
- Dashboard QA Checklist — Kiểm tra dashboard trước khi publish: accuracy, design, functionality
- 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ẩn | Nguồn / Tham khảo | Áp dụng cho Buổi 19 |
|---|---|---|---|
| 1 | Code Review Standards | Google Engineering Practices / PEP 8 / Jupyter Best Practices | Review Jupyter Notebook cho analysis quality |
| 2 | Dashboard QA Checklist | IBCS (International Business Communication Standards) / Stephen Few | QA dashboard trước khi present |
| 3 | Peer Review Framework | Agile Code Review / Design Critique guidelines | Structured 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ạnh | Câu hỏi | Ví dụ trong DA |
|---|---|---|
| Correctness | Code có chạy đúng không? | Merge data đúng key? Filter đúng condition? |
| Clarity | Người khác đọc hiểu không? | Variable names, comments, section headers |
| Consistency | Style nhất quán không? | PEP 8, naming convention, formatting |
| Completeness | Có 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 SourcesCode Quality Rules
| Rule | Bad ❌ | Good ✅ |
|---|---|---|
| Variable names | df2, x, temp | df_cleaned, churn_rate, monthly_revenue |
| Comments | Không comment | # Filter churned users in last 30 days |
| Magic numbers | df[df['age'] > 25] | MIN_AGE = 25; df[df['age'] > MIN_AGE] |
| Imports | Import giữa notebook | Tất cả imports ở cell đầu tiên |
| Output | Print tất cả mọi thứ | Print summary, hide intermediate steps |
| Charts | Không title, không label | Title, axis labels, legend, source |
| Cell order | Cells chạy lộn xộn, skip cells | Run 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-runningSelf-Review Template
Trước khi submit notebook, tự check:
| # | Check | Pass? |
|---|---|---|
| 1 | Markdown cells giải thích mỗi section? | ☐ |
| 2 | Variable names descriptive? | ☐ |
| 3 | No unused code cells? | ☐ |
| 4 | All charts have title + labels? | ☐ |
| 5 | Findings documented (What/So What/Now What)? | ☐ |
| 6 | Kernel → Restart & Run All → no errors? | ☐ |
| 7 | No sensitive data (passwords, API keys)? | ☐ |
| 8 | Summary 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 periodVisual 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 plotChart-Specific QA
| Chart Element | Checklist |
|---|---|
| Title | Descriptive, includes time period: "Revenue by Product — FY2025" |
| Axes | Labeled with units (VND, %, count). Y-axis starts at 0 (bar charts) |
| Legend | Positioned consistently (top-right hoặc bottom). Readable |
| Data labels | Only on key data points — not every bar |
| Gridlines | Light/subtle or removed. Not distracting |
| Tooltips | Show useful context on hover: value, %, period |
| Sort order | Meaningful: descending by value, chronological, alphabetical |
| Number format | Consistent: 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âyContent & 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
| Category | Weight | Score (1-5) | Weighted |
|---|---|---|---|
| Data Accuracy | 30% | ||
| Visual Design | 25% | ||
| Chart Quality | 20% | ||
| Functionality | 15% | ||
| Content & Insight | 10% | ||
| Total | 100% | /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ắc | Mô tả |
|---|---|
| Be specific | "Chart 2 thiếu y-axis label" thay vì "charts chưa tốt" |
| Be kind | Feedback về work, không phải về person |
| Be constructive | Mỗi criticism đi kèm 1 suggestion |
| Be timely | Review 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
| Role | Responsibility | Do | Don't |
|---|---|---|---|
| Builder | Present work, listen to feedback | Take notes, ask clarifying questions | Defend every choice, argue |
| Reviewer | Give structured feedback | Use template, be specific + constructive | Be vague, criticize person |
| Facilitator | Keep time, ensure balanced discussion | Ensure all reviewers speak | Let 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
| Level | Example (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" |
| Level | Example (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
| # | Finding | Frequency | Fix Time |
|---|---|---|---|
| 1 | Missing axis labels | Very common | 2 min |
| 2 | Inconsistent colors across pages | Common | 5 min |
| 3 | KPI cards without comparison period | Common | 5 min |
| 4 | Findings not documented in notebook | Common | 15 min |
| 5 | Dashboard doesn't answer stated question | Occasional | 30 min |
| 6 | Chart type inappropriate (pie for 10+ categories) | Occasional | 10 min |
| 7 | Code not reproducible (hardcoded paths, no seed) | Occasional | 10 min |
| 8 | Executive summary too vague | Common | 20 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)"]| Gate | Standard | Pass Criteria |
|---|---|---|
| Gate 1: Code | Code Review Standards | Restart & Run All = no errors. Findings documented |
| Gate 2: Dashboard | Dashboard QA Checklist | QA Score ≥ 3.5/5. Data verified. Interactivity works |
| Gate 3: Peer Review | Peer Review Framework | ≥ 2 reviewers. Top 3 issues fixed. Overall ≥ 3/5 |
| Gate 4: Summary | What/So What/Now What | 5 findings. 3 recommendations with impact. 1-2 pages |