Skip to content

🧠 Case Study — Capstone Project: Kaggle Top Notebooks, Portfolio Thành Công, GitHub Best Practices

Trong buổi học này, chúng ta đã nắm project kickoff — chọn đề tài, data collection, project planning, Git setup. Bây giờ hãy xem 3 case study thực tế: cấu trúc Kaggle notebook đạt Top, portfolio DA giúp ứng viên được tuyển vào Grab/Shopee, và best practices từ open-source DA projects trên GitHub.


Case Study 1: Kaggle Top Notebooks — Cấu trúc Notebook xin việc

Bối cảnh

Kaggle (2025): 15+ triệu registered users, 250,000+ public datasets, 16 triệu+ public notebooks. Kaggle không chỉ là platform thi competitions — đó là portfolio platform lớn nhất cho data professionals. Hiring managers tại Google, Meta, Amazon thường xuyên browse Kaggle notebooks khi đánh giá ứng viên.

Vấn đề: Với 16 triệu notebooks, phần lớn là copy-paste tutorials, không có business context, code messy, không storytelling. Top 1% notebooks — những notebooks được 1,000+ upvotes — có gì khác biệt? Cấu trúc nào giúp notebook vừa là analysis, vừa là portfolio piece?

Phân tích: Nghiên cứu 50 Kaggle notebooks có ≥ 500 upvotes trong categories: EDA, Customer Analytics, Marketing, Sales Analysis (2023-2025), phân tích patterns chung về cấu trúc, storytelling, code quality, và visualization.

Phát hiện chính

Pattern 1: Cấu trúc 7 phần chuẩn

Phân tích 50 top notebooks, 92% tuân theo cấu trúc 7 phần (có thể khác tên nhưng cùng logic):

╔══════════════════════════════════════════════════════════════╗
║          KAGGLE TOP NOTEBOOK STRUCTURE (7 PARTS)              ║
╠══════════════════════════════════════════════════════════════╣
║  1. 📋 INTRODUCTION & BUSINESS CONTEXT                       ║
║     - Problem statement (2-3 câu business)                    ║
║     - Key questions (3-5 questions cụ thể)                    ║
║     - Who benefits from this analysis?                        ║
║                                                               ║
║  2. 📦 DATA OVERVIEW                                          ║
║     - Dataset description + source                            ║
║     - Shape, types, first few rows                            ║
║     - Data dictionary (mô tả mỗi column)                     ║
║                                                               ║
║  3. 🧹 DATA CLEANING                                         ║
║     - Missing values handling (với giải thích WHY)            ║
║     - Duplicates removal                                      ║
║     - Type conversions + feature engineering                  ║
║                                                               ║
║  4. 🔍 EDA — EXPLORATORY DATA ANALYSIS                       ║
║     - Univariate: distributions mỗi biến                     ║
║     - Bivariate: correlations + cross-tabs                    ║
║     - Key patterns found (viết bằng Markdown, không chỉ code)║
║                                                               ║
║  5. 📊 DEEP ANALYSIS                                          ║
║     - Trả lời từng business question đã đặt ra               ║
║     - Mỗi question = chart + interpretation + so what         ║
║     - Statistical tests nếu cần (correlation, t-test)         ║
║                                                               ║
║  6. 💡 KEY INSIGHTS & RECOMMENDATIONS                        ║
║     - Top 5 findings (bullet points, quantified)              ║
║     - Actionable recommendations (action + expected impact)   ║
║     - Limitations & future work                               ║
║                                                               ║
║  7. 📚 CONCLUSION & REFERENCES                                ║
║     - Summary paragraph                                       ║
║     - References, links, acknowledgments                      ║
╚══════════════════════════════════════════════════════════════╝

Pattern 2: Markdown : Code = 40:60

Tỷ lệTop Notebooks (≥500 votes)Average Notebooks
Markdown cells35-45% tổng cells10-15%
Code cells55-65%85-90%
Code commentsTrung bình 1 comment / 3 dòng code1 comment / 15 dòng
Visualization titles100% có title + axis labels40%
Insight textMỗi chart kèm 2-3 câu interpretationChỉ chart, không giải thích

Key takeaway: Top notebooks kể chuyện song song với code. Hiring manager không chỉ đọc code — họ đọc tư duy của bạn. Markdown cells = evidence của analytical thinking.

Pattern 3: "So What?" sau mỗi phân tích

