FunnelLens: Data Analyst Case Study on a Messy E-commerce Funnel

Mobile is about 69 % of FunnelLens's sessions but only about 61 % of its revenue, and the Head of Product wants a quarter of engineering time to rebuild the mobile checkout. Over nine phases you find out what the data supports, like a professional analytics team: turn the request into answerable questions with acceptance criteria, write a data contract and an analysis plan with ADRs, then build the analysis test-first in your track: load four deliberately messy CSVs as text, apply documented cleaning rules that count every row they drop, check the contract, build the funnel by device, channel and week, and test the hypothesis three ways (a two-proportion z test, a Cochran-Mantel-Haenszel test that adjusts for acquisition channel and exposes a Simpson's paradox, and Welch's t test on order values) before sizing the opportunity against the rebuild threshold. Golden answers, invariants and contract-violation tests pin every number, and the Python, SQL and R tracks must agree to 1e-9. CI executes the notebook or R Markdown report and checks parity; a Streamlit dashboard with an optional AI narrator (numbered facts in, guardrails out, a deterministic template as fallback) ships in Docker. Then a data refresh breaks the pipeline on purpose: a new acquisition channel and a broken tracking week lead to a contract version bump, monitoring, a post-mortem and v1.1. Pick Python (pandas, Jupyter), SQL (DuckDB) or R (tidyverse, R Markdown); the data, contract, golden answers and dashboard are shared. Everything runs on a laptop with no paid service and no API key.

intermediatePythonSQLRpandasDuckDBtidyverseJupyterR MarkdownStreamlitDockerGitHub Actions

What you will build, step by step

  1. Phase 0 · Setup and the brief
  2. Phase 1 · Requirements: questions, decisions and acceptance criteria
  3. Phase 2 · Design: data contract, analysis plan and ADRs
  4. Phase 3 · Implementation in five milestones: load, clean, explore, test, decide
  5. Phase 4 · Testing the analysis: golden answers, invariants, parity, coverage
  6. Phase 5 · CI with GitHub Actions
  7. Phase 6 · Dashboard, AI narrator, Docker and delivery
  8. Phase 7 · Data refresh, monitoring and a post-mortem
  9. Phase 8 · Retrospective and portfolio