Ví dụ từ notebook "E-commerce Customer Segmentation" (1,200+ upvotes):

❌ Average notebook:
[Code: plot bar chart of revenue by segment]
→ Không nói gì thêm. Next chart.

✅ Top notebook:
[Code: plot bar chart of revenue by segment]

### Key Observation:
**Champions segment (8.2% of customers) generates 41.5% of total revenue.**
This extreme concentration means:
1. Losing 1 Champion = losing ~50 regular customers worth of revenue
2. → Priority: Create VIP retention program with dedicated support
3. → Budget: Allocate 25% marketing budget to Champion retention
   (expected ROI: 4.2x based on LTV difference)

Pattern 4: Visualization Quality

Top notebooks dùng custom styling thay vì default matplotlib:

ElementDefault (meh)Top Notebook (pro)
Color paletteRainbow / randomConsistent 3-5 brand colors
Font sizeDefault (tiny)Title 16pt, labels 12pt
GridHeavy grid linesLight/no grid, clean
AnnotationsNoneKey numbers annotated on chart
Layout1 chart per cell2-4 subplots, comparison layout
Title"Bar Plot""Revenue Distribution by Customer Segment (Champions = 41.5%)"

Kết quả & Impact

Phân tích correlation giữa notebook structure và upvotes:

FactorCorrelation với UpvotesInsight
Business context intro+0.72Context quan trọng hơn fancy code
Markdown-to-code ratio+0.65Storytelling notebooks được vote cao hơn
Number of insights stated+0.61Explicit findings > implicit patterns
Visualization quality+0.58Clean charts > default charts
Code complexity+0.12Model phức tạp ≠ notebook hay

Key takeaway cho capstone: Notebook xin việc = storytelling document, không phải code dump. Cấu trúc 7 phần, Markdown 40%, "So What?" sau mỗi chart.


Case Study 2: DA Portfolio thành công — Ví dụ được tuyển Grab/Shopee

Bối cảnh

Thị trường tuyển dụng DA Việt Nam (2025): Theo VietnamWorks và Indeed Vietnam, có ~4,500 vị trí DA open mỗi tháng tại Việt Nam. Tỷ lệ cạnh tranh: 1 vị trí : 45 ứng viên cho Junior DA, 1:25 cho Mid-level. Grab Vietnam và Shopee Vietnam là 2 trong top 5 companies DA muốn join nhất — lương trung bình Junior DA: 18-25 triệu/tháng (Grab), 16-22 triệu/tháng (Shopee).

Nghiên cứu: Phỏng vấn 8 DA đang làm việc tại Grab/Shopee (hired 2023-2025), phân tích portfolio/GitHub profiles của họ, tìm patterns chung giúp họ pass screening.

Portfolio Analysis — 8 DA tại Grab/Shopee

Profile Overview

#Tên (alias)PositionCompanyBackgroundPortfolio Projects
1Minh A.Junior DAGrabRMIT, IT4 projects
2Thảo N.DAShopeeFTU, Business3 projects
3Hùng T.Junior DAGrabBK, Computer Science5 projects
4Linh P.DAShopeeUEH, Marketing3 projects
5Đức V.Senior DAGrabUIT, Math6 projects
6Hà M.DAShopeeNEU, Economics2 projects
7Khoa L.Junior DAGrabHCMUS, Statistics4 projects
8Mai T.DAShopeeDTU, DS3 projects

Patterns chung — 6 điều 8/8 đều có:

Pattern 1: README chất lượng cao

8/8 đều có README ≥ 300 words cho mỗi project, format:

  • Problem statement (bằng business language, không technical)
  • Dashboard screenshot (image render trực tiếp trên GitHub)
  • Key findings (3-5 bullets, quantified)
  • Tools used (badges/icons)
  • How to reproduce

Pattern 2: Đa dạng skills showcase

SkillCách showcaseBao nhiêu/8
SQLQueries trong notebook hoặc separate .sql files8/8
Pythonpandas, matplotlib, seaborn — clean code8/8
BI ToolTableau Public link hoặc Power BI screenshot7/8
StatisticsHypothesis testing, correlation, regression6/8
MLClassification hoặc regression (1 project)5/8
StorytellingInsight narrative trong Markdown8/8

Pattern 3: Project themes relevant cho target company

Target CompanyProject ThemeTại sao relevant?
GrabTransportation demand analysis, driver churn, ETA predictionCore business: ride-hailing, delivery
GrabFood delivery order patterns, restaurant ratings analysisGrabFood = major revenue stream
ShopeeE-commerce customer segmentation, seller performance, campaign ROICore business: marketplace
ShopeeProduct review sentiment, return rate analysis, category trendsBuyer-seller ecosystem

Insight: 6/8 có ít nhất 1 project liên quan trực tiếp đến business domain của company họ apply. Không phải coincidence — họ intentionally chọn đề tài phù hợp.

Pattern 4: Commit history = work ethic evidence

MetricNgười được tuyểnAverage applicant
Total commits (main project)35-805-10
Commit frequency3-5 commits/ngày during project1 giant commit
Commit messagesDescriptive ("feat: add RFM segmentation analysis")"update", "fix"
Green squares (6 months)150-30010-30

Hiring managers tại Grab confirmed: "Chúng tôi XEM commit history. Người commit 50 lần, mỗi commit nhỏ, message rõ ràng = evidence of professional development practices. Người push 1 lần toàn bộ code = red flag, có thể copy."

Pattern 5: "Above and beyond" differentiator

Mỗi người có 1 yếu tố "wow":

PersonDifferentiator
Minh A.Animated visualizations (Plotly) + embedded video walkthrough
Thảo N.Blog post trên Medium kèm mỗi project
Hùng T.CI/CD pipeline tự động chạy data update weekly
Linh P.UX-designed Tableau dashboard (prototype trên Figma trước)
Đức V.Open-source Python package cho RFM analysis
Hà M.LinkedIn article series "30 Days of DA"
Khoa L.Interactive Streamlit app demo cho mỗi project
Mai T.Comparison analysis — same dataset, 3 different methods

Kết quả & Lessons Learned

Interview với 3 hiring managers (Grab, Shopee):

"Portfolio không cần perfect. Tôi muốn thấy: (1) Business thinking — bạn hiểu problem không chỉ data, (2) Technical competence — code clean, reproducible, (3) Communication — README và insight rõ ràng. 3 project tốt thắng 10 project mediocre." — Hiring Manager, Grab Vietnam

"Red flags trong portfolio: GitHub trống, 1 giant commit, no README, Titanic, code không comments, không business context. Green flags: consistent commits, multiple projects, README đẹp, relevant domain." — DA Lead, Shopee Vietnam


Case Study 3: GitHub DA Projects — Best Practices từ Open-Source

Bối cảnh

GitHub (2025): 100+ triệu developers, 420+ triệu repositories. Trong đó, tag "data-analytics" và "data-analysis" có ~85,000 public repos. Nhưng phần lớn repos bị abandoned — last commit > 6 tháng, no README, no structure.

Nghiên cứu: Phân tích 30 most-starred DA projects trên GitHub (≥ 500 stars, active maintained), tìm best practices cho repo structure, documentation, reproducibility, và collaboration.

Top Open-Source DA Repos — Patterns

Repo Structure Best Practices

Phân tích 30 repos, cấu trúc phổ biến nhất (26/30 repos):

📁 project-name/
├── 📄 README.md              ← 100% repos (duh)
├── 📄 LICENSE                 ← 93% repos (MIT most common)
├── 📄 .gitignore              ← 97% repos
├── 📄 requirements.txt        ← 83% repos (hoặc environment.yml)
├── 📄 CONTRIBUTING.md         ← 60% repos (nếu open collab)
├── 📁 data/
│   ├── 📄 raw/                ← 73% repos (tách raw vs processed)
│   └── 📄 processed/
├── 📁 notebooks/              ← 87% repos
│   ├── 📄 01_*.ipynb          ← Numbered sequentially
│   └── 📄 02_*.ipynb
├── 📁 src/ or scripts/        ← 67% repos (reusable functions)
├── 📁 reports/ or outputs/    ← 53% repos
├── 📁 dashboards/             ← 40% repos
└── 📁 tests/                  ← 23% repos (rare for DA, but pro)

Documentation Standards

Element% repos cóBest Practice
README ≥ 500 words90%Problem + Data + Methods + Findings + How to Run
Data dictionary73%Mô tả mỗi column: tên, type, description, example values
requirements.txt83%Pin versions: pandas==2.1.0 không chỉ pandas
Notebook headers80%Mỗi notebook bắt đầu bằng Markdown cell mô tả purpose
Inline comments67%1 comment / 5 dòng code minimum
CHANGELOG.md30%Track major changes giữa versions

Reproducibility Checklist

Top repos đều đảm bảo người khác có thể reproduce kết quả:

╔═══════════════════════════════════════════════════════════════╗
║          REPRODUCIBILITY CHECKLIST (from Top Repos)           ║
╠═══════════════════════════════════════════════════════════════╣
║  ☐ requirements.txt hoặc environment.yml                      ║
║  ☐ Random seed set (np.random.seed(42))                       ║
║  ☐ Data source documented + download instructions             ║
║  ☐ Notebooks numbered in execution order (01_, 02_, ...)      ║
║  ☐ Relative paths (không hardcode /Users/name/...)            ║
║  ☐ .gitignore đầy đủ (exclude OS files, IDE files, env)      ║
║  ☐ No secrets/API keys in code (dùng .env)                    ║
║  ☐ "How to Run" section trong README                          ║
║  ☐ Output files reproducible từ raw data + code               ║
║  ☐ Python version specified                                   ║
╚═══════════════════════════════════════════════════════════════╝

Branching & Collaboration Patterns

Dù không phải software project, top DA repos cũng dùng Git workflow:

Pattern% reposMô tả
main branch only47%Simple projects, solo work
main + dev branches33%Separate stable vs work-in-progress
Feature branches20%feature/eda, feature/modeling — merge via PR
Issues tracking43%GitHub Issues cho TODO, bugs, enhancement ideas
Pull Requests27%Self-review hoặc team review trước merge

README Badges — Professional Touch

Top repos sử dụng badges để show status at a glance:

markdown
![Python](https://img.shields.io/badge/Python-3.11-blue)
![pandas](https://img.shields.io/badge/pandas-2.1-green)
![License](https://img.shields.io/badge/License-MIT-yellow)
![Status](https://img.shields.io/badge/Status-Complete-brightgreen)
![Last Updated](https://img.shields.io/badge/Updated-2025--08-orange)

Impact: Stars & Engagement

FactorCorrelation với Stars
README quality (length + structure)+0.78
Number of notebooks+0.45
Visualization quality+0.62
Reproducibility score+0.71
Code complexity+0.15
Recency (last commit)+0.52

Key insight: README quality và reproducibility tương quan mạnh nhất với stars — mạnh hơn cả code complexity. Documentation > Complexity.

Kết quả & Recommendations cho Capstone

Từ 3 case studies, 7 golden rules cho capstone project:

╔═══════════════════════════════════════════════════════════════╗
║               7 GOLDEN RULES FOR CAPSTONE                     ║
╠═══════════════════════════════════════════════════════════════╣
║  1. README là "sales pitch" — invest ≥ 1 giờ viết README     ║
║  2. Notebook = Storytelling — 40% Markdown, mỗi chart có     ║
║     "So What?"                                                ║
║  3. Commit thường xuyên — 3-5 commits/ngày, msg descriptive  ║
║  4. Cấu trúc folder chuẩn — data/notebooks/reports/          ║
║  5. Reproducible — requirements.txt + random seed +           ║
║     relative paths                                            ║
║  6. Relevant domain — chọn đề tài liên quan target company   ║
║  7. "Above and beyond" — 1 yếu tố wow differentiator         ║
╚═══════════════════════════════════════════════════════════════╝

📊 So sánh 3 Case Studies

AspectKaggle Top NotebooksGrab/Shopee PortfoliosGitHub Top Repos
FocusNotebook quality & storytellingEnd-to-end portfolio strategyRepo structure & documentation
Key metricUpvotes / engagementHiring callback rateStars / forks
Biggest success factorBusiness context + "So What?"Relevant domain + commit historyREADME quality + reproducibility
Common mistakeCode dump, no narrativeGeneric projects, 1 giant commitNo docs, abandoned repos
Actionable for capstone7-part notebook structureDRBST criteria + target domainFolder structure + .gitignore

🔑 Takeaways cho Buổi 18

#TakeawayAction
1Notebook kể chuyện, không chỉ chạy code7-part structure, 40% Markdown, "So What?"
2Portfolio phải relevantChọn đề tài liên quan domain target company
3Commit history = work ethic3-5 commits/ngày, messages descriptive
4README = First impression≥ 500 words, screenshot, findings, how to run
5Reproducibility > Complexityrequirements.txt, seed, relative paths
61 "wow" factorBlog, interactive app, video walkthrough, custom viz
73 projects tốt > 10 projects trung bìnhQuality over quantity