# Data Analyst roadmap

> Turn raw data into decisions with spreadsheets, statistics, SQL, Python, BI dashboards and clear storytelling.

Canonical: https://www.internhack.in/roadmaps/tracks/data-analyst
Last updated: 2026-11-28

18 sections, 78 topics, about 348 hours.

A complete path from first spreadsheet to job-ready analyst. You will learn how analysis projects run, work fluently in spreadsheets and SQL, apply statistics and A/B testing correctly, clean and explore data with Python, build dashboards in a BI tool, and communicate findings that change decisions. Optional sections cover analytics engineering with dbt, product and web analytics, machine learning for analysts, and domain analytics in marketing, finance and operations, before finishing with a portfolio and interview preparation.

## Outcomes

- Frame vague business requests as precise, measurable questions
- Query and model data confidently with SQL, including joins, CTEs and window functions
- Apply descriptive statistics, hypothesis tests and A/B testing without common mistakes
- Clean, reshape and explore messy datasets with Python and pandas
- Design honest charts and build governed dashboards in Power BI or another BI tool
- Analyse funnels, cohorts, retention and unit economics, and diagnose why metrics move
- Communicate findings as clear stories, memos and presentations for different audiences
- Show job-ready skills with a portfolio of case studies and strong interview preparation

## Prerequisites

- Comfort with basic arithmetic and percentages
- A computer with a spreadsheet app and internet access

## The Analyst's Job and How Analysis Gets Done

What analysts are hired to do, the stages every analysis passes through, and how to turn a vague request into a question data can answer.

### What Analysts Actually Do

core · beginner · about 2 h · https://www.internhack.in/roadmaps/tracks/data-analyst/role-landscape

The day-to-day reality of data analyst, business analyst and analytics engineer roles, and the skills each one leans on.

Analysts exist to help people make better decisions with evidence. Most of the job is not fancy modelling: it is finding the right data, checking that it is trustworthy, summarising it honestly, and explaining what it means for a specific decision.

#### Three neighbouring roles
- **Data analyst**: answers questions with SQL, spreadsheets and dashboards. Owns reporting, ad hoc deep dives and metric definitions.
- **Business analyst**: sits closer to operations and requirements. Translates business processes into specs, often with lighter data work and more stakeholder interviews.
- **Analytics engineer**: builds the clean, tested tables everyone else queries, usually with SQL and dbt. More software practice, less presenting.

Titles vary wildly between companies, so read job descriptions for the actual tasks rather than trusting the label. "Product analyst", "marketing analyst" and "BI developer" are all flavours of the same core skill set applied to a domain.

#### What a normal week looks like
- Answering quick questions ("how many signups last week by country?")
- One or two deeper investigations ("why did conversion drop in March?")
- Maintaining dashboards and fixing broken numbers
- Meetings where you clarify what people really need

**Pitfall:** assuming the tools are the job. Employers hire for judgement: knowing which question matters, noticing when a number looks wrong, and saying "the data cannot answer that" when it cannot. You are ready to move on when you can describe, in your own words, how an analyst adds value beyond producing charts.

Key concepts: Data analyst responsibilities, Business analyst vs data analyst, Analytics engineer role, Domain flavours: product, marketing, finance, Reading job descriptions critically, Where analysts sit in an org.

Mini project: Collect 10 real analyst job postings, tabulate the tools and responsibilities they mention, and write a one-page summary of the most common skill requirements.

Self-check: If a manager asks you for 'a dashboard', what questions would you ask before building anything?

Resources:
- [Kaggle Learn (free micro-courses)](https://www.kaggle.com/learn) (Kaggle)
- [What is analytics engineering? (dbt docs)](https://docs.getdbt.com/docs/introduction) (dbt Labs)

### The Analytics Lifecycle

core · beginner · about 2 h · https://www.internhack.in/roadmaps/tracks/data-analyst/analytics-lifecycle

The repeatable loop of question, data collection, cleaning, analysis, communication and follow-up that every project follows.

Almost every analysis, from a five-minute query to a month-long study, moves through the same stages. Knowing them helps you plan, estimate time honestly, and avoid skipping the boring steps that make results trustworthy.

#### The loop
1. **Frame**: agree on the decision and the question. What will change depending on the answer?
2. **Acquire**: locate data sources, request access, understand how each field was produced.
3. **Prepare**: clean, join, reshape, and validate. This is often 50-80% of the time.
4. **Analyse**: describe, compare, segment, test, model. Start simple.
5. **Communicate**: a clear answer, the evidence, the caveats, and a recommendation.
6. **Operationalise**: if the question recurs, automate it as a report or dashboard; otherwise archive your work so it can be reproduced.

#### Descriptive to prescriptive
Analytics is often described in four levels: descriptive (what happened), diagnostic (why), predictive (what will happen) and prescriptive (what should we do). Most analyst work is descriptive and diagnostic, and that is fine. Doing those well is worth more than a shaky forecast.

**Pitfalls:** jumping straight to analysis without agreeing on the question, and treating communication as an afterthought. A correct answer delivered late or unclearly has little impact. Move on when you can take any request and sketch the six stages with a rough time estimate for each.

Key concepts: Framing the decision, Data acquisition and access, Preparation and validation, Analysis and interpretation, Communicating results, Descriptive, diagnostic, predictive, prescriptive, CRISP-DM process model.

Mini project: Pick a question about the NYC 311 service requests open dataset (e.g. which complaint types grew fastest) and write a one-page plan covering all six lifecycle stages before touching the data.

Self-check: Which lifecycle stage usually takes the most time, and why is skipping it dangerous?

Resources:
- [Cross-industry standard process for data mining](https://en.wikipedia.org/wiki/Cross-industry_standard_process_for_data_mining) (Wikipedia)
- [Kaggle Learn](https://www.kaggle.com/learn) (Kaggle)

### Framing Questions and Requirements

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/problem-framing

Turning vague stakeholder requests into specific, measurable questions with agreed definitions and scope.

Requests usually arrive fuzzy: "Can you look into churn?" Your first job is to convert that into something answerable, such as "What share of customers who joined in Q1 cancelled within 90 days, and how does that differ by acquisition channel?"

#### A framing checklist
- **Decision**: what will the requester do differently depending on the answer?
- **Metric**: which number answers it, and exactly how is it defined (numerator, denominator, time window, exclusions)?
- **Population**: which users, orders, regions or products are in scope?
- **Comparison**: compared to what? Last period, a target, a control group?
- **Deadline and precision**: is a rough answer tomorrow better than a perfect one next month?

#### Hypotheses keep you focused
Write down two or three plausible explanations before querying. For churn, maybe "price increase", "onboarding change" and "seasonal mix". Each hypothesis tells you which cut of the data to look at, which stops you from endlessly slicing.

#### Writing it down
A short brief (question, definitions, data sources, expected output, due date) shared with the stakeholder prevents most rework. For business analyst work the same idea scales up into requirements documents and user stories.

**Pitfall:** accepting a metric name without a definition. "Active user" can mean five different things. You are ready to move on when you routinely produce a written, one-paragraph question before starting any analysis.

Key concepts: From vague request to specific question, Defining metrics precisely, Hypothesis-driven analysis, Scoping and trade-offs, Analysis briefs, Requirements and user stories.

Mini project: Take three vague prompts (e.g. 'Are our bikes being used well?' for the Citi Bike trip data) and rewrite each as a precise question with metric definitions, population and comparison.

Self-check: Give two different, reasonable definitions of 'monthly active user' and explain how each could change a conclusion.

Resources:
- [Technical Writing courses (clarity and audience)](https://developers.google.com/tech-writing) (Google)
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)

## Spreadsheets as a Serious Analysis Tool

Excel and Google Sheets beyond basics: robust formulas, lookups, pivot tables, charts, Power Query and data validation.

### Spreadsheet Foundations and Good Structure

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/spreadsheet-foundations

Cell references, tables, formatting and the tidy layout habits that keep spreadsheets from turning into unmaintainable messes.

Spreadsheets are still the most used analysis tool in business. Your stakeholders live in them, so fluency here earns trust quickly.

#### Structure first
- One row per record, one column per variable, one header row. No merged cells inside data.
- Keep **raw data**, **calculations** and **outputs** on separate sheets.
- Convert ranges to an Excel **Table** (Ctrl+T) so formulas and charts grow automatically and you can use structured references like `Sales[Amount]`.

#### References
Relative references (`A2`) shift when copied; absolute (`$A$2`) do not; mixed (`$A2`, `A$2`) lock one side. Understanding this is the difference between copying a formula confidently and fixing it cell by cell. Named ranges make key inputs (a tax rate, a target) readable.

#### Hygiene
- Format numbers as numbers and dates as real dates, not text.
- Use freeze panes, filters and consistent number formats.
- Never type a hard-coded number inside a formula when it could live in a labelled input cell.

**Pitfall:** building a "pretty" sheet with blank rows, subtotals mixed into data and colour as the only signal. It breaks sorting, filtering and pivot tables. Move on when you can take a messy exported sheet and restructure it into a clean table that a pivot table can consume directly.

Key concepts: Relative, absolute and mixed references, Excel Tables and structured references, Tidy layout: raw, calc, output sheets, Number and date formats, Sorting, filtering, freeze panes, Named ranges, Keyboard shortcuts, Google Sheets differences.

Mini project: Download a public CSV (e.g. World Bank GDP by country), import it into Excel or Sheets, convert it into a proper table, and build a separate summary sheet that references it.

Self-check: Why do merged cells and blank separator rows break sorting and pivot tables?

Resources:
- [Excel help and learning](https://support.microsoft.com/en-us/excel) (Microsoft)
- [Google Sheets help](https://support.google.com/docs) (Google)

### Formulas and Functions That Matter

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/spreadsheet-formulas

Conditional logic, conditional aggregation, text and date functions, and modern dynamic array functions.

You do not need to memorise hundreds of functions. A core set of around 30 covers most real work.

#### The essential families
- **Logic**: `IF`, `IFS`, `AND`, `OR`, `IFERROR`. Keep nesting shallow; use `IFS` or a lookup table instead of five nested IFs.
- **Conditional aggregation**: `SUMIFS`, `COUNTIFS`, `AVERAGEIFS`, `MAXIFS`. These answer most "total by segment" questions without a pivot.
- **Text**: `LEFT`, `RIGHT`, `MID`, `LEN`, `TRIM`, `UPPER`, `TEXTSPLIT`, `TEXTJOIN`, `SUBSTITUTE`.
- **Dates**: `TODAY`, `EOMONTH`, `EDATE`, `DATEDIF`, `WEEKDAY`, `NETWORKDAYS`. Remember dates are just numbers under the hood.
- **Dynamic arrays** (Excel 365 and Sheets): `FILTER`, `SORT`, `UNIQUE`, `SEQUENCE`. One formula spills into many cells.
- **LET and LAMBDA**: name intermediate results inside a formula for readability.

#### Writing formulas you can trust
Build complex formulas in steps using helper columns, check each piece, then combine. Use Evaluate Formula (Excel) to step through calculations. Test with a row where you know the answer by hand.

**Pitfalls:** `SUMIF` on numbers stored as text silently returns 0; `IFERROR` that hides real problems; volatile functions like `INDIRECT` and `OFFSET` slowing big workbooks. Move on when you can compute a segmented summary (e.g. revenue by region and month) using only SUMIFS and dynamic arrays.

Key concepts: IF, IFS, AND, OR, IFERROR, SUMIFS, COUNTIFS, AVERAGEIFS, Text functions and TEXTSPLIT, Date functions, FILTER, SORT, UNIQUE dynamic arrays, LET and LAMBDA, Formula auditing and Evaluate Formula, Sheets QUERY function.

Mini project: Using a sample superstore-style sales dataset, build a sheet that shows revenue, order count and average order value per region per month using only formulas (no pivots).

Self-check: A SUMIFS over a column returns 0 even though values are clearly there. What are two likely causes?

Resources:
- [Excel functions and formulas help](https://support.microsoft.com/en-us/excel) (Microsoft)
- [Google Sheets function list](https://support.google.com/docs/table/25273) (Google)

### Lookups: XLOOKUP, INDEX/MATCH and Friends

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/spreadsheet-lookups

Joining tables inside a spreadsheet reliably, handling missing matches, and understanding exact vs approximate matching.

Lookups are how spreadsheets join tables: bring the customer segment into the orders sheet, the price into the order lines, the target into the actuals.

#### The options
- **XLOOKUP** (Excel 365, also in Google Sheets): `=XLOOKUP(key, lookup_col, return_col, "Not found")`. Exact match by default, can search from the bottom, returns whole rows. Use this when available.
- **INDEX/MATCH**: `=INDEX(return_col, MATCH(key, lookup_col, 0))`. Works everywhere, does not break when columns are inserted, and supports two-way lookups with two MATCHes.
- **VLOOKUP**: widely used in legacy files. Know how to read it, but note its weaknesses: it only looks right, and a hard-coded column number breaks when columns move. Always pass `FALSE` for exact matching.

#### Approximate matching
Approximate (sorted) matching is useful for banding: tax brackets, grade boundaries, commission tiers. Keep a small sorted threshold table and look up with match mode -1 or 1.

#### Checking your joins
- Are keys unique in the lookup table? Duplicates mean you silently get the first match.
- Do keys match exactly? Trailing spaces, text vs number, and case differences cause misses.
- Count how many rows returned "not found" and investigate them.

**Pitfall:** wrapping everything in IFERROR so missing matches look like zeros. Move on when you can join two tables, report the match rate, and explain every unmatched row.

Key concepts: XLOOKUP, INDEX and MATCH, Reading VLOOKUP and HLOOKUP, Two-way lookups, Approximate match for banding, Diagnosing missing matches.

Mini project: Take an orders table and a separate product catalogue, bring category and unit cost into each order with XLOOKUP, compute margin, and report how many orders failed to match and why.

Self-check: Your lookup table has two rows for the same product id. What happens to your XLOOKUP results, and how would you detect it?

Resources:
- [Excel help and learning](https://support.microsoft.com/en-us/excel) (Microsoft)
- [Google Sheets function list](https://support.google.com/docs/table/25273) (Google)

### Pivot Tables and Summary Reporting

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/pivot-tables

Summarising large tables interactively with pivot tables, grouping, calculated fields, slicers and percent-of-total views.

A pivot table is a GROUP BY you can drag around. It is the fastest way to explore a dataset in a spreadsheet and the tool most business users already understand.

#### Core moves
- Drag a category into **Rows**, another into **Columns**, a numeric field into **Values**.
- Change the aggregation: sum, count, average, distinct count (Excel Data Model).
- **Show values as**: percent of row, percent of column, percent of grand total, running total, difference from previous. These answer "share" and "growth" questions instantly.
- **Group** dates by month, quarter and year, or numbers into bins.
- Add **slicers** and timelines for interactive filtering.

#### Keep pivots honest
- Base pivots on an Excel Table so new rows are included after Refresh.
- Watch for blank categories and "(blank)" rows; they often signal data quality problems.
- Averages of averages are wrong. If you need an average price, compute total revenue divided by total units, not the mean of a price column.
- Calculated fields in classic pivots operate on sums, which can surprise you. For ratios, consider the Data Model with measures (the same idea as DAX later on).

**Pitfall:** copying pivot output into a report as static numbers and forgetting where it came from. Keep the pivot and label the source. Move on when you can answer "which three products drove most of the revenue change between two quarters" with a single pivot in under five minutes.

Key concepts: Rows, columns, values, filters, Show values as percent and difference, Date and number grouping, Slicers and timelines, Calculated fields and their limits, Data Model and distinct count, GETPIVOTDATA.

Mini project: Using a public retail dataset (e.g. the UCI Online Retail dataset), build a pivot showing monthly revenue by country with percent-of-total, plus slicers for product category.

Self-check: Why is the average of per-store average prices not the same as the overall average price, and how would you compute the correct one in a pivot?

Resources:
- [Excel help and learning](https://support.microsoft.com/en-us/excel) (Microsoft)
- [Google Sheets help](https://support.google.com/docs) (Google)

### Charts and Simple Dashboards in Spreadsheets

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/spreadsheet-charts

Building clear charts from spreadsheet data, choosing the right type, and assembling a one-page summary.

Spreadsheet charts are often the first visual a stakeholder sees from you. Making them clean is quick once you know which defaults to override.

#### Picking the chart
- Trend over time: line chart.
- Compare categories: bar chart, sorted, horizontal if labels are long.
- Part of a whole with few parts: stacked bar or a simple table; use pies sparingly.
- Relationship between two numbers: scatter plot.
- Distribution: histogram (built into modern Excel and Sheets).

#### Cleaning defaults
- Remove chart junk: heavy gridlines, 3D effects, unnecessary legends.
- Title with the insight ("Returns doubled after the March policy change"), not just the metric name.
- Start bar chart axes at zero; label units.
- Use one highlight colour for the point that matters and grey for context.

#### Mini dashboards
Put three to five key numbers at the top, a trend chart and a breakdown underneath, and slicers connected to the pivots behind them. Sparklines add tiny in-cell trends to tables. Conditional formatting (data bars, colour scales) turns a table into a heatmap.

**Pitfall:** dual-axis charts that imply relationships that are not there, and truncated axes that exaggerate small changes. Move on when your charts can be understood in five seconds without you explaining them.

Key concepts: Line, bar, scatter, histogram, Removing chart junk, Insight-driven titles, Pivot charts and slicers, Conditional formatting and sparklines, Combo and dual-axis charts.

Mini project: Build a one-page spreadsheet dashboard for a public COVID-19 or Our World in Data CSV with three KPIs, a trend line and a sorted bar chart, all driven by one slicer.

Self-check: When would a sorted horizontal bar chart communicate better than a pie chart?

Resources:
- [Excel help and learning](https://support.microsoft.com/en-us/excel) (Microsoft)
- [Datawrapper Academy](https://academy.datawrapper.de/) (Datawrapper)

### Power Query, Data Validation and Repeatable Cleanup

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/power-query-validation

Automating imports and cleaning with Power Query, and preventing bad input with data validation rules.

If you clean the same export every week by hand, you are doing a job Power Query should do. It records each transformation as a step, so next week you just click Refresh.

#### Power Query essentials
- **Get Data** from CSV, folders of files, databases or web pages.
- Common steps: remove columns, change types, split columns, trim, replace values, filter rows, fill down, unpivot.
- **Merge** queries (joins) and **Append** queries (stacking files with the same shape).
- Every step is written in the M language; you rarely need to write M by hand but reading it helps debug.
- The same engine powers Power BI, so skills transfer directly.

#### Data validation
When people type data into your sheets, stop mistakes at the door:
- Dropdown lists from a reference range.
- Numeric and date limits, custom formula rules.
- Input messages and error alerts that explain what is expected.
- Protect sheets so formulas cannot be overwritten.

#### Deduplication and checks
Use Remove Duplicates carefully (decide which columns define a duplicate), and add check cells: row counts, totals that should match the source, counts of blanks.

**Pitfall:** Power Query type detection guessing wrong (e.g. treating product codes like "00123" as numbers). Always review the Changed Type step. Move on when you can combine a folder of monthly CSV files into one clean table with a single refresh.

Key concepts: Importing from files, folders, web, Type changes, split, trim, replace, Merge and Append queries, Unpivot columns, Reading M code, Data validation rules and dropdowns, Sheet protection, Control totals and check cells.

Mini project: Download 12 monthly files of a public dataset (e.g. UK Land Registry price paid or a city's monthly transit ridership), combine them via Power Query From Folder, clean types, and produce a refreshable pivot.

Self-check: Why is Unpivot often the first step when a spreadsheet has one column per month?

Resources:
- [Power Query documentation](https://learn.microsoft.com/en-us/power-query/) (Microsoft Learn)
- [Excel help and learning](https://support.microsoft.com/en-us/excel) (Microsoft)

## Statistical Thinking for Decisions

The statistics analysts use every week: summaries, distributions, sampling, uncertainty, testing, relationships and experiments.

### Descriptive Statistics

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/descriptive-statistics

Summarising data with measures of centre, spread and shape, and knowing which summary fits which data.

Descriptive statistics compress thousands of rows into a few numbers. Choosing the right ones is a judgement call, and the wrong choice can mislead.

#### Centre
- **Mean**: sensitive to outliers. One billionaire moves average income a lot.
- **Median**: the middle value; robust to outliers. Prefer it for skewed data like income, order values, session length.
- **Mode**: the most common value; useful for categories.

#### Spread
- **Range** and **interquartile range (IQR)**: IQR is the middle 50% and ignores extremes.
- **Variance** and **standard deviation**: average squared distance from the mean, and its square root in the original units.
- **Percentiles**: p50, p90, p99 are how teams describe latency, delivery times and spending.

#### Shape
Skewness tells you whether the tail stretches right or left; many business metrics are right-skewed. Always look at a histogram or box plot before trusting a single number.

#### Categorical data
Counts, proportions and cross-tabs. Report the denominator: "40% of 5 users" is not the same claim as "40% of 5,000".

**Pitfalls:** reporting the mean of skewed data without the median, and summarising before removing duplicates or test records. You are ready to move on when, given a column, you can pick and justify the right centre and spread measures after looking at its distribution.

Key concepts: Mean, median, mode, Variance and standard deviation, Percentiles and IQR, Skewness and outliers, Histograms and box plots, Proportions and cross-tabs, Weighted averages.

Mini project: Using the Airbnb listings data from Inside Airbnb for one city, compare mean vs median nightly price by neighbourhood and explain which you would report and why.

Self-check: Your average order value jumped 30% but the median barely moved. What probably happened?

Resources:
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)
- [OpenIntro Statistics (free textbook)](https://www.openintro.org/book/os/) (OpenIntro)
- [Seeing Theory: visual intro to probability and statistics](https://seeing-theory.brown.edu/) (Brown University)

### Probability and Distributions

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/probability-distributions

Basic probability rules and the common distributions (normal, binomial, Poisson, long-tailed) that show up in business data.

Probability is the language of uncertainty. You need enough of it to reason about chance, interpret tests, and recognise the shape of your data.

#### Rules worth knowing
- Probabilities range from 0 to 1; complementary events sum to 1.
- **Independent** events multiply: P(A and B) = P(A) x P(B).
- **Conditional probability**: P(A given B). Most real questions are conditional ("given they opened the email, how likely are they to buy?").
- **Bayes' rule** helps with base rates: a 99% accurate test for a rare condition still produces many false positives.

#### Distributions you will meet
- **Normal**: symmetric bell curve; heights, measurement error, and averages of many samples.
- **Binomial**: number of successes in n yes/no trials; conversions out of visitors.
- **Poisson**: counts of events in a fixed interval; support tickets per hour.
- **Exponential**: time between events.
- **Log-normal and power-law**: revenue per customer, city sizes, social media reach. A few items dominate the total.

#### The central limit theorem
Averages of large enough samples are roughly normal even when the underlying data is not. This is why confidence intervals and many tests work on skewed business data.

**Pitfall:** assuming everything is normal. Revenue data usually is not, and using mean plus or minus two standard deviations on it gives nonsense. Move on when you can look at a histogram and name a plausible distribution family.

Key concepts: Probability rules and independence, Conditional probability, Bayes' rule and base rates, Normal distribution and z-scores, Binomial and Poisson, Long-tailed distributions, Central limit theorem, Expected value.

Mini project: Simulate 10,000 samples of size 30 from a skewed distribution in a spreadsheet or Python, plot the sample means, and show visually that they approach a normal shape.

Self-check: Why does the central limit theorem let you build a confidence interval for average order value even when order values are heavily skewed?

Resources:
- [Seeing Theory](https://seeing-theory.brown.edu/) (Brown University)
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)

### Sampling, Bias and Data Collection

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sampling-and-bias

How the way data was collected shapes what it can tell you, and the biases that quietly invalidate conclusions.

Every dataset is a sample of some process. Before analysing, ask how the rows got there, because the collection method limits what you can conclude.

#### Sampling methods
- **Simple random**: every unit has an equal chance. The gold standard, rarely available in business data.
- **Stratified**: sample within groups (regions, plans) to guarantee each is represented.
- **Cluster** and **systematic** sampling: practical shortcuts with their own risks.
- **Convenience**: whoever answered the survey. Common and dangerous.

#### Biases to look for
- **Selection bias**: only some units enter the data (only customers who contacted support).
- **Survivorship bias**: you only see the survivors (only active accounts remain in the table).
- **Non-response bias**: the people who reply to surveys differ from those who do not.
- **Measurement bias**: tracking changed, a field was redefined, or a sensor drifted.
- **Simpson's paradox**: a trend reverses when you split by a hidden group, usually because group mix differs.

#### Sample size intuition
Uncertainty shrinks with the square root of sample size: quadrupling the sample halves the margin of error. Small segments produce noisy percentages, so be careful ranking tiny groups.

**Pitfall:** treating "all the data we have" as the population. Your app's users are not all potential customers. Move on when you can name the most likely bias in any dataset you are handed.

Key concepts: Population vs sample, Random and stratified sampling, Selection and survivorship bias, Non-response and measurement bias, Simpson's paradox, Sample size and margin of error, Survey design basics.

Mini project: Recreate the classic UC Berkeley admissions Simpson's paradox example in a spreadsheet and write a short explanation of why the aggregate and per-department conclusions differ.

Self-check: A report shows customers who used live chat have higher churn. What bias might explain this without chat causing churn?

Resources:
- [Simpson's paradox](https://en.wikipedia.org/wiki/Simpson%27s_paradox) (Wikipedia)
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)

### Estimation and Confidence Intervals

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/confidence-intervals

Quantifying uncertainty around estimates with standard errors and confidence intervals, and reporting them plainly.

A single number hides uncertainty. "Conversion is 4.2%" means little until you know whether that came from 100 or 100,000 visitors. Confidence intervals express that uncertainty.

#### The idea
- The **standard error** measures how much an estimate would vary across repeated samples. For a mean it is the standard deviation divided by the square root of n.
- A **95% confidence interval** is roughly the estimate plus or minus 1.96 standard errors.
- For a proportion p with n observations, the standard error is sqrt(p(1-p)/n).

#### Interpreting correctly
The precise meaning: if we repeated the sampling many times, 95% of intervals built this way would contain the true value. In practice, say "our best estimate is 4.2%, and values between 3.8% and 4.6% are consistent with the data."

#### Useful habits
- Show intervals as error bars on charts comparing segments.
- If two segments' intervals overlap heavily, do not rank them confidently.
- For skewed data or medians, use the **bootstrap**: resample your data with replacement thousands of times and take the middle 95% of the resulting estimates. It is easy in Python and works for almost any statistic.

**Pitfall:** saying "there is a 95% probability the true value is in this interval" in a technical review; it is a common but imprecise phrasing. Also, intervals only cover sampling noise, not bias. Move on when you can compute and explain an interval for a conversion rate by hand.

Key concepts: Standard error, Confidence interval for a mean, Confidence interval for a proportion, Interpreting intervals in plain language, Bootstrap resampling, Error bars on charts.

Mini project: For the Titanic passenger dataset on Kaggle, compute survival rates with 95% confidence intervals by passenger class and plot them with error bars.

Self-check: If you quadruple your sample size, what happens to the width of a confidence interval?

Resources:
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)
- [Seeing Theory](https://seeing-theory.brown.edu/) (Brown University)

### Hypothesis Testing and p-values

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/hypothesis-testing

Using significance tests to judge whether an observed difference is likely real, and avoiding the common misreadings.

Hypothesis testing asks: if there were really no difference, how surprising would our data be?

#### The mechanics
1. State a **null hypothesis** (no difference) and an **alternative**.
2. Choose a significance level, often 0.05.
3. Compute a test statistic and its **p-value**: the probability of seeing a result at least this extreme if the null were true.
4. If p is below the threshold, reject the null; otherwise, you failed to find evidence (which is not proof of no effect).

#### Choosing a test
- Compare two means: **t-test** (Welch's version by default).
- Compare two proportions: **two-proportion z-test** or **chi-square test**.
- Relationship between two categorical variables: **chi-square test of independence**.
- Skewed data, small samples: **Mann-Whitney U** or bootstrap.
- More than two groups: **ANOVA**, then pairwise comparisons.

#### Errors and power
- **Type I error**: false positive. **Type II error**: missed a real effect.
- **Power** is the chance of detecting an effect of a given size; it depends on sample size and noise.
- **Practical significance** matters more than statistical significance: a 0.01% lift can be "significant" with millions of rows yet worthless.

**Pitfalls:** testing many metrics or segments and reporting the one that hit p < 0.05 (multiple comparisons), and reading p as "probability the null is true". Move on when you can pick a test for a scenario and explain its result to a non-technical colleague in two sentences.

Key concepts: Null and alternative hypotheses, p-values and significance levels, t-tests, Chi-square and proportion tests, Non-parametric tests, Type I and II errors, power, Multiple comparisons, Practical vs statistical significance, ANOVA.

Mini project: Using the Kaggle 'Students Performance in Exams' dataset, test whether test-preparation course completion is associated with higher maths scores, and report effect size alongside the p-value.

Self-check: A p-value of 0.03: what does it tell you, and what does it NOT tell you?

Resources:
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)
- [statsmodels documentation](https://www.statsmodels.org/stable/index.html) (statsmodels)

### Correlation, Causation and Confounding

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/correlation-causation

Measuring relationships between variables and reasoning carefully about whether one actually causes the other.

Stakeholders almost always want causal answers ("did the campaign increase sales?") while most business data only shows associations. Bridging that gap carefully is a core analyst skill.

#### Measuring association
- **Pearson correlation** measures linear relationships between two numeric variables, from -1 to 1.
- **Spearman correlation** uses ranks; better for monotonic but non-linear or outlier-heavy data.
- Always plot a scatter first. Very different patterns can produce the same correlation coefficient (see Anscombe's quartet).

#### Why correlation is not causation
- **Confounders**: a third factor drives both (hot weather drives ice cream sales and sunburn).
- **Reverse causation**: loyal customers use more features, not necessarily the other way round.
- **Selection effects** and coincidence in large searches for patterns.

#### Getting closer to causality
- **Randomised experiments** (A/B tests) are the most reliable.
- **Natural experiments** and **difference-in-differences**: compare changes over time between affected and unaffected groups.
- **Controlling for confounders** with segmentation or regression, while accepting you can only control for what you measured.

#### Language matters
Say "users who did X were 20% more likely to Y" rather than "X increases Y by 20%" unless you have causal evidence.

**Pitfall:** recommending big investments based on a correlation in observational data. Move on when you can list at least two alternative explanations for any correlation someone shows you.

Key concepts: Pearson and Spearman correlation, Scatter plots and Anscombe's quartet, Confounding variables, Reverse causation, Difference-in-differences, Causal language in reporting.

Mini project: Using Gapminder or Our World in Data country indicators, find a strong correlation (e.g. internet usage vs life expectancy) and write up at least three alternative explanations and what data could separate them.

Self-check: Customers who use the mobile app spend more. List two reasons this might be true even if the app itself causes no extra spending.

Resources:
- [Correlation does not imply causation](https://en.wikipedia.org/wiki/Correlation_does_not_imply_causation) (Wikipedia)
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)

### Linear and Logistic Regression for Analysts

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/regression-basics

Using regression to quantify relationships, control for other factors, and interpret coefficients honestly.

Regression fits a line (or surface) through data to describe how an outcome changes with one or more inputs. For analysts it is primarily an explanation tool, not a black-box predictor.

#### Linear regression
- Models a numeric outcome: price, revenue, time spent.
- Each **coefficient** is the expected change in the outcome for a one-unit change in that input, holding the others constant.
- **R-squared** says how much variation is explained; low R-squared is normal for human behaviour and does not make a model useless.
- Check **residual plots** for patterns that suggest a missing variable or non-linear shape.

#### Logistic regression
Models a yes/no outcome such as churn or conversion. Coefficients are in log-odds; exponentiate them to get odds ratios, which are easier to explain.

#### Practical tips
- Encode categories as dummy variables and remember one level is the baseline.
- Log-transform skewed variables like income or revenue.
- Watch for **multicollinearity**: highly correlated inputs make individual coefficients unstable.
- Report confidence intervals on coefficients, not just point estimates.

#### Tools
Excel's Analysis ToolPak and LINEST work for small cases. In Python, **statsmodels** gives readable summary tables; **scikit-learn** focuses on prediction.

**Pitfall:** interpreting a coefficient as causal just because other variables were "controlled for". Move on when you can fit a multiple regression and explain two coefficients in plain English with their uncertainty.

Key concepts: Simple and multiple linear regression, Interpreting coefficients, R-squared and residuals, Dummy variables, Logistic regression and odds ratios, Log transforms, Multicollinearity.

Mini project: Fit a multiple regression on the Kaggle House Prices (Ames Housing) dataset explaining sale price with size, quality and neighbourhood, and write a short memo interpreting three coefficients.

Self-check: What does it mean when a coefficient's confidence interval includes zero?

Resources:
- [statsmodels documentation](https://www.statsmodels.org/stable/index.html) (statsmodels)
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)
- [Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)

### A/B Testing and Experiment Design

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/ab-testing

Designing, sizing, running and analysing controlled experiments so product and marketing decisions rest on causal evidence.

An A/B test randomly splits users between a control and one or more variants, then compares outcomes. Randomisation is what lets you claim causality.

#### Before launch
- **Hypothesis and primary metric**: one metric decides the test; others are guardrails (e.g. refunds, page load time).
- **Unit of randomisation**: user, session, account, or region. Randomise at the level where the effect happens.
- **Minimum detectable effect and sample size**: decide the smallest lift worth detecting, then compute required sample size for your power (often 80%). Online calculators make this quick.
- **Duration**: run whole weeks to cover weekday patterns; fix the end date in advance.

#### During the test
- Check **sample ratio mismatch**: if you expected 50/50 and got 52/48 with large numbers, something is broken.
- Avoid **peeking**: repeatedly checking and stopping at the first significant result inflates false positives. Use fixed horizons or sequential methods designed for peeking.

#### Analysis
- Compare the primary metric with a confidence interval for the difference.
- Look at guardrails and a few pre-planned segments; treat unplanned segment wins as hypotheses for a new test.
- Watch for **novelty effects** and network effects where users influence each other.

**Pitfall:** declaring "no difference" from an underpowered test. Absence of evidence is not evidence of absence. Move on when you can write a complete test plan including sample size and decision rule.

Key concepts: Randomisation and control groups, Primary and guardrail metrics, Sample size and minimum detectable effect, Sample ratio mismatch, Peeking and sequential testing, Segment analysis without p-hacking, Novelty and network effects, Bayesian A/B testing.

Mini project: Analyse the public Kaggle 'Cookie Cats' mobile game A/B test dataset: check sample ratio, compare day-1 and day-7 retention between variants with confidence intervals, and write a launch recommendation.

Self-check: Why does stopping a test as soon as p drops below 0.05 increase your false positive rate?

Resources:
- [Evan Miller's A/B testing tools](https://www.evanmiller.org/ab-testing/) (Evan Miller)
- [OpenIntro Statistics](https://www.openintro.org/book/os/) (OpenIntro)
- [Kaggle Learn](https://www.kaggle.com/learn) (Kaggle)

## Querying Data with SQL

The analyst's primary language: from filtering and joins through CTEs, window functions, dates and performance.

### SQL Basics: SELECT, WHERE, ORDER BY

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-select-filter

Reading tables with SELECT, filtering rows, sorting, limiting and handling NULLs correctly.

SQL is the language you will use most as an analyst. Nearly all company data lives in relational databases or warehouses, and SQL is how you ask them questions.

#### The shape of a query
```sql
SELECT customer_id, order_date, amount
FROM orders
WHERE status = 'completed'
  AND order_date >= '2024-01-01'
ORDER BY amount DESC
LIMIT 20;
```

- **SELECT** picks columns; use aliases (`amount AS revenue`) and expressions (`amount * 0.9`).
- **WHERE** filters rows with `=`, `<>`, `>`, `BETWEEN`, `IN (...)`, `LIKE 'abc%'`.
- **ORDER BY** sorts; **LIMIT** (or `TOP`, `FETCH FIRST`) caps rows.
- **DISTINCT** removes duplicate rows from the result.
- **CASE WHEN** creates derived categories inside a query.

#### NULL is special
NULL means unknown. `WHERE discount = NULL` never matches; use `IS NULL` / `IS NOT NULL`. Comparisons with NULL return unknown, so `WHERE status <> 'cancelled'` silently drops rows where status is NULL. `COALESCE(col, 0)` substitutes defaults.

#### Order of evaluation
SQL runs roughly FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT. That explains why you usually cannot use a SELECT alias in WHERE.

**Pitfall:** `SELECT *` on huge warehouse tables, which is slow and, in pay-per-byte warehouses, expensive. Move on when you can write filtered, sorted queries with CASE and NULL handling without looking anything up.

Key concepts: SELECT, aliases, expressions, WHERE with IN, BETWEEN, LIKE, ORDER BY and LIMIT, DISTINCT, CASE WHEN, NULL, IS NULL, COALESCE, Logical query evaluation order.

Mini project: Load the Chinook sample database into SQLite or PostgreSQL and answer 10 questions such as 'the 20 longest tracks in the Rock genre' and 'invoices over 10 dollars from Canada'.

Self-check: Why does WHERE status <> 'cancelled' exclude rows where status is NULL?

Resources:
- [SQLBolt interactive lessons](https://sqlbolt.com/) (SQLBolt)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)
- [Intro to SQL](https://www.kaggle.com/learn/intro-to-sql) (Kaggle)

### Aggregation with GROUP BY and HAVING

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-aggregation

Summarising data with COUNT, SUM, AVG and friends, grouping by dimensions, and filtering aggregated results.

Aggregation is where SQL starts answering business questions: revenue per month, users per country, average basket size per channel.

#### The pattern
```sql
SELECT country,
       COUNT(*) AS orders,
       COUNT(DISTINCT customer_id) AS customers,
       SUM(amount) AS revenue,
       SUM(amount) / COUNT(DISTINCT customer_id) AS revenue_per_customer
FROM orders
WHERE status = 'completed'
GROUP BY country
HAVING COUNT(*) >= 100
ORDER BY revenue DESC;
```

- Every non-aggregated column in SELECT must appear in GROUP BY.
- **WHERE** filters rows before grouping; **HAVING** filters groups after.
- `COUNT(*)` counts rows; `COUNT(col)` skips NULLs; `COUNT(DISTINCT col)` counts unique values.
- `AVG` ignores NULLs, which may or may not be what you want.

#### Conditional aggregation
One of the most useful tricks: pivot inside SQL.
```sql
SUM(CASE WHEN channel = 'mobile' THEN amount ELSE 0 END) AS mobile_revenue
```
Some dialects offer `COUNT(*) FILTER (WHERE ...)` (PostgreSQL) or `COUNTIF` (BigQuery).

#### Sanity checks
Compare your grouped totals to an ungrouped total. If the sum of segments does not match, you have duplicates, NULL groups, or filters in the wrong place.

**Pitfall:** integer division (`5 / 2 = 2` in some databases). Cast to decimal before dividing ratios. Move on when you can produce a multi-metric summary table with conditional aggregation in one query.

Key concepts: COUNT, SUM, AVG, MIN, MAX, GROUP BY multiple columns, HAVING vs WHERE, COUNT DISTINCT, Conditional aggregation with CASE, Integer division and casting, ROLLUP and GROUPING SETS.

Mini project: With the Chinook database, produce a single table of revenue, invoice count, distinct customers and average invoice value per country per year, only for countries with at least 10 invoices.

Self-check: What is the difference between COUNT(*), COUNT(email) and COUNT(DISTINCT email)?

Resources:
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)
- [SQLBolt](https://sqlbolt.com/) (SQLBolt)
- [PostgreSQL tutorial](https://www.postgresql.org/docs/current/tutorial.html) (PostgreSQL)

### Joins and Combining Tables

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-joins

INNER, LEFT, FULL and self joins, set operations, and how to avoid the row-duplication bugs that ruin totals.

Real questions span tables: orders need customers, products and campaigns. Joins connect them through keys.

#### Join types
- **INNER JOIN**: only rows with a match on both sides.
- **LEFT JOIN**: every row from the left table, with NULLs where the right has no match. The analyst's default when you must not lose records.
- **FULL OUTER JOIN**: everything from both sides; useful for reconciling two sources.
- **CROSS JOIN**: every combination; handy for building date-by-product grids.
- **Self join**: a table joined to itself, e.g. employees to their managers.

#### Anti joins and set operations
Find customers with no orders using `LEFT JOIN ... WHERE o.id IS NULL` or `NOT EXISTS`. `UNION ALL` stacks results with the same columns; `UNION` also removes duplicates (and costs more). `INTERSECT` and `EXCEPT` compare sets.

#### Grain and fan-out
Every table has a **grain**: what one row represents. Joining orders (one row per order) to order_items (many per order) changes the grain, and summing order-level amounts afterwards double-counts. Before joining, ask: "is this key unique on the right side?" Aggregate first, then join, when grains differ.

#### Filter placement
With LEFT JOIN, a condition on the right table in WHERE turns it into an inner join. Put such conditions in the ON clause instead.

**Pitfall:** trusting a join without checking row counts before and after. Move on when you can predict the row count of a join before running it.

Key concepts: INNER and LEFT JOIN, FULL OUTER and CROSS JOIN, Self joins, Anti joins and NOT EXISTS, UNION ALL, INTERSECT, EXCEPT, Table grain and fan-out, ON vs WHERE with outer joins, Joining on multiple keys.

Mini project: Using the Brazilian E-Commerce (Olist) dataset on Kaggle, join orders, items, products and reviews to compute average review score by product category without double-counting orders.

Self-check: You LEFT JOIN customers to orders and add WHERE orders.status = 'paid'. Why did customers with no orders disappear?

Resources:
- [SQLBolt](https://sqlbolt.com/) (SQLBolt)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)
- [PostgreSQL tutorial: joins](https://www.postgresql.org/docs/current/tutorial-join.html) (PostgreSQL)

### Subqueries and CTEs

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-subqueries-ctes

Structuring multi-step logic with subqueries and common table expressions so complex queries stay readable and testable.

Most real analyses need several steps: find each user's first order, then group users by that month, then compute retention. Subqueries and CTEs let you express those steps.

#### Subqueries
- **Scalar subquery**: returns one value, e.g. `WHERE amount > (SELECT AVG(amount) FROM orders)`.
- **IN / EXISTS subquery**: filters by membership.
- **Derived table**: a subquery in FROM that you treat like a table.
- **Correlated subquery**: references the outer row; powerful but can be slow.

#### Common table expressions
```sql
WITH first_orders AS (
  SELECT customer_id, MIN(order_date) AS first_order_date
  FROM orders
  GROUP BY customer_id
),
monthly AS (
  SELECT DATE_TRUNC('month', first_order_date) AS cohort_month,
         COUNT(*) AS new_customers
  FROM first_orders
  GROUP BY 1
)
SELECT * FROM monthly ORDER BY cohort_month;
```
CTEs read top to bottom like a recipe. Name each one for what it contains, keep each step small, and run them individually while debugging.

#### Recursive CTEs
`WITH RECURSIVE` walks hierarchies (org charts, category trees) or generates series. Occasionally useful; not daily work.

**Pitfalls:** deeply nested subqueries no one can read, and huge CTE chains that repeat the same scan. Move on when you can refactor a nested query into named CTE steps and validate each step's row count.

Key concepts: Scalar and IN subqueries, EXISTS and correlated subqueries, Derived tables, WITH clauses (CTEs), Structuring multi-step logic, Recursive CTEs.

Mini project: Using the Olist dataset, write a CTE-based query that finds each customer's first purchase month and counts how many of them bought again within 90 days.

Self-check: When would you choose EXISTS over IN, and what NULL-related trap does NOT IN have?

Resources:
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)
- [PostgreSQL: WITH queries](https://www.postgresql.org/docs/current/queries-with.html) (PostgreSQL)
- [Advanced SQL](https://www.kaggle.com/learn/advanced-sql) (Kaggle)

### Window Functions

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-window-functions

Ranking, running totals, moving averages and period-over-period comparisons without collapsing rows.

Window functions compute across a set of related rows while keeping every row. They unlock questions that are painful with GROUP BY alone.

#### Syntax
```sql
SELECT order_id, customer_id, order_date, amount,
       ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date) AS order_seq,
       SUM(amount)  OVER (PARTITION BY customer_id ORDER BY order_date) AS running_spend
FROM orders;
```
- **PARTITION BY** defines groups (like GROUP BY without collapsing).
- **ORDER BY** inside OVER defines the sequence.
- A **frame** (`ROWS BETWEEN 6 PRECEDING AND CURRENT ROW`) defines a sliding window.

#### The toolkit
- **Ranking**: `ROW_NUMBER`, `RANK`, `DENSE_RANK`, `NTILE`. Top N per group and deduplication ("keep the latest row per id").
- **Offsets**: `LAG`, `LEAD` for month-over-month change and time between events.
- **Aggregates over windows**: running totals, moving averages, percent of total (`amount / SUM(amount) OVER ()`).
- **FIRST_VALUE / LAST_VALUE**: careful, LAST_VALUE needs an explicit frame to behave as expected.

#### Filtering on window results
You cannot use a window function in WHERE; wrap it in a CTE and filter outside. Some warehouses support `QUALIFY` for this.

**Pitfall:** confusing RANK and ROW_NUMBER when ties exist, and the default frame with ORDER BY being "range up to current row", which groups ties together. Move on when you can write a month-over-month growth query and a top-3-per-category query from memory.

Key concepts: OVER, PARTITION BY, ORDER BY, ROW_NUMBER, RANK, DENSE_RANK, LAG and LEAD, Running totals and moving averages, Window frames, Percent of total, Deduplication with ROW_NUMBER, QUALIFY clause.

Mini project: With a public daily sales or Citi Bike trips table, compute daily totals, a 7-day moving average, week-over-week change and each station's rank within its borough.

Self-check: How would you keep only the most recent record per customer from a table with many updates per customer?

Resources:
- [PostgreSQL: window functions tutorial](https://www.postgresql.org/docs/current/tutorial-window.html) (PostgreSQL)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)
- [Advanced SQL](https://www.kaggle.com/learn/advanced-sql) (Kaggle)

### Dates, Times and Text in SQL

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-dates-strings

Truncating and bucketing dates, handling time zones, building calendars, and cleaning text inside queries.

Almost every analysis groups by time, and date logic is where subtle bugs hide.

#### Dates
- **Truncate** to periods: `DATE_TRUNC('month', created_at)` (PostgreSQL, Snowflake), `DATE_TRUNC(created_at, MONTH)` (BigQuery).
- **Extract** parts: `EXTRACT(DOW FROM ts)`, year, hour.
- **Arithmetic**: `created_at + INTERVAL '7 days'`, `DATE_DIFF`, `AGE`.
- **Casting**: turn strings to dates with `CAST` or `TO_DATE`, and timestamps to dates when you only need the day.

#### Time zones
Timestamps are often stored in UTC. A "day" for a business in India or California starts at a different UTC hour. Convert before truncating, or daily totals shift across midnight.

#### Gaps in time series
If no orders happened on a day, GROUP BY simply skips it and charts connect the gap misleadingly. Generate a **date spine** (`generate_series` in PostgreSQL, `GENERATE_DATE_ARRAY` in BigQuery, or a calendar table) and LEFT JOIN your data onto it.

#### Inclusive vs exclusive ranges
Prefer `created_at >= '2024-03-01' AND created_at < '2024-04-01'` over BETWEEN with timestamps, which misses events after midnight on the last day.

#### Text
`LOWER`, `TRIM`, `REPLACE`, `SUBSTRING`, `SPLIT_PART`, `CONCAT`, `LIKE`/`ILIKE`, and regular expression functions for extracting patterns such as UTM parameters from URLs.

**Pitfall:** mixing dialect syntax; keep your warehouse's function reference open. Move on when you can produce a gap-free daily series in the correct local time zone.

Key concepts: DATE_TRUNC and EXTRACT, Date arithmetic and intervals, Time zones and UTC, Date spines and calendar tables, Half-open date ranges, String functions, Regular expressions in SQL.

Mini project: Using NYC taxi trip data (available as a BigQuery public dataset), compute trips per local hour of day and per weekday for one month, with a date spine so no hour is missing.

Self-check: Why can BETWEEN '2024-03-01' AND '2024-03-31' undercount events stored as timestamps?

Resources:
- [PostgreSQL: date/time functions](https://www.postgresql.org/docs/current/functions-datetime.html) (PostgreSQL)
- [PostgreSQL: string functions](https://www.postgresql.org/docs/current/functions-string.html) (PostgreSQL)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial/) (Mode)

### Writing Efficient and Readable SQL

recommended · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-performance

Understanding query plans, indexes, partitions and warehouse costs, plus style habits that make SQL reviewable.

As tables grow into billions of rows, a careless query can run for an hour or cost real money. You do not need to be a database administrator, but you should know the main levers.

#### Reading the plan
`EXPLAIN` (and `EXPLAIN ANALYZE` in PostgreSQL) shows how the database executes your query: which tables are scanned, which joins are used, where time goes. Look for full scans of big tables and row estimates wildly different from actual rows.

#### Levers that matter
- **Filter early** and select only needed columns, especially in columnar warehouses billed by bytes scanned.
- **Indexes** (row databases like PostgreSQL) speed up filters and joins on indexed columns.
- **Partitioning and clustering** (BigQuery, Snowflake, Redshift): filter on the partition column (usually a date) so the engine skips most data.
- **Avoid functions on filtered columns** where possible: `WHERE DATE(created_at) = ...` can block index or partition pruning; use a range instead.
- **Aggregate before joining** large tables, and avoid accidental cross joins.
- Prefer `UNION ALL` over `UNION` when duplicates are impossible.

#### Readable SQL
- One clause per line, consistent indentation, lowercase or uppercase keywords but not both.
- Meaningful CTE names and table aliases, not `a`, `b`, `c`.
- Comments explaining business logic ("exclude internal test accounts").

**Pitfall:** optimising before the query is correct. Correct first, then fast. Move on when you can read a basic EXPLAIN output and explain why one version of a query scans less data than another.

Key concepts: EXPLAIN and EXPLAIN ANALYZE, Indexes, Partition pruning and clustering, Sargable filters, Columnar storage and bytes scanned, SQL style guides.

Mini project: Load a million-row public dataset (e.g. NYC taxi trips for one month) into PostgreSQL, time a filtered aggregation before and after adding an index, and compare the EXPLAIN ANALYZE output.

Self-check: Why might WHERE DATE(created_at) = '2024-05-01' be slower than a half-open range on created_at?

Resources:
- [PostgreSQL: using EXPLAIN](https://www.postgresql.org/docs/current/using-explain.html) (PostgreSQL)
- [PostgreSQL: indexes](https://www.postgresql.org/docs/current/indexes.html) (PostgreSQL)
- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)

## Databases, Warehouses and Data Modelling

Where analytical data lives, how it is organised into models like star schemas, and how cloud warehouses differ.

### Relational Databases with PostgreSQL

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/relational-databases

Tables, keys, types and constraints in a real database, and how to load and explore data locally with PostgreSQL.

Having your own database to practise on changes how quickly you learn SQL. PostgreSQL is free, standards-compliant and widely used, so it makes an excellent home lab.

#### Core concepts
- **Tables** of typed columns: `integer`, `numeric`, `text`, `date`, `timestamp with time zone`, `boolean`, `jsonb`.
- **Primary keys** uniquely identify rows; **foreign keys** link tables and enforce that referenced rows exist.
- **Constraints** (`NOT NULL`, `UNIQUE`, `CHECK`) encode business rules in the database itself.
- **Schemas** group tables (e.g. `raw`, `staging`, `analytics`).

#### Getting data in
- `CREATE TABLE` then `COPY` (or psql's `\copy`) from CSV.
- GUI clients like pgAdmin or DBeaver help you browse tables and run queries.
- Alternatives for quick local work: **SQLite** (a single file) and **DuckDB** (fast analytical SQL directly on CSV and Parquet files).

#### Views and permissions
Views save a query as a virtual table, great for sharing a cleaned dataset. As an analyst you usually have read-only access to production replicas or warehouses, which is a good thing: never run exploratory queries against a live transactional database without permission.

#### OLTP vs OLAP
Transactional (OLTP) databases handle many small reads and writes for apps. Analytical (OLAP) systems handle big scans and aggregations. The same SQL works in both, but the performance characteristics differ.

**Pitfall:** storing numbers or dates as text on import, which breaks sorting and maths. Move on when you can create tables with sensible types and load a CSV into them.

Key concepts: Tables and data types, Primary and foreign keys, Constraints, Loading CSV with COPY, Views, SQL clients: pgAdmin, DBeaver, SQLite and DuckDB for local work, OLTP vs OLAP.

Mini project: Install PostgreSQL, design three tables for a public dataset (e.g. Olist customers, orders, items), load the CSVs with COPY, add keys, and create a view of completed orders with customer city.

Self-check: What does a foreign key protect you from, and why might analytics tables in a warehouse skip them?

Resources:
- [PostgreSQL tutorial](https://www.postgresql.org/docs/current/tutorial.html) (PostgreSQL)
- [DuckDB documentation](https://duckdb.org/docs/) (DuckDB)

### Data Modelling: Normalization and Star Schemas

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/data-modelling

How tables are designed for applications versus analytics, including normal forms, facts, dimensions and slowly changing data.

Data modelling is deciding how data is split into tables. Understanding it helps you find the right table quickly, join correctly, and eventually design tables yourself.

#### Normalization (application databases)
Normalization removes redundancy so each fact is stored once. In practice:
- **1NF**: atomic values, no repeating groups (no "tag1, tag2, tag3" in one cell).
- **2NF / 3NF**: every non-key column depends on the key, the whole key, and nothing but the key.
This keeps writes consistent, but answering questions requires many joins.

#### Dimensional modelling (analytics)
Warehouses often use a **star schema**:
- **Fact tables** hold events or measurements at a defined grain: one row per order line, per page view, per daily account snapshot. They contain foreign keys and numeric measures.
- **Dimension tables** describe the who, what, where and when: customers, products, stores, dates. They are wide and denormalised for easy filtering.
- A **snowflake schema** normalises dimensions further; simpler stars are usually preferred for BI.

#### Useful concepts
- **Grain** first: declare what one fact row means before anything else.
- **Surrogate keys** vs natural keys.
- **Slowly changing dimensions**: type 1 overwrites, type 2 keeps history with valid-from and valid-to dates, so last year's sales stay attributed to last year's region.
- **Wide flat tables** (one big denormalised table) are also common in modern warehouses and BI.

**Pitfall:** joining a fact to a type 2 dimension without a date condition, which multiplies rows. Move on when you can sketch a star schema for a business you know, naming the grain of each fact.

Key concepts: Normal forms 1NF to 3NF, Fact and dimension tables, Star vs snowflake schema, Declaring grain, Surrogate and natural keys, Slowly changing dimensions, Wide denormalised tables, Entity relationship diagrams.

Mini project: Redesign the Chinook database (normalised) into a star schema with a sales fact at invoice-line grain plus customer, track and date dimensions, and write the SQL to build it.

Self-check: What is the grain of your fact table, and why must you decide it before choosing columns?

Resources:
- [Star schema](https://en.wikipedia.org/wiki/Star_schema) (Wikipedia)
- [Database normalization](https://en.wikipedia.org/wiki/Database_normalization) (Wikipedia)
- [Kimball dimensional modeling techniques](https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/) (Kimball Group)

### Cloud Data Warehouses

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/cloud-warehouses

How BigQuery, Snowflake and Redshift store and bill for analytical data, and what changes when you query them.

Most modern companies centralise analytics data in a cloud warehouse. You will likely use one of three: **BigQuery** (Google Cloud), **Snowflake** (multi-cloud) or **Amazon Redshift** (AWS). Databricks SQL and other lakehouse engines are also common. The SQL is largely the same; the differences are in architecture, dialect and cost.

#### What makes warehouses different
- **Columnar storage**: only the columns you select are read, so `SELECT *` is expensive and narrow queries are cheap.
- **Separation of storage and compute**: many users can query the same data concurrently.
- **Massive parallelism**: billions of rows aggregate in seconds.
- **Semi-structured data**: JSON, arrays and nested records are first-class (BigQuery's `UNNEST`, Snowflake's `VARIANT` and `FLATTEN`).

#### Cost awareness
- BigQuery on-demand bills by bytes scanned; always check the estimate before running and use partitioned tables.
- Snowflake bills for warehouse (compute) time; suspend idle warehouses.
- Redshift bills for cluster or serverless capacity.
Preview a table instead of `SELECT * LIMIT 10`, which may still scan the whole thing in some engines.

#### Getting hands-on for free
BigQuery's sandbox and public datasets (Google Analytics sample, NYC taxis, Stack Overflow) let you practise real warehouse SQL at no cost. Snowflake offers a free trial.

#### Typical layers
Raw data lands via ingestion tools, gets cleaned into staging models, then into business-ready marts. Analysts mostly query the marts, which is the analytics engineering topic later in this track.

**Pitfall:** assuming every function name works across warehouses. Move on when you have run queries against a BigQuery public dataset and can explain what drives its cost.

Key concepts: BigQuery, Snowflake, Amazon Redshift, Columnar storage, Cost models and query estimates, Nested and JSON data, UNNEST, Raw, staging and mart layers, Lakehouses and Databricks SQL.

Mini project: In the BigQuery sandbox, query the public Google Analytics sample or Stack Overflow dataset to find monthly trends, noting the bytes processed for each query and reducing it by selecting fewer columns.

Self-check: Why does adding LIMIT 10 not necessarily reduce the cost of a BigQuery query?

Resources:
- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [Snowflake documentation](https://docs.snowflake.com/) (Snowflake)
- [Amazon Redshift documentation](https://docs.aws.amazon.com/redshift/) (AWS)

## Programming for Analysis

A scripting language for analysis that outgrows spreadsheets: Python (or R), notebooks, NumPy and pandas.

### Python for Analysts

recommended · beginner · about 15 h · https://www.internhack.in/roadmaps/tracks/data-analyst/python-for-analysis

The Python you actually need for analysis: types, collections, control flow, functions, files and packages.

Python lets you handle data too big or messy for spreadsheets, repeat analyses automatically, and use a huge ecosystem of statistics and visualisation libraries. You do not need to become a software engineer; you need a solid working core.

#### The core you need
- **Values and types**: int, float, str, bool, None. f-strings for formatting: `f"{rate:.1%}"`.
- **Collections**: lists, dicts, tuples, sets. Dicts map keys to values and show up everywhere, including JSON from APIs.
- **Control flow**: `if`, `for`, `while`, and list or dict comprehensions.
- **Functions**: parameters, return values, default arguments. Wrap repeated logic in a function.
- **Files and paths**: reading CSV and JSON, `pathlib` for paths.
- **Errors**: read tracebacks from the bottom up; use `try/except` sparingly.

#### Environment
- Install Python via the official installer or a distribution like Anaconda/Miniconda.
- Use **virtual environments** (`python -m venv .venv`) and `pip install pandas` so each project has its own packages.
- Write code in VS Code or Jupyter.

#### Mindset
In analysis you will mostly call libraries rather than write loops. If you find yourself looping over rows of a DataFrame, there is usually a vectorised pandas way.

**Pitfall:** trying to learn "all of Python" before touching data. Spend a week or two on the basics, then learn the rest through pandas work. Move on when you can write a small script that reads a CSV, filters rows with a function, and writes a summary file.

Key concepts: Types, variables, f-strings, Lists, dicts, sets, tuples, Loops and comprehensions, Functions, Reading files and JSON, Virtual environments and pip, Reading tracebacks, Calling APIs with requests.

Mini project: Write a Python script that downloads a public CSV (e.g. a city's open data portal dataset), counts rows per category using only the standard library, and writes the result to a new CSV.

Self-check: When would you use a dict instead of a list, and how would you count occurrences of each category with one?

Resources:
- [The Python Tutorial](https://docs.python.org/3/tutorial/) (Python.org)
- [Kaggle Python course](https://www.kaggle.com/learn/python) (Kaggle)
- [Data Analysis with Python](https://www.freecodecamp.org/learn/data-analysis-with-python/) (freeCodeCamp)

### R and the Tidyverse

alternative · beginner · about 15 h · https://www.internhack.in/roadmaps/tracks/data-analyst/r-for-analysis

An alternative analysis language with first-class statistics and the tidyverse for readable data pipelines.

R was built by statisticians for data analysis. It is common in academia, healthcare, pharma, public policy and some finance teams. If your target employers use R, it is an equally valid first language; otherwise Python has the broader job market.

#### Why people love R
- **Tidyverse**: a consistent set of packages. `dplyr` for manipulation (`filter`, `select`, `mutate`, `group_by`, `summarise`), `tidyr` for reshaping, `readr` for import, `ggplot2` for graphics.
- **The pipe** (`|>` or `%>%`) chains steps into readable pipelines.
- **ggplot2** is one of the best static plotting systems in any language, based on the grammar of graphics.
- **Statistics built in**: `lm`, `glm`, `t.test` and thousands of CRAN packages for specialised methods.
- **Quarto / R Markdown**: combine code, output and prose into reports and slides.

#### Getting started
Install R and the RStudio (Posit) IDE, then `install.packages("tidyverse")`. Work through the free book R for Data Science.

#### Choosing
Pick one language and go deep before learning the other. Concepts (tidy data, grouping, joins, plotting grammar) transfer directly, so switching later is not wasted effort.

**Pitfall:** mixing base R and tidyverse styles randomly while learning. Stick to tidyverse at first. Move on when you can import, clean, summarise and plot a dataset with a single readable pipeline.

Key concepts: R and RStudio setup, Vectors and data frames, dplyr verbs, tidyr reshaping, ggplot2, Pipes, Quarto and R Markdown reports.

Mini project: Using the palmerpenguins dataset in R, produce a Quarto report that summarises body mass by species and sex and includes two ggplot2 charts.

Self-check: What does group_by followed by summarise produce, and how is it similar to SQL GROUP BY?

Resources:
- [R for Data Science (2e)](https://r4ds.hadley.nz/) (Hadley Wickham et al.)
- [Tidyverse](https://www.tidyverse.org/) (Posit)
- [Quarto](https://quarto.org/) (Posit)

### Jupyter Notebooks and Reproducible Work

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/jupyter-notebooks

Using notebooks to explore data interactively while keeping analyses organised, rerunnable and shareable.

Notebooks mix code, output, charts and text in one document. They are ideal for exploration and for sharing analyses with other technical people.

#### Using Jupyter well
- Run in **JupyterLab**, **VS Code**, or hosted options like **Google Colab** and **Kaggle Notebooks** (free, no install).
- Use Markdown cells for headings and explanations; a notebook should read like a short report.
- Learn keyboard shortcuts: Shift+Enter to run, A/B to add cells, M for Markdown.
- Display DataFrames and charts inline for quick feedback.

#### Reproducibility habits
- **Restart and Run All** before sharing. Cells run out of order are the number one notebook bug: the output you see may depend on state that no longer exists.
- Put imports and configuration at the top; keep paths relative.
- Record package versions in a `requirements.txt`.
- Move reusable functions into a `.py` file and import them.
- Keep raw data read-only; write cleaned outputs to a separate folder.

#### Project layout
A simple structure goes a long way: `data/raw`, `data/processed`, `notebooks/`, `src/`, `reports/`. Number notebooks in order (`01-clean.ipynb`, `02-eda.ipynb`).

**Pitfall:** one 300-cell notebook that nobody, including future you, can follow. Move on when a colleague can clone your folder, install requirements, and rerun your notebook top to bottom to get the same results.

Key concepts: JupyterLab and VS Code notebooks, Google Colab and Kaggle Notebooks, Markdown cells, Restart and Run All, requirements.txt, Project folder structure.

Mini project: Turn your earlier Python script into a documented notebook with headings, explanations and inline charts, then confirm it runs cleanly after Restart and Run All.

Self-check: Why can a notebook show correct results yet fail when someone else runs it from the top?

Resources:
- [Project Jupyter documentation](https://docs.jupyter.org/en/latest/) (Project Jupyter)
- [Kaggle Learn](https://www.kaggle.com/learn) (Kaggle)

### NumPy Essentials

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/numpy-basics

Arrays, vectorised operations, broadcasting and random numbers: the numerical engine underneath pandas.

NumPy provides fast arrays and vectorised maths. You will rarely build whole analyses in raw NumPy, but pandas is built on it, and understanding arrays makes pandas behaviour less mysterious.

#### Key ideas
- **ndarray**: a fixed-type grid of numbers. `np.array([1, 2, 3])`, `np.arange`, `np.linspace`, `np.zeros`.
- **Vectorisation**: `prices * 1.1` applies to every element at C speed, far faster than a Python loop.
- **Broadcasting**: operations between arrays of different shapes follow rules that let you, for example, subtract a column mean from every row.
- **Boolean masks**: `arr[arr > 100]` selects elements, the same idea as pandas filtering.
- **Aggregations**: `mean`, `median`, `std`, `percentile`, with `axis` to choose rows or columns.
- **Missing values**: `np.nan` propagates through sums; use `np.nanmean` and friends.

#### Random numbers and simulation
`rng = np.random.default_rng(42)` then `rng.normal`, `rng.binomial`, `rng.choice`. Simulation is a great way to build statistical intuition and to bootstrap confidence intervals.

**Pitfall:** integer arrays silently truncating when you assign floats into them, and forgetting that `axis=0` means "down the rows". Move on when you can bootstrap a confidence interval for a median in about 10 lines of NumPy.

Key concepts: Creating arrays, Vectorised operations, Broadcasting, Boolean masking, Aggregations and axis, NaN handling, Random generation and simulation.

Mini project: Simulate 10,000 A/B tests with no true difference using NumPy's random generator and show that about 5% come out 'significant' at the 0.05 level.

Self-check: Why is prices * 1.1 on a NumPy array much faster than a for loop doing the same thing?

Resources:
- [NumPy: the absolute basics for beginners](https://numpy.org/doc/stable/user/absolute_beginners.html) (NumPy)
- [Python Data Science Handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) (Jake VanderPlas)

### pandas for Data Analysis

core · intermediate · about 14 h · https://www.internhack.in/roadmaps/tracks/data-analyst/pandas-core

Loading, selecting, filtering, grouping, joining and summarising tabular data with pandas DataFrames.

pandas is the workhorse of Python analysis. If you know SQL, most of pandas maps onto concepts you already have.

#### Essentials
- **Load**: `pd.read_csv`, `read_excel`, `read_parquet`, `read_sql`. Pass `dtype` and `parse_dates` to avoid type surprises.
- **Inspect**: `df.head()`, `df.info()`, `df.describe()`, `df.shape`, `df["col"].value_counts()`.
- **Select**: columns with `df[["a", "b"]]`; rows by label with `.loc`, by position with `.iloc`.
- **Filter**: `df[df["amount"] > 100]` or `df.query("amount > 100 and country == 'IN'")`.
- **New columns**: `df.assign(margin=df.revenue - df.cost)`.
- **Group and aggregate**: `df.groupby("country").agg(orders=("id", "count"), revenue=("amount", "sum"))`.
- **Join**: `pd.merge(orders, customers, on="customer_id", how="left", validate="many_to_one")`.
- **Sort and rank**: `sort_values`, `rank`, `nlargest`.

#### SQL to pandas
WHERE is boolean filtering, GROUP BY is `groupby`, JOIN is `merge`, window functions are `groupby().transform()`, `shift`, `rolling` and `cumsum`.

#### Method chaining
Chaining steps with parentheses keeps transformations readable and avoids piles of intermediate variables.

**Pitfalls:** the SettingWithCopyWarning (modify with `.loc` or copy explicitly), silent row explosion in merges (use `validate=`), and looping over rows with `iterrows`. Move on when you can reproduce any SQL aggregation you know in pandas.

Key concepts: Reading files with correct dtypes, Inspecting with info, describe, value_counts, loc, iloc and boolean filtering, assign and derived columns, groupby and named aggregation, merge with validate, transform, shift, rolling, Method chaining, Polars as a faster alternative.

Mini project: Using the Olist e-commerce CSVs, build a pandas notebook computing monthly revenue, average delivery time by state and the top 10 product categories by revenue growth.

Self-check: How do you compute each customer's share of their country's total revenue in pandas without collapsing rows?

Resources:
- [pandas user guide](https://pandas.pydata.org/docs/user_guide/) (pandas)
- [Kaggle pandas course](https://www.kaggle.com/learn/pandas) (Kaggle)
- [Python Data Science Handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) (Jake VanderPlas)

## Cleaning, Wrangling and Exploring Data

Turning messy raw data into trustworthy tables, reshaping them for analysis, and exploring them systematically.

### Data Cleaning and Quality Checks

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/data-cleaning

Finding and fixing missing values, duplicates, inconsistent categories, bad types and outliers, and documenting every decision.

Real data is messy. Cleaning is not glamorous, but every insight downstream depends on it. The goal is not perfect data; it is data whose remaining flaws you understand and have disclosed.

#### A cleaning checklist
- **Types**: numbers stored as text, dates in mixed formats, IDs losing leading zeros.
- **Missing values**: count them per column. Decide per case: drop, fill with a sensible default, impute, or keep and flag. Ask why they are missing; missing-not-at-random changes conclusions.
- **Duplicates**: exact duplicates and near duplicates (same customer, different capitalisation). Define what makes a row unique first.
- **Inconsistent categories**: "USA", "U.S.", "United States". Normalise with mapping tables, `str.strip().str.lower()`, and review `value_counts`.
- **Outliers and impossible values**: negative ages, orders dated in 2099, prices of 0. Distinguish errors (fix or remove) from genuine extremes (keep, maybe analyse separately).
- **Test and internal records**: staff accounts, QA orders.

#### Validate as you go
- Row counts before and after each step.
- Totals reconciled against a trusted source (finance report, source system).
- Assertions in code: `assert df["order_id"].is_unique`.

#### Document decisions
Keep a cleaning log: what you changed, why, and how many rows were affected. It protects you when someone asks why your number differs from theirs.

**Pitfall:** filling missing values with zero by default, which silently changes averages. Move on when you can hand over a cleaned dataset with a short log explaining every transformation.

Key concepts: Type fixing and parsing dates, Missing value strategies, Deduplication, Standardising categories and text, Outliers vs errors, Reconciliation and assertions, Cleaning logs, Fuzzy matching.

Mini project: Clean the NYC Airbnb or a messy Kaggle dataset (e.g. 'Data Science Job Salaries' or a scraped listings file): fix types, standardise categories, handle missing values, and publish a cleaning log alongside the final CSV.

Self-check: Why should you ask why values are missing before deciding how to fill them?

Resources:
- [Kaggle Data Cleaning course](https://www.kaggle.com/learn/data-cleaning) (Kaggle)
- [pandas: working with missing data](https://pandas.pydata.org/docs/user_guide/missing_data.html) (pandas)

### Reshaping and Combining Data

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/reshaping-combining

Tidy data principles, wide vs long formats, pivot and melt, concatenation and joins across sources.

The same data can be arranged many ways, and each tool prefers a particular shape. Knowing how to move between shapes quickly saves hours.

#### Tidy data
In a tidy dataset each variable is a column, each observation is a row, and each type of observational unit is a table. Most tools (pandas groupby, ggplot2, BI tools) work best on tidy, **long** data.

#### Wide vs long
- **Wide**: one column per month, per year, per question. Nice for humans, awkward for analysis.
- **Long**: columns like `country`, `year`, `value`. Easy to filter, group and plot.
- pandas: `melt` goes wide to long; `pivot` / `pivot_table` go long to wide. In SQL, UNPIVOT or UNION ALL does the first and conditional aggregation the second. In Power Query, Unpivot Columns.

#### Combining sources
- **Concatenate / append** tables with the same columns (monthly files, regions).
- **Join** on keys; standardise key formats first and check match rates.
- **Explode** list-like columns into rows; **flatten** nested JSON with `pd.json_normalize`.
- **Binning** continuous variables (`pd.cut`) and creating calendar features (week, month, weekday).

**Pitfall:** pivoting data with duplicate index/column pairs, which errors or silently aggregates. Always know whether each key combination is unique. Move on when you can take a wide World Bank indicators file, reshape it long, join it to a second source and plot a multi-country trend.

Key concepts: Tidy data principles, melt: wide to long, pivot and pivot_table, concat and append, Joining with match-rate checks, Nested JSON and explode, Binning and feature derivation.

Mini project: Download World Bank GDP and population indicators (wide format), reshape them long, join them on country and year, compute GDP per capita, and chart five countries over 30 years.

Self-check: Why do plotting and groupby operations usually prefer long rather than wide data?

Resources:
- [Tidy Data (Hadley Wickham, JSS)](https://www.jstatsoft.org/article/view/v059i10) (Journal of Statistical Software)
- [pandas: reshaping and pivot tables](https://pandas.pydata.org/docs/user_guide/reshaping.html) (pandas)

### Exploratory Data Analysis

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/exploratory-analysis

A systematic approach to understanding a new dataset: distributions, relationships, segments, time patterns and anomalies.

Exploratory data analysis (EDA) is structured curiosity. Before testing hypotheses or building dashboards, you get to know the data well enough to spot what is interesting and what is broken.

#### A repeatable EDA routine
1. **Shape and grain**: how many rows, what does one row represent, what time span?
2. **Univariate**: distribution of each important column. Histograms for numbers, bar charts of value counts for categories. Note skew, spikes and suspicious values.
3. **Bivariate**: how key variables relate to the outcome you care about. Scatter plots, box plots by group, cross-tabs, correlation matrices.
4. **Time**: trends, seasonality, sudden jumps (often tracking changes, not real behaviour).
5. **Segments**: break down by the dimensions that matter to the business (plan, region, channel, cohort).
6. **Anomalies**: outliers, gaps, and anything that contradicts what stakeholders believe.

#### Keep a question log
Write down every question and observation as you go ("refunds spike every Monday, why?"). The best ones become the core of your analysis; the rest become caveats.

#### Tools
pandas plus Seaborn covers most EDA. Automated profiling tools such as ydata-profiling produce a quick overview report; use them as a starting point, not a substitute for thinking.

**Pitfall:** endless exploration without a goal. Time-box EDA, then pick two or three findings to investigate properly. Move on when you can deliver a short EDA summary of a new dataset in an afternoon, with clear observations and open questions.

Key concepts: Grain, shape and time span, Univariate distributions, Bivariate relationships, Time trends and seasonality, Segmentation, Anomaly spotting, Question logs, Automated profiling tools.

Mini project: Perform a full EDA on the Kaggle 'Telco Customer Churn' dataset, ending with a one-page summary of the five strongest patterns associated with churn and three open questions.

Self-check: You see a sudden 40% jump in daily events on one date. What would you check before calling it real user behaviour?

Resources:
- [Kaggle Data Visualization course](https://www.kaggle.com/learn/data-visualization) (Kaggle)
- [R for Data Science: exploratory data analysis](https://r4ds.hadley.nz/) (Hadley Wickham et al.)
- [pandas user guide](https://pandas.pydata.org/docs/user_guide/) (pandas)

## Visualization: Principles and Libraries

Choosing charts that fit the question, designing for human perception and colour, building dashboards, and plotting in Python.

### Choosing the Right Chart

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/chart-selection

Matching chart types to the question: comparison, trend, distribution, composition, relationship and geography.

A chart is an argument. Pick the form that makes the comparison you care about easy to see.

#### Question first, chart second
- **Compare categories**: bar charts (sorted), dot plots, lollipop charts.
- **Change over time**: line charts; bars for few discrete periods; slope charts for before/after.
- **Distribution**: histograms, box plots, violin plots, strip plots; ECDFs for comparing distributions precisely.
- **Part of whole**: stacked bars, 100% stacked bars, treemaps; pies only for two or three parts.
- **Relationship**: scatter plots, bubble charts, heatmaps for two categorical dimensions.
- **Ranking and change**: bump charts, bar charts with deltas.
- **Geography**: choropleth maps, but beware that big empty regions dominate visually; a bar chart by region is often clearer.

#### Tables are fine
When people need exact values or look up individual items, a well-formatted table beats any chart.

#### Small multiples
Instead of 12 overlapping lines, draw 12 small charts with the same axes. Comparison becomes easy and spaghetti disappears.

**Pitfalls:** pie charts with many slices, dual axes that invite false correlations, 3D anything, and area or bubble charts where readers must compare sizes precisely. Move on when, given a question, you can name two suitable chart types and justify the better one.

Key concepts: Comparison charts, Time series charts, Distribution charts, Part-to-whole charts, Scatter and heatmaps, Small multiples, Maps and when to avoid them, When a table is better.

Mini project: Take one dataset (e.g. Our World in Data CO2 emissions) and create five charts answering five different question types, each with a one-line justification of the chart choice.

Self-check: Why are small multiples often better than a single line chart with 12 coloured lines?

Resources:
- [From Data to Viz](https://www.data-to-viz.com/) (data-to-viz.com)
- [Datawrapper Academy](https://academy.datawrapper.de/) (Datawrapper)

### Perception, Colour and Honest Design

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/visual-perception-color

How people read charts, using preattentive attributes and colour deliberately, accessibility, and avoiding misleading visuals.

Good charts work with human perception rather than against it.

#### What eyes judge well
People compare **position on a common scale** most accurately, then length, then angle and area, then colour intensity. That is why bar and dot charts beat pies and bubbles for precise comparison.

#### Preattentive attributes
Colour, size, position and weight are noticed before conscious reading. Use them on purpose: make the important series a strong colour and everything else grey. If everything is highlighted, nothing is.

#### Colour with intent
- **Categorical palettes** for unordered groups; keep to about six or fewer.
- **Sequential palettes** (light to dark) for ordered magnitudes.
- **Diverging palettes** for values above and below a meaningful midpoint such as zero or target.
- Be consistent: the same category keeps the same colour across every chart in a report.
- Check **colour-blind safety** (avoid red-green only distinctions) and contrast. Add direct labels so colour is not the only cue.

#### Declutter
Remove heavy borders, gridlines and legends you can replace with direct labels. Use readable fonts, sensible number formats (1.2M not 1,200,000.00) and descriptive titles.

#### Honesty
- Bar charts start at zero; line charts may zoom but should say so.
- Do not cherry-pick time windows.
- Show uncertainty where it matters.

**Pitfall:** rainbow colour scales for continuous data, which create fake boundaries. Move on when you can critique a chart for perception, colour and honesty issues and redesign it.

Key concepts: Accuracy ranking of visual encodings, Preattentive attributes and highlighting, Categorical, sequential, diverging palettes, Colour-blind accessibility, Decluttering and direct labels, Misleading charts.

Mini project: Find three misleading or cluttered charts in the news or on social media and redesign each one, writing a short before/after explanation.

Self-check: When should you use a diverging colour palette instead of a sequential one?

Resources:
- [ColorBrewer: colour advice for maps and charts](https://colorbrewer2.org/) (ColorBrewer)
- [Datawrapper blog](https://blog.datawrapper.de/) (Datawrapper)
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)

### Dashboard Design

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/dashboard-design

Designing dashboards around decisions and audiences, with clear layout, sensible filters and maintainable metrics.

A dashboard is a product with users. Most unused dashboards fail because they were built around available data rather than a decision someone makes regularly.

#### Start with the user
- Who opens it, how often, and what do they do next?
- **Monitoring dashboards**: a few KPIs checked daily or weekly, with clear status versus target.
- **Exploratory / analytical dashboards**: more filters and drill-downs for analysts and power users.
- **Executive summaries**: very few numbers, strong context, trend and comparison.

#### Layout
- Most important information top-left; people scan in a Z or F pattern.
- KPI cards at the top, trends next, breakdowns and detail below.
- Every number needs context: versus last period, target or benchmark.
- Group related charts and align them on a grid; consistent colours and formats throughout.

#### Filters and interactivity
Offer the filters people actually use (date range, region, product) and show which filters are active. Too many slicers create confusion and slow performance.

#### Maintenance
- Define each metric in one place and document it (a tooltip or info panel).
- Show the data refresh time.
- Retire dashboards nobody uses; a small trusted set beats a sprawling library.

**Pitfall:** cramming 20 charts onto one page. If a chart does not support a decision, cut it. Move on when you can sketch a dashboard wireframe on paper, starting from user questions, before opening any BI tool.

Key concepts: Audience and decision mapping, Monitoring vs analytical dashboards, Layout and visual hierarchy, KPI cards with context, Filters and drill-down, Metric documentation and refresh time, Wireframing.

Mini project: Interview a friend running a small business or club, list their five recurring questions, and wireframe a single-page dashboard answering them before building it in any tool.

Self-check: What is the difference between a monitoring dashboard and an exploratory one, and how does that change the design?

Resources:
- [Power BI documentation (report design)](https://learn.microsoft.com/en-us/power-bi/) (Microsoft Learn)
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)

### Plotting in Python with Matplotlib and Seaborn

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/python-viz-static

Creating clear static charts in Python: Matplotlib's figure and axes model and Seaborn's statistical plotting.

Python plotting lets you create charts reproducibly, as part of your analysis code, at any scale.

#### Matplotlib: the foundation
- Use the object-oriented style: `fig, ax = plt.subplots(figsize=(8, 4))` then `ax.plot(...)`, `ax.bar(...)`, `ax.set_title(...)`.
- `plt.subplots(2, 3)` gives a grid of axes for small multiples.
- Control ticks, labels and number formats (`matplotlib.ticker`), remove spines, and annotate key points with `ax.annotate`.
- Save with `fig.savefig("chart.png", dpi=200, bbox_inches="tight")`.

#### Seaborn: statistical charts fast
- Works directly with tidy DataFrames: `sns.histplot(data=df, x="price", hue="room_type")`.
- Distribution plots (`histplot`, `kdeplot`, `boxplot`, `violinplot`, `ecdfplot`), relationship plots (`scatterplot`, `lineplot`, `regplot`), categorical plots (`barplot`, `pointplot`), and `heatmap`.
- Figure-level functions (`relplot`, `displot`, `catplot`) create faceted small multiples with `col=` and `row=`.
- Seaborn returns Matplotlib axes, so you can fine-tune with Matplotlib.

#### Style
Set a theme once (`sns.set_theme(style="whitegrid")`), then apply the design principles from earlier topics: highlight one thing, direct labels, insight titles.

**Pitfall:** Seaborn's `barplot` shows the mean with an error bar by default, not the sum. Know what each function aggregates. Move on when you can produce a publication-ready faceted chart with custom labels in a few lines.

Key concepts: Figure and Axes model, Line, bar, scatter in Matplotlib, Subplots and small multiples, Annotations and formatting, Seaborn distribution plots, Seaborn faceting with relplot and catplot, Themes and styling, plotnine / ggplot-style in Python.

Mini project: Using the Seaborn 'tips' or Inside Airbnb data, produce a four-chart figure (distribution, trend, category comparison, relationship) with consistent styling and insight titles, saved as a PNG.

Self-check: What does sns.barplot show by default, and how would you plot totals instead?

Resources:
- [Matplotlib user guide](https://matplotlib.org/stable/users/index.html) (Matplotlib)
- [Seaborn tutorial](https://seaborn.pydata.org/tutorial.html) (Seaborn)
- [Kaggle Data Visualization course](https://www.kaggle.com/learn/data-visualization) (Kaggle)

### Interactive Charts with Plotly

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/python-viz-interactive

Building interactive, shareable charts and simple data apps in Python with Plotly Express and friends.

Interactive charts let readers hover for exact values, zoom into time ranges and toggle series. They are great for exploration and for sharing results with people who like to dig.

#### Plotly Express
- One-line charts from DataFrames: `px.line(df, x="date", y="revenue", color="region")`.
- Hover data, facets (`facet_col`), animations over time (`animation_frame`), and maps.
- Export to standalone HTML with `fig.write_html("chart.html")` to share without any server.
- Works inside Jupyter, Colab and VS Code.

#### Customising
Use `fig.update_layout` and `fig.update_traces` for titles, templates, axis formats and hover text. Keep the same design discipline as static charts: interactivity does not excuse clutter.

#### Beyond single charts
- **Dash** (from Plotly) and **Streamlit** turn Python scripts into small web apps with filters and widgets. Handy for internal tools or a portfolio demo.
- **Altair** is a declarative alternative based on the grammar of graphics.

#### When not to use interactivity
Slides, printed reports and executive emails need a static chart with the insight already highlighted. Do not make readers hunt for the point.

**Pitfall:** sharing huge HTML files with hundreds of thousands of points; aggregate first. Move on when you can build an interactive chart with meaningful hover text and share it as a single HTML file.

Key concepts: Plotly Express basics, Hover data and facets, Exporting to HTML, Layout and trace customisation, Streamlit apps, Dash apps, Altair.

Mini project: Build an animated Plotly scatter of Gapminder data (GDP per capita vs life expectancy by year, sized by population) and publish it as an HTML file in your portfolio repo.

Self-check: When would an interactive chart be the wrong choice for communicating a result?

Resources:
- [Plotly Python graphing library](https://plotly.com/python/) (Plotly)
- [Streamlit documentation](https://docs.streamlit.io/) (Streamlit)

## Business Intelligence Tools

How BI platforms connect to data, model it once, and serve self-service reports; then one tool learned properly plus DAX and publishing.

### How BI Platforms Work

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/bi-concepts

The shared architecture behind every BI tool: connections, import vs live queries, semantic models, measures, refresh and sharing.

Every BI tool, whatever the logo, is built from the same parts. Learning those parts first means you can switch tools in a week instead of starting over.

#### The building blocks
- **Connections**: the tool talks to a database, warehouse, file or API. Credentials and gateways decide what it can reach.
- **Import vs live (DirectQuery)**: import copies data into the tool's fast in-memory engine on a schedule; live mode sends a query to the warehouse on every click. Import is faster and cheaper per click, live is always fresh.
- **Semantic model**: tables, relationships, and business-friendly names. This is where "revenue" gets defined once so every report agrees.
- **Measures vs columns**: a column is stored per row; a measure is a calculation evaluated in the context of a visual (total revenue for this month and this region).
- **Refresh and scheduling**: when imported data updates and who gets alerted when a refresh fails.
- **Workspaces and sharing**: who can view, edit, or build their own reports on top of your model.

#### Self-service done well
The goal is a small number of trusted, documented models that many people can explore safely, instead of hundreds of one-off reports each with its own revenue formula. Analysts increasingly act as model owners: they decide grain, relationships and certified measures.

**Pitfall:** building each report on its own copy of the data. Numbers drift apart within weeks. You are ready to move on when you can sketch, for any dashboard, where the data lives, how it refreshes, and where each metric is defined.

Key concepts: Data source connections and gateways, Import vs live / DirectQuery, Semantic models and relationships, Measures vs calculated columns, Refresh schedules, Self-service vs curated reporting, Certified datasets.

Mini project: Draw an architecture diagram for a sales dashboard you would build: source tables, connection mode, model tables and relationships, three key measures, refresh schedule and audience.

Self-check: When would you choose a live connection over an import, and what do you give up?

Resources:
- [Power BI documentation](https://learn.microsoft.com/en-us/power-bi/) (Microsoft)
- [Metabase Learn](https://www.metabase.com/learn/) (Metabase)

### Power BI

recommended · intermediate · about 14 h · https://www.internhack.in/roadmaps/tracks/data-analyst/power-bi

Microsoft's BI suite: Power Query for shaping, a star-schema model, report canvas and the Power BI service for sharing.

Power BI is the most requested BI tool in analyst job postings, largely because it ships with Microsoft 365 and connects to almost anything. It is really three tools in one.

#### The workflow in Power BI Desktop
1. **Get Data and Power Query**: connect to sources and build repeatable cleaning steps (the same engine as Excel's Power Query).
2. **Model view**: load fact and dimension tables, create one-to-many relationships from dimensions to facts, set a proper date table.
3. **Report view**: drag fields onto visuals, add slicers, and configure cross-filtering between visuals.

#### The Power BI service
Publishing sends your file to a **workspace** online. There you schedule refreshes (with a gateway for on-premises data), bundle reports into an **app** for consumers, and set **row-level security** so each regional manager sees only their region.

#### Habits that keep models healthy
- Model as a **star schema**: narrow fact tables, descriptive dimensions. Avoid many-to-many and bidirectional filters unless you understand why you need them.
- Write **explicit measures** rather than dragging raw numeric columns and relying on implicit sums.
- Hide technical columns (keys, IDs) from report view.
- Keep a **dedicated date table** marked as such so time intelligence works.

**Pitfall:** doing heavy transformations in DAX that belong in Power Query or upstream in SQL. Shape data early, calculate late. You are ready to move on when you can take raw CSVs to a published, refreshed report with a star-schema model.

Key concepts: Power Query in Power BI, Model view and relationships, Date tables, Report visuals, slicers and interactions, Drill-through and tooltips pages, Publishing to the Power BI service, Scheduled refresh and gateways, Row-level security, Apps and workspaces.

Mini project: Build a Power BI report on the AdventureWorks or a Kaggle retail dataset: star schema, date table, five explicit measures, a drill-through page, and publish it with a refresh schedule.

Self-check: Why does Power BI work best with a star schema, and what goes wrong with a single wide flat table?

Resources:
- [Power BI documentation](https://learn.microsoft.com/en-us/power-bi/) (Microsoft)
- [Microsoft Learn training for Power BI](https://learn.microsoft.com/en-us/training/powerplatform/power-bi) (Microsoft)
- [Star schema guidance for Power BI](https://learn.microsoft.com/en-us/power-bi/guidance/star-schema) (Microsoft)

### Tableau

alternative · intermediate · about 14 h · https://www.internhack.in/roadmaps/tracks/data-analyst/tableau

A visual-first BI tool built around drag-and-drop shelves, calculated fields, LOD expressions and Tableau Public for portfolios.

Tableau is famous for fast visual exploration and polished output. Many analysts build their public portfolio on **Tableau Public**, which is free.

#### How Tableau thinks
- **Dimensions and measures**: discrete fields (blue pills) create headers; continuous fields (green pills) create axes.
- **Shelves**: dragging fields to Rows, Columns, Color, Size and Detail builds the chart. The Marks card controls the chart type.
- **Worksheets, dashboards and stories**: single charts, arranged layouts with actions, and guided sequences.

#### Calculations
- **Calculated fields** for row-level logic and aggregates (`SUM([Profit]) / SUM([Sales])`).
- **Table calculations** for running totals, percent of total, and rank, computed on the visible result.
- **LOD expressions** like `{FIXED [Customer] : MIN([Order Date])}` compute at a grain different from the view, which is how you find each customer's first purchase date.

#### Data sources
Tableau can connect live or create **extracts** (its import mode). Relationships in the logical layer let tables join at the right level automatically, reducing duplicated totals.

**Pitfall:** mixing aggregated and non-aggregated fields in one calculation, which produces the classic "cannot mix aggregate and non-aggregate" error, or summing an already-duplicated join. You are ready to move on when you can publish a dashboard to Tableau Public with filters, a dashboard action and at least one LOD calculation.

Key concepts: Dimensions, measures, discrete and continuous, Shelves and the Marks card, Calculated fields, Table calculations, LOD expressions, Dashboards and actions, Extracts vs live connections, Tableau Public portfolio.

Mini project: Recreate a Makeover Monday dataset in Tableau Public: a dashboard with two linked views, a filter action, and an LOD-based metric such as customer first-order cohort.

Self-check: What does a FIXED LOD expression do that a regular aggregate in the view cannot?

Resources:
- [Tableau free training videos](https://www.tableau.com/learn/training) (Tableau)
- [Tableau Desktop help](https://help.tableau.com/current/pro/desktop/en-us/default.htm) (Tableau)
- [Tableau Public gallery](https://public.tableau.com/) (Tableau)

### Looker Studio

alternative · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/looker-studio

Google's free web-based reporting tool, well suited to marketing dashboards on Google Analytics, Sheets and BigQuery.

Looker Studio (formerly Data Studio) is free, runs in the browser, and connects natively to Google products. It is common in marketing and small-business teams and is a quick way to share a live dashboard with a link.

#### Core concepts
- **Data sources**: a connector (GA4, Google Sheets, BigQuery, Search Console, many partner connectors) plus a field list where you set types and default aggregations.
- **Reports and pages**: a canvas of charts, scorecards, tables and controls.
- **Controls**: date range pickers and drop-down filters that apply to a page or a group of charts.
- **Calculated fields**: formulas such as `SUM(Revenue) / COUNT_DISTINCT(User ID)` or `CASE` statements to group values.
- **Blending**: joining two data sources on a shared key, useful but limited; heavy joins belong in BigQuery or Sheets beforehand.

#### Performance and freshness
Charts query the source whenever someone opens the report. On large BigQuery tables that costs money and time, so point reports at pre-aggregated tables and enable data freshness caching.

#### Where it fits and where it does not
Great for lightweight, shareable reporting on Google data. Weaker for complex modelling, governed metric definitions, or row-level security, where Power BI, Tableau or Looker (the separate enterprise product) are stronger.

**Pitfall:** blending several raw sources and wondering why totals are wrong. You are ready to move on when you can build a GA4 or Sheets-backed report with controls and calculated fields and share it with view-only access.

Key concepts: Connectors and data sources, Charts, scorecards and tables, Date range and filter controls, Calculated fields and CASE, Data blending limits, Sharing and access, Looker Studio vs Looker.

Mini project: Connect Looker Studio to the Google Merchandise Store GA4 demo account or a Google Sheet of sales data and build a two-page report with scorecards, a trend chart, and a channel filter.

Self-check: Why might a Looker Studio report on a large BigQuery table become slow and expensive, and how would you fix it?

Resources:
- [Looker Studio Help Center](https://support.google.com/looker-studio) (Google)
- [Looker Studio report gallery](https://lookerstudio.google.com/gallery) (Google)

### Metabase

alternative · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/metabase

An open-source BI tool that sits directly on your SQL database, popular with startups for questions, dashboards and alerts.

Metabase is open source and can run in a single container next to your PostgreSQL or MySQL database. Startups often choose it because non-technical teammates can build simple charts while analysts write SQL for the hard parts.

#### Two ways to ask questions
- **Query builder**: pick a table, filter, summarise and group through menus. Good for colleagues who do not write SQL.
- **Native SQL questions**: write SQL directly, add **variables** (`{{start_date}}`) that become dashboard filters.

#### Organising work
- **Collections** act like folders with permissions.
- **Models** are curated, documented query results that others can build on, a light semantic layer.
- **Metrics and segments** define reusable calculations and filters so "active customer" means one thing.
- **Dashboards** combine questions, with filters wired to each card's fields.
- **Alerts and subscriptions** email or post to Slack when a result changes or on a schedule.

#### Operating it
Because Metabase queries the database live, point it at a read replica or warehouse rather than the production primary, and add indexes or summary tables for heavy dashboards.

**Pitfall:** letting dozens of near-duplicate SQL questions pile up with slightly different definitions. Promote good queries to models and archive the rest. You are ready to move on when you can run Metabase locally with Docker, connect a sample database, and build a filtered dashboard from both builder and SQL questions.

Key concepts: Running Metabase with Docker, Query builder questions, Native SQL questions and variables, Models, metrics and segments, Dashboards and filter wiring, Alerts and subscriptions.

Mini project: Run Metabase in Docker against its sample database, create a model for orders, and build a dashboard with a date filter wired to both a query-builder chart and a SQL chart.

Self-check: Why should Metabase usually query a replica or warehouse instead of the production database?

Resources:
- [Metabase documentation](https://www.metabase.com/docs/latest/) (Metabase)
- [Metabase Learn](https://www.metabase.com/learn/) (Metabase)

### DAX and Calculated Measures

recommended · intermediate · about 12 h · https://www.internhack.in/roadmaps/tracks/data-analyst/dax-measures

Writing measures in DAX: filter context, CALCULATE, iterators and time intelligence, the skill that separates Power BI users from builders.

DAX (Data Analysis Expressions) is the formula language of Power BI, Excel Power Pivot and Analysis Services. It looks like Excel formulas but behaves very differently, because every measure is evaluated inside a **filter context** set by the visual.

#### The two contexts
- **Filter context**: the filters coming from rows, columns, slicers and relationships. A `Total Sales := SUM(Sales[Amount])` measure shows a different number in every cell because each cell has a different filter context.
- **Row context**: exists inside calculated columns and iterator functions, meaning "the current row".

#### CALCULATE is the key
`CALCULATE(expression, filters...)` evaluates an expression under modified filters. Examples:
- `Sales LY := CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Date'[Date]))`
- `Sales All Regions := CALCULATE([Total Sales], REMOVEFILTERS(Region))` for percent of total.

#### Other essentials
- **Iterators** such as `SUMX(Sales, Sales[Qty] * Sales[Price])` compute row by row, then aggregate.
- **DIVIDE** handles divide-by-zero safely.
- **Variables** (`VAR ... RETURN`) make long measures readable and faster.
- **Time intelligence** (TOTALYTD, DATEADD) needs a proper, marked date table.

**Pitfall:** creating calculated columns for things that should be measures, bloating the model and giving wrong totals. Prefer measures unless you need to slice by the value. You are ready to move on when you can write year-over-year growth, percent of total and a rolling 3-month average as measures and explain their filter context.

Key concepts: Measures vs calculated columns, Filter context and row context, CALCULATE and filter modifiers, Iterators: SUMX, AVERAGEX, Time intelligence functions, Variables in DAX, Context transition, Performance Analyzer and DAX Studio.

Mini project: In your Power BI report add measures for YoY growth %, percent of category total, rolling 3-month sales and customer count with at least two orders, each documented with a one-line description.

Self-check: Explain in plain words why the same SUM measure returns different numbers in each cell of a matrix.

Resources:
- [DAX reference](https://learn.microsoft.com/en-us/dax/) (Microsoft)
- [DAX overview in Power BI](https://learn.microsoft.com/en-us/dax/dax-overview) (Microsoft)
- [DAX Guide](https://dax.guide/) (SQLBI)

### Publishing, Security and BI Governance

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/bi-governance

Keeping BI trustworthy at scale: access control, row-level security, refresh monitoring, documentation and retiring stale reports.

A dashboard that is wrong, stale or visible to the wrong people is worse than no dashboard. Governance is the set of habits that keeps reporting trustworthy as it grows.

#### Access and security
- **Workspace roles**: separate who can edit models, who can build reports on them, and who only views.
- **Row-level security (RLS)**: filter rows by the viewer's identity, for example a regional manager seeing only their region. Test it by viewing as a role before release.
- **Sensitive fields**: mask or exclude personal data; share aggregates, not raw customer rows, unless there is a clear need.

#### Reliability
- **Refresh monitoring**: failed refreshes should alert an owner, not be discovered by an executive.
- **Data freshness labels**: show "data as of" on every page.
- **Reconciliation**: compare key totals against a trusted source (finance system, billing) each month.

#### Documentation and lifecycle
- A short description on every report: purpose, owner, audience, metric definitions, refresh cadence.
- Development, test and production workspaces or at least a review step before publishing.
- Usage metrics to find reports nobody opens, then archive them.

#### Metric consistency
Centralise definitions in a shared semantic model or metrics layer so that "revenue" is identical in every tool.

**Pitfall:** treating publishing as the finish line. Most trust problems appear months later. You are ready to move on when you can publish a report with RLS, a documented owner, a refresh alert and a data-as-of label.

Key concepts: Workspace roles and permissions, Row-level security, Refresh failure alerts, Data-as-of labels, Report documentation, Dev, test and prod workspaces, Usage metrics and report retirement.

Mini project: Add row-level security with two roles to an existing report, write a documentation panel (owner, definitions, refresh), and test the report as each role.

Self-check: What three things would you check before sharing a dashboard containing regional sales with the whole company?

Resources:
- [Row-level security with Power BI](https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security) (Microsoft)
- [Power BI guidance documentation](https://learn.microsoft.com/en-us/power-bi/guidance/) (Microsoft)

## Data Storytelling and Stakeholder Communication

Turning analysis into decisions: structuring a narrative, writing clear reports, presenting to different audiences, and managing stakeholders.

### Data Storytelling

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/data-storytelling

Structuring findings as a narrative with a clear main point, supporting evidence, and a recommended action.

Stakeholders rarely remember charts; they remember a clear point and what to do about it. Storytelling is the discipline of choosing that point and arranging evidence around it.

#### Start with the "so what"
Before building slides, write one sentence: **"We should do X because Y, which we know from Z."** If you cannot write it, the analysis is not finished.

#### A reliable structure
- **Situation**: what the audience already knows ("Signups grew 20% last quarter").
- **Complication**: the tension ("but paid conversion fell from 5% to 3.8%").
- **Resolution**: your finding and recommendation ("the drop is entirely mobile users after the new checkout; revert the payment step on mobile").

Put the answer first for executives (the pyramid principle), then the supporting arguments, then the detail in an appendix.

#### Make each chart argue one thing
- Chart titles should state the takeaway: "Mobile conversion fell after the 3 March release", not "Conversion by device".
- Use colour to highlight the one series that matters and grey out the rest.
- Annotate events directly on the chart.
- Remove anything that does not support the point.

#### Handle uncertainty honestly
State confidence and caveats plainly: sample size, data gaps, what would change your mind. Honest caveats build long-term trust.

**Pitfall:** presenting everything you did in chronological order. The audience wants conclusions, not your process. You are ready to move on when you can turn an analysis into a five-slide story whose titles alone tell the whole argument.

Key concepts: Finding the main message, Situation, complication, resolution, Pyramid principle: answer first, Takeaway chart titles, Highlighting and decluttering, Annotations and context, Communicating uncertainty.

Mini project: Take a finished EDA notebook and build a five-slide deck where each slide title is a full-sentence takeaway; test it by reading only the titles to a friend.

Self-check: Rewrite the chart title 'Revenue by month' as a takeaway title for a chart that shows a December spike.

Resources:
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)
- [Financial Times Visual Vocabulary](https://github.com/Financial-Times/chart-doctor/tree/main/visual-vocabulary) (Financial Times)

### Writing Analysis Reports and Memos

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/analysis-writing

Writing short, skimmable analysis documents with an executive summary, methods, findings, caveats and next steps.

Much analyst work is consumed as text: a Slack summary, an email, a two-page memo, a notebook write-up. Clear writing makes your work reusable long after the meeting.

#### A standard analysis memo
1. **TL;DR** (3-5 bullets): the answer, the size of the effect, the recommendation.
2. **Question and context**: why this was asked and what decision it informs.
3. **Data and method**: sources, time window, definitions, key filters. Brief, but enough to reproduce.
4. **Findings**: one heading per finding, each with a chart or table and one or two sentences of interpretation.
5. **Caveats and limitations**: data quality issues, assumptions, what the analysis cannot show.
6. **Next steps**: decisions, follow-up analyses, owners.

#### Writing habits
- Lead with numbers that matter, rounded sensibly ("about 12%", not "11.8734%").
- Always give comparisons: vs last period, vs target, vs control.
- Prefer short sentences and plain words; define any metric the first time you use it.
- Link to the query, notebook or dashboard so others can check your work.

#### Short-form updates
For a quick Slack or email answer: the number, the definition, the time range, and the caveat, in two or three lines. "Weekly active users were 48.2k last week (7-day distinct logins, excluding staff), up 4% week over week."

**Pitfall:** burying the answer on page three. You are ready to move on when a busy reader can get your conclusion from the first five lines of anything you write.

Key concepts: TL;DR and executive summaries, Documenting data and methods, Presenting findings with evidence, Caveats and limitations, Short-form Slack and email answers, Rounding and number formatting.

Mini project: Write a two-page memo on a public dataset analysis (e.g. Citi Bike ridership after a price change) following the six-part structure, then cut the TL;DR to under 60 words.

Self-check: What must be in the first five lines of an analysis memo, and what can go in an appendix?

Resources:
- [Google Technical Writing courses](https://developers.google.com/tech-writing) (Google)
- [Plain language guidelines](https://www.plainlanguage.gov/guidelines/) (plainlanguage.gov)

### Presenting to Different Audiences

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/presenting-to-stakeholders

Adapting depth, vocabulary and format for executives, operators and technical peers, and handling questions live.

The same analysis needs different packaging for different people. Knowing your audience decides how much detail, which metrics, and what format.

#### Audience profiles
- **Executives**: want the decision, the impact in money or customers, and the risk. Two or three slides, answer first, appendix ready.
- **Operational managers**: want to know what to change in their process this week, broken down by their team, region or product.
- **Technical peers** (analysts, engineers, data scientists): want method, definitions, and edge cases. They will probe the SQL and the statistics.

#### Preparing a presentation
- Rehearse the one-sentence message and the three supporting points.
- Anticipate the three hardest questions and prepare backup slides.
- Pre-wire key stakeholders: share findings one-on-one before a big meeting so nobody is surprised in public.
- Check every number on the slides against the source one last time.

#### Handling questions
- If you do not know, say so and promise a follow-up by a specific time.
- If someone challenges a number, ask which figure they expected and why; often it is a definition difference.
- Redirect deep technical tangents to a follow-up so the meeting reaches a decision.

#### Live demos of dashboards
Walk through a specific question ("let's find why the West region dipped") rather than touring every filter.

**Pitfall:** one deck for everyone. You are ready to move on when you can present the same analysis in a 2-minute executive version and a 15-minute technical version.

Key concepts: Executive vs operational vs technical audiences, Answer-first slide structure, Backup and appendix slides, Pre-wiring stakeholders, Handling challenges to numbers, Dashboard walkthroughs.

Mini project: Record yourself presenting one analysis twice: a 2-minute executive version and a 10-minute technical version, then note what you cut and added in each.

Self-check: An executive says your revenue number is wrong. What is your first question back?

Resources:
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)
- [Google Technical Writing courses](https://developers.google.com/tech-writing) (Google)

### Working with Stakeholders

recommended · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/stakeholder-management

Managing intake, priorities, expectations and relationships so analysis requests turn into impact instead of an endless queue.

Analysts serve many internal customers at once. Without some structure you become a ticket queue answering whoever shouts loudest. Stakeholder management is how you protect time for work that matters.

#### Intake and prioritisation
- Use a single intake channel (form, board, or ticket type) with fields for the question, decision, deadline and requester.
- Prioritise by **impact on a decision** and **effort**, not by seniority alone. A simple impact vs effort grid works well.
- Say what you will not do this week, and why, in writing.

#### Setting expectations
- Agree on the output (a number, a table, a dashboard, a memo) and the date before starting.
- Share early drafts. A rough chart after one day beats a polished wrong answer after a week.
- Flag scope creep: "That is a new question. I can add it after Friday, or swap it for the cohort cut."

#### Building trust
- Be consistent on definitions and admit mistakes quickly with a correction note.
- Learn the stakeholder's domain: their targets, pressures and vocabulary.
- Follow up after decisions: "Did the change we recommended move the metric?" This closes the loop and shows impact.

#### Saying no well
Offer alternatives: a self-serve dashboard, an existing report, or a smaller version of the request.

**Pitfall:** agreeing to everything and delivering everything late. You are ready to move on when you can run a weekly prioritised request list and explain each ranking to the requesters.

Key concepts: Request intake process, Impact vs effort prioritisation, Agreeing on deliverables and dates, Sharing early drafts, Handling scope creep, Closing the loop on impact, Saying no with alternatives.

Mini project: Design a request intake form and an impact vs effort scoring sheet, then rank ten sample requests and write one-line justifications for the top three and the bottom three.

Self-check: Two senior managers each want their request done first this week. How do you decide and communicate the outcome?

Resources:
- [Stakeholder analysis (overview)](https://en.wikipedia.org/wiki/Stakeholder_analysis) (Wikipedia)
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)

## Business and Product Metrics

The metrics businesses run on: KPI design, funnels, cohorts and retention, unit economics, and diagnosing why a number moved.

### KPIs and Metric Design

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/kpi-design

Choosing and defining metrics that reflect real value, including north star metrics, input metrics and guardrails.

A metric is only useful if moving it means the business is actually getting better. Good analysts spend real effort on choosing and defining metrics before reporting on them.

#### Types of metrics
- **North star metric**: one number that best captures value delivered to customers, such as weekly listening hours for a music app or nights booked for a travel marketplace.
- **Input (driver) metrics**: levers teams can move that feed the north star: new signups, activation rate, items per order.
- **Guardrail metrics**: things that must not get worse while you optimise: refund rate, page load time, support tickets.
- **Leading vs lagging**: activation this week predicts revenue next quarter; revenue itself lags.

#### Properties of a good KPI
- **Clearly defined**: numerator, denominator, time window, filters, and how edge cases (refunds, test accounts) are handled.
- **Actionable**: a team knows what they would do to move it.
- **Sensitive but not noisy**: it moves when something real changes.
- **Hard to game**: optimising it should not damage the business. Counting "calls handled" can reward short, unhelpful calls.

#### Ratios vs counts
Report rates (conversion rate, revenue per user) alongside the counts that make them up, so a rising rate caused by a falling denominator is visible.

#### Metric documentation
Keep a metric dictionary: name, definition, SQL or DAX, owner, and known caveats. It is the cheapest way to stop meetings arguing about whose number is right.

**Pitfall:** vanity metrics like total registered users that only ever go up. You are ready to move on when you can propose a north star, three input metrics and two guardrails for a product you use.

Key concepts: North star metrics, Input and driver metrics, Guardrail metrics, Leading vs lagging indicators, Vanity metrics and gaming, Metric dictionaries, OKRs and targets.

Mini project: For a food delivery app, write a metric dictionary with a north star, four input metrics and two guardrails, each with an exact definition and a SQL sketch.

Self-check: Give an example of a metric that could improve while the business gets worse, and name a guardrail that would catch it.

Resources:
- [Key performance indicator (overview)](https://en.wikipedia.org/wiki/Performance_indicator) (Wikipedia)
- [Amplitude docs: metrics and analytics guides](https://amplitude.com/docs) (Amplitude)

### Funnel Analysis

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/funnel-analysis

Measuring how users move through ordered steps, finding where they drop off, and building funnels correctly in SQL.

A funnel measures what share of people complete a sequence of steps: visit, sign up, add to cart, check out. It is one of the most common analyst deliverables because it points directly at where to improve.

#### Building a funnel correctly
- Define each step as a specific event and decide whether steps must happen **in order** and **within a window** (e.g. purchase within 7 days of signup).
- Count **users**, not events, at each step, unless you specifically want event counts.
- Report both **step conversion** (step N / step N-1) and **overall conversion** (step N / step 1).

#### Funnels in SQL
A common pattern is one row per user with the first timestamp of each step:

```sql
SELECT user_id,
       MIN(CASE WHEN event = 'signup' THEN ts END) AS signup_at,
       MIN(CASE WHEN event = 'add_to_cart' THEN ts END) AS cart_at,
       MIN(CASE WHEN event = 'purchase' THEN ts END) AS purchase_at
FROM events
GROUP BY user_id;
```

Then count users where each later timestamp is not null and greater than the previous one.

#### Segmenting for insight
The overall funnel says where people drop; segments say who. Break down by device, channel, country, new vs returning and app version. A drop confined to one segment is usually a bug or a specific experience problem.

#### Time to convert
Median time between steps often reveals friction that conversion rates hide.

**Pitfall:** mixing users who entered the funnel at different times so recent users look worse because they have not had time to convert. Use cohorts or fixed windows. You are ready to move on when you can build an ordered, windowed three-step funnel in SQL and segment it by device.

Key concepts: Defining funnel steps, Ordered and windowed funnels, Step vs overall conversion, Funnels in SQL, Segmenting drop-off, Time to convert, Funnel reports in product tools.

Mini project: Using the Google Analytics sample ecommerce dataset in BigQuery (or a Kaggle event log), build a view to product, add to cart, purchase funnel in SQL and segment it by device category.

Self-check: Why can a funnel for users who signed up yesterday look much worse than last month's, and how do you fix the comparison?

Resources:
- [Mode SQL Tutorial](https://mode.com/sql-tutorial) (Mode)
- [Mixpanel docs: funnels](https://docs.mixpanel.com/docs/reports/funnels) (Mixpanel)

### Cohort and Retention Analysis

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/cohort-retention

Grouping users by when they started and tracking how many come back, the core way to tell if a product keeps its customers.

Growth hides problems: total active users can rise while each new group of customers leaves faster. **Cohort analysis** separates users by their start date so you can see whether retention is improving.

#### The retention table
- Rows are **cohorts** (users grouped by signup week or first purchase month).
- Columns are **periods since start** (week 0, week 1, week 2...).
- Cells are the percentage of the cohort active in that period.

Reading down a column shows whether newer cohorts retain better; reading across a row shows how one cohort decays.

#### Building it in SQL
1. Find each user's cohort: `MIN(activity_date)` truncated to week or month.
2. Join activity back and compute the period number: `DATE_DIFF` between activity and cohort start.
3. Count distinct users per cohort and period, then divide by the cohort size (period 0).

#### Retention definitions
- **N-day (classic) retention**: active exactly on day N.
- **Unbounded (rolling) retention**: active on day N or later.
- **Bracket retention**: active within a range like days 7-13.
Pick one and say which; they give very different numbers.

#### Related metrics
- **Churn rate**: share of customers lost in a period (for subscriptions, cancellations divided by customers at the start).
- **Retention curve flattening**: a curve that levels off means you have found a loyal core; one that trends to zero is a warning.
- **Stickiness**: DAU / MAU.

**Pitfall:** averaging retention across cohorts of very different sizes without weighting. You are ready to move on when you can build a monthly cohort retention heatmap from raw events and describe what it shows.

Key concepts: Defining cohorts, Retention tables and heatmaps, Cohort queries in SQL, N-day vs unbounded retention, Churn rate, DAU, WAU, MAU and stickiness, Retention curves and flattening, Survival analysis.

Mini project: Using the UCI Online Retail dataset, build a monthly first-purchase cohort retention heatmap in SQL or pandas and write three observations about it.

Self-check: Total monthly active users grew 30% this year. What would a cohort chart need to show for that to be bad news?

Resources:
- [Amplitude docs: retention analysis](https://amplitude.com/docs/analytics/charts/retention-analysis/retention-analysis-build) (Amplitude)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial) (Mode)
- [Cohort analysis (overview)](https://en.wikipedia.org/wiki/Cohort_analysis) (Wikipedia)

### Unit Economics and Revenue Metrics

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/unit-economics

CAC, LTV, ARPU, gross margin, MRR and payback period: the money metrics that tell you whether growth is healthy.

Unit economics ask a simple question: do we make money on each customer or order, once we count what it costs to get and serve them?

#### Core revenue metrics
- **ARPU / ARPA**: average revenue per user or per account over a period.
- **AOV**: average order value, revenue divided by orders.
- **MRR / ARR**: monthly or annual recurring revenue for subscriptions. Break MRR movement into **new, expansion, contraction and churned** components.
- **Gross margin**: (revenue minus direct cost of goods or service) / revenue.

#### Acquisition and value
- **CAC** (customer acquisition cost): sales and marketing spend in a period divided by new customers acquired. Decide whether to include salaries and tools and state it.
- **LTV** (lifetime value): a simple version is ARPU times gross margin divided by churn rate. Cohort-based LTV, summing real margin by cohort over time, is more honest.
- **LTV:CAC ratio**: around 3 is often quoted as healthy; below 1 means each customer loses money.
- **Payback period**: months of gross margin needed to recover CAC.

#### Doing it carefully
- Use **gross margin**, not revenue, in LTV.
- Match time windows: CAC this month should relate to customers acquired from that spend.
- Split by channel. Blended CAC can hide one channel that is wildly unprofitable.
- Be cautious with LTV formulas on young businesses with little churn history.

**Pitfall:** presenting a huge LTV from a formula that assumes today's churn lasts forever. You are ready to move on when you can compute CAC, cohort LTV and payback by channel from a spend table and an orders table.

Key concepts: ARPU and AOV, MRR, ARR and MRR movements, Gross margin, Customer acquisition cost, Lifetime value (formula vs cohort), LTV:CAC and payback period, Channel-level unit economics.

Mini project: Create a small synthetic dataset of marketing spend by channel and customer orders, then compute CAC, 12-month cohort LTV and payback period per channel in a spreadsheet or SQL.

Self-check: Why should LTV use gross margin rather than revenue, and how can blended CAC mislead?

Resources:
- [Customer lifetime value (overview)](https://en.wikipedia.org/wiki/Customer_lifetime_value) (Wikipedia)
- [Y Combinator Startup Library](https://www.ycombinator.com/library) (Y Combinator)

### Diagnosing Metric Changes

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/metric-diagnosis

A structured approach to 'why did this number move?': checking data, decomposing the metric, segmenting and ruling out causes.

"Why did revenue drop 8% yesterday?" is the question analysts get most often and the one where structure pays off most. Work through the causes in order rather than guessing.

#### 1. Is it real?
- Check for **data issues** first: late-arriving data, a broken pipeline, tracking changes, timezone shifts, duplicate loads.
- Compare with a second source (billing vs events).
- Check **seasonality and calendar**: day of week, holidays, pay cycles, a promotion last year.

#### 2. Decompose the metric
Break it into a **metric tree**: revenue = visitors × conversion rate × average order value. Find which factor moved. Then decompose that factor further (visitors = organic + paid + direct...).

#### 3. Segment
Slice the moving component by device, country, channel, platform, app version, new vs returning. If the drop is concentrated in one segment, you are close to the cause.

#### 4. Internal and external events
Line up releases, experiments, pricing changes, outages, marketing campaigns, competitor moves and news on the same timeline.

#### 5. Mix vs rate effects
An average can fall because each segment worsened (**rate effect**) or because the mix shifted toward a lower-value segment (**mix effect**, a relative of Simpson's paradox). Compute both.

#### 6. Conclude and size
State the likely cause, how much of the change it explains, confidence, and what to do next.

**Pitfall:** stopping at the first plausible story. Check whether it explains the full size of the change. You are ready to move on when you can take a metric drop and produce a one-page diagnosis following these steps.

Key concepts: Ruling out data issues, Seasonality and calendar effects, Metric trees and decomposition, Segment drill-downs, Event timelines, Mix vs rate effects, Anomaly detection alerts.

Mini project: Simulate a daily revenue dataset with a hidden drop caused by one device and country, then hand it to a friend or write a diagnosis walking through each of the six steps.

Self-check: Average order value fell but every country's AOV rose. What happened?

Resources:
- [Simpson's paradox](https://en.wikipedia.org/wiki/Simpson%27s_paradox) (Wikipedia)
- [Kaggle Learn](https://www.kaggle.com/learn) (Kaggle)

## Version Control and Reproducible Workflow

Tracking analysis code with Git, collaborating on GitHub, and organising projects so anyone can rerun your work.

### Git and GitHub for Analysts

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/git-basics

Tracking SQL, notebooks and scripts with Git, branching, pull requests and sharing work on GitHub.

Analysts who keep queries in random files lose work and cannot explain how a number was produced last quarter. Git fixes that, and a GitHub profile doubles as your portfolio.

#### The everyday loop
```bash
git clone <repo-url>
git switch -c churn-analysis
# edit queries and notebooks
git add queries/churn.sql
git commit -m "Add 90-day churn query by channel"
git push -u origin churn-analysis
```
Then open a **pull request** so a teammate can review the logic before it feeds a dashboard.

#### What to commit
- SQL files, Python or R scripts, notebooks, dbt models, README and documentation.
- **Not** raw data dumps, credentials or large outputs. Use a `.gitignore` for `data/`, `.env` and output folders.

#### Notebooks in Git
Notebooks store outputs and metadata that create noisy diffs. Clear outputs before committing, or use tools like `nbstripout` or jupytext to keep diffs readable.

#### Good habits
- Small commits with messages that say what and why.
- One branch per analysis or change.
- Review each other's SQL in pull requests; many metric bugs are caught here.
- Tag or note the commit used for a published result so it can be reproduced.

**Pitfall:** committing a CSV with customer emails or a database password. Once pushed, assume it is exposed. You are ready to move on when you can branch, commit, push, open a pull request and resolve a simple merge conflict.

Key concepts: Repositories, commits and history, Branches and merging, GitHub remotes, push and pull, Pull requests and code review, .gitignore for data and secrets, Notebooks in version control, Resolving merge conflicts.

Mini project: Put one of your analyses in a GitHub repo with a clear README, a .gitignore for data and secrets, and at least one pull request that you review and merge.

Self-check: What should never be committed to an analytics repository, and how do you prevent it?

Resources:
- [Pro Git book](https://git-scm.com/book/en/v2) (git-scm.com)
- [GitHub Docs: Get started](https://docs.github.com/en/get-started) (GitHub)

### Reproducible Analysis Projects

recommended · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/reproducible-projects

Structuring folders, environments, parameters and documentation so an analysis can be rerun by someone else months later.

An analysis is reproducible when a colleague can take your folder, run it, and get the same numbers. That matters for audits, recurring reports and your own sanity.

#### A simple project layout
```text
project/
  README.md        # question, data sources, how to run
  data/raw/        # never edited by hand (ignored by Git)
  data/processed/  # generated by code
  queries/         # SQL
  notebooks/       # exploration, numbered 01_, 02_
  src/             # reusable Python functions
  reports/         # final outputs
  requirements.txt # or environment.yml
```

#### Environments
Pin library versions with `requirements.txt` (pip and venv) or `environment.yml` (conda), or use uv or Poetry. A notebook that worked with pandas 1.x may break on 2.x.

#### Rules that make reruns work
- Raw data is **read only**; every change happens in code.
- No hard-coded absolute paths; use paths relative to the project root.
- Parameters (dates, thresholds) live in one config cell or file.
- Notebooks should run top to bottom after "Restart and Run All".
- Record the data extract date and query used.

#### Secrets and connections
Store credentials in environment variables or a `.env` file excluded from Git, never in notebooks.

**Pitfall:** a final number that only exists because cells were run out of order. You are ready to move on when someone else can clone your repo, install the environment and reproduce your headline figure without asking you anything.

Key concepts: Project folder conventions, Raw vs processed data, Virtual environments and pinned versions, Relative paths and config, Restart and Run All discipline, Secrets in environment variables, Cookiecutter project templates.

Mini project: Restructure an old analysis into the standard layout, add a requirements file and README run instructions, then ask a friend to reproduce your main chart from a fresh clone.

Self-check: Name three things that commonly stop a notebook from producing the same result on another machine.

Resources:
- [Python venv documentation](https://docs.python.org/3/library/venv.html) (Python)
- [Cookiecutter Data Science](https://cookiecutter-data-science.drivendata.org/) (DrivenData)

## Product and Web Analytics

How user behaviour is captured as events, and the tools product and marketing teams use to analyse it.

### Event Tracking and Tracking Plans

optional · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/event-tracking

How apps and websites record user behaviour as events with properties, and how to design a tracking plan analysts can trust.

Product and web analytics start with **events**: records that something happened, such as `signup_completed` or `checkout_started`, each with a timestamp, a user or device ID, and properties.

#### Anatomy of an event
```json
{ "event": "order_completed", "user_id": "u_123", "timestamp": "2026-03-04T10:12:00Z",
  "properties": { "order_value": 42.5, "currency": "USD", "items": 3, "platform": "ios" } }
```
**User properties** (plan, country, signup date) describe the person; **event properties** describe the moment.

#### Tracking plans
A tracking plan is a shared spec listing each event, when exactly it fires, its properties with types and allowed values, and the owner. It prevents the classic mess of `Signup`, `sign_up` and `user_registered` all meaning the same thing.

#### Naming conventions
Pick one style (object_action in snake_case is common: `cart_viewed`, `item_added`) and stick to it.

#### Identity
Users browse anonymously, then log in. Tools stitch **anonymous IDs** to **user IDs** so funnels are not broken at login. Understand how your tool handles this before counting users.

#### Client vs server tracking
Client-side events (browser, app) capture interactions but get blocked by ad blockers and can be lost. Server-side events (payments, signups) are more reliable for money metrics.

#### Privacy
Get consent where required, avoid collecting personal data you do not need, and never put emails or names in event properties.

**Pitfall:** analysing events without knowing when they fire. "Purchase" on button click is not "purchase" on payment success. You are ready to move on when you can write a tracking plan for a signup and checkout flow.

Key concepts: Events, properties and user properties, Tracking plans, Event naming conventions, Identity resolution, Client-side vs server-side tracking, Consent and privacy, Customer data platforms (Segment, RudderStack).

Mini project: Write a tracking plan spreadsheet for an online course platform covering eight events from landing page to course completion, with properties, types and firing rules.

Self-check: Why might a purchase event fired on the client disagree with the payments table, and which would you trust for revenue?

Resources:
- [Mixpanel docs: tracking plan and data model](https://docs.mixpanel.com/docs/data-structure/concepts) (Mixpanel)
- [Segment docs: tracking plans](https://segment.com/docs/protocols/tracking-plan/create/) (Twilio Segment)

### Google Analytics 4

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/google-analytics

Web and app analytics with GA4: its event-based model, acquisition reports, explorations, conversions and BigQuery export.

Google Analytics 4 (GA4) is the most widely installed web analytics tool, so marketing and ecommerce analysts meet it constantly.

#### GA4's data model
Everything is an **event** with parameters. Page views, scrolls and clicks are events; so are purchases. **Key events** (formerly conversions) are events you mark as important.

#### Core reports
- **Acquisition**: where users come from, grouped by default channel groupings (Organic Search, Paid Search, Email, Referral, Direct).
- **Engagement**: pages and screens, events, engaged sessions and engagement rate.
- **Monetisation**: ecommerce purchases, revenue, items.
- **Retention**: returning users and cohort views.

#### Explorations
The Explore section lets you build free-form tables, funnels, path explorations, segment overlaps and cohort explorations. This is where analysts do most real work inside GA4.

#### UTM parameters
Campaign links tagged with `utm_source`, `utm_medium` and `utm_campaign` decide how traffic is attributed. Inconsistent tagging is the top cause of messy channel reports.

#### BigQuery export
GA4 can export raw events daily to BigQuery for free. Then you query nested event data with SQL (`UNNEST(event_params)`) and join it to CRM or order data, beyond what the interface allows.

#### Caveats
Consent mode, ad blockers, sampling in some explorations, and thresholding for small numbers mean GA4 totals rarely match backend systems exactly. Treat it as directionally right, and use backend data for revenue.

**Pitfall:** comparing GA4 revenue to finance revenue and panicking. You are ready to move on when you can build a funnel exploration in the GA4 demo account and query the public GA4 sample dataset in BigQuery.

Key concepts: GA4 event-based data model, Acquisition and channel groupings, Key events (conversions), Explorations: funnels and paths, UTM tagging, BigQuery export and UNNEST, Consent, sampling and data gaps.

Mini project: Use the GA4 demo account for the Google Merchandise Store to build a checkout funnel exploration, then reproduce one metric with SQL on the public GA4 BigQuery sample dataset.

Self-check: Why would GA4 purchase revenue differ from the orders database, and which should a finance report use?

Resources:
- [Google Analytics Help](https://support.google.com/analytics) (Google)
- [Google Analytics developer docs](https://developers.google.com/analytics) (Google)
- [Google Skillshop](https://skillshop.withgoogle.com/) (Google)

### Product Analytics Tools: Mixpanel and Amplitude

optional · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/product-analytics-tools

Self-serve event analytics for product teams: insights, funnels, retention, flows and cohorts without writing SQL.

Mixpanel and Amplitude are the two best-known product analytics tools. Product managers use them daily, and analysts are often asked to set them up, validate them and teach others.

#### What they do well
- **Insights / segmentation**: trend any event over time, broken down by any property.
- **Funnels**: ordered steps with conversion windows and breakdowns, built in seconds.
- **Retention**: cohort retention curves for any starting and returning event.
- **Flows / paths**: what users do before or after an event.
- **Cohorts**: saved groups of users ("completed onboarding but never invited a teammate") that can be reused in charts or synced to marketing tools.

#### Analyst responsibilities
- Validate that tool numbers roughly match the warehouse for key events.
- Maintain the tracking plan and lexicon (descriptions, hidden or merged events).
- Build a small set of **standard dashboards** and teach PMs to self-serve.
- Know when to leave the tool: questions joining billing, support or CRM data belong in the warehouse with SQL.

#### Warehouse-native trend
Newer setups send events to the warehouse first and let product tools read from it, so there is one source of truth.

#### Choosing between them
Both are capable; pick what your company already uses. Posthog is an open-source alternative that bundles analytics with session replay and feature flags.

**Pitfall:** trusting a funnel without checking which user identity and counting method (unique users vs totals) it uses. You are ready to move on when you can build a funnel, retention chart and cohort in a free Mixpanel or Amplitude project using their demo data.

Key concepts: Insights and segmentation reports, Funnels with conversion windows, Retention reports, Flows and path analysis, Behavioural cohorts, Validating against the warehouse, PostHog as open-source option.

Mini project: In a free Mixpanel or Amplitude demo project, build an onboarding dashboard with a funnel, a retention chart and a behavioural cohort, and write down each chart's counting method.

Self-check: What kinds of questions should move out of a product analytics tool and into warehouse SQL?

Resources:
- [Mixpanel documentation](https://docs.mixpanel.com/) (Mixpanel)
- [Amplitude documentation](https://amplitude.com/docs) (Amplitude)
- [PostHog docs](https://posthog.com/docs) (PostHog)

## Analytics Engineering

Building the tested, documented tables analysts query: ELT pipelines, dbt, orchestration and data quality checks.

### ETL, ELT and the Modern Data Stack

optional · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-analyst/elt-pipelines

How data moves from source systems into a warehouse, why ELT replaced ETL, and the layers analysts build on.

Before anyone can analyse data it has to be copied out of apps, databases and SaaS tools into one place. Understanding that journey helps you debug missing or late numbers.

#### ETL vs ELT
- **ETL** (extract, transform, load): data is cleaned on a separate server before loading. Common when warehouses were expensive.
- **ELT** (extract, load, transform): raw data is loaded first, then transformed with SQL inside the warehouse. Cheap cloud storage and compute made this the default.

#### The typical modern stack
1. **Sources**: production databases, Stripe, Salesforce, ad platforms, event trackers.
2. **Ingestion**: managed connectors (Fivetran, Airbyte, Stitch) or custom scripts copy data on a schedule.
3. **Warehouse**: BigQuery, Snowflake, Redshift, Databricks or PostgreSQL.
4. **Transformation**: SQL models, usually in dbt, turn raw tables into clean ones.
5. **Consumption**: BI tools, notebooks, reverse ETL back into business tools.

#### Layered models
- **Staging**: one model per source table, renamed and typed, no business logic.
- **Intermediate**: joins and reusable logic.
- **Marts**: final fact and dimension tables organised by business area (finance, marketing), what analysts and dashboards query.

#### Batch vs incremental
Full reloads are simple but slow on big tables. **Incremental** loads process only new or changed rows, using an updated-at timestamp or change data capture.

**Pitfall:** building dashboards directly on raw source tables whose structure changes without warning. You are ready to move on when you can draw your company's (or a hypothetical) data flow from source to dashboard and name each layer.

Key concepts: ETL vs ELT, Ingestion tools (Fivetran, Airbyte), Staging, intermediate and mart layers, Batch vs incremental loads, Change data capture, Reverse ETL.

Mini project: Draw the data flow for an ecommerce company with Shopify, Stripe and Google Ads data: ingestion, warehouse, staging, marts and three dashboards that consume them.

Self-check: Why did ELT become more popular than ETL once cloud warehouses arrived?

Resources:
- [dbt docs: what is dbt](https://docs.getdbt.com/docs/introduction) (dbt Labs)
- [Airbyte documentation](https://docs.airbyte.com/) (Airbyte)

### Transforming Data with dbt

optional · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-analyst/dbt

Writing modular SQL models with ref(), tests, documentation and incremental materialisations using dbt.

dbt (data build tool) lets analysts transform data with plain SQL SELECT statements while adding software practices: dependencies, testing, documentation and version control. It is the core skill of analytics engineering.

#### Models and ref()
A model is a `.sql` file containing a SELECT. dbt turns it into a view or table. Models reference each other with `ref()`, which builds the dependency graph:

```sql
-- models/marts/fct_orders.sql
select o.order_id, o.customer_id, o.ordered_at, p.amount
from {{ ref('stg_orders') }} o
join {{ ref('stg_payments') }} p using (order_id)
```

Raw tables are declared as **sources** and referenced with `source('shop', 'orders')`.

#### Materialisations
- **view**: default, always fresh, computed at query time.
- **table**: rebuilt each run, fast to query.
- **incremental**: only processes new rows, for large event tables.
- **ephemeral**: inlined as a CTE.

#### Tests and docs
In YAML you declare tests such as `unique`, `not_null`, `accepted_values` and `relationships`, plus column descriptions. `dbt build` runs models and tests together; `dbt docs generate` produces a browsable site with lineage.

#### Jinja and macros
Jinja templating adds loops and reusable macros, for example generating a pivot for every payment method. Use sparingly; readable SQL beats clever SQL.

**Pitfall:** putting business logic into staging models or copying the same CASE statement into many models. Centralise it in one intermediate model. You are ready to move on when you can build the dbt Jaffle Shop project with staging and mart models, tests and generated docs.

Key concepts: Models, sources and ref(), Project structure and naming, Materialisations, Generic and singular tests, Documentation and lineage, Incremental models, Jinja and macros, Semantic layer and metrics.

Mini project: Complete the dbt Jaffle Shop tutorial on DuckDB or BigQuery, then add a customer lifetime value mart with unique and not_null tests and column descriptions.

Self-check: What does ref() give you that hard-coding a table name does not?

Resources:
- [dbt documentation](https://docs.getdbt.com/) (dbt Labs)
- [dbt Learn free courses](https://learn.getdbt.com/) (dbt Labs)

### Scheduling and Orchestration with Airflow

optional · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/orchestration

Running pipelines on schedules with dependencies, retries and alerts using Apache Airflow and similar orchestrators.

Once you have several steps (ingest, transform, refresh a dashboard, send a report), you need something to run them in the right order every day and tell you when they fail. That is an **orchestrator**.

#### Core Airflow ideas
- A **DAG** (directed acyclic graph) is a Python file describing tasks and their dependencies.
- **Tasks** are units of work created from **operators**: run SQL, run a Python function, trigger dbt, call an API.
- A **schedule** (cron-like, e.g. daily at 06:00) decides when a DAG runs; each run has a **logical date** for the data interval it covers.
- **Retries, timeouts and alerts** handle flaky sources.

```python
from airflow.decorators import dag, task
import pendulum

@dag(schedule="0 6 * * *", start_date=pendulum.datetime(2026, 1, 1), catchup=False)
def daily_sales():
    @task
    def extract(): ...
    @task
    def build_models(): ...
    extract() >> build_models()

daily_sales()
```

#### Idempotency and backfills
Tasks should produce the same result when rerun for the same date, so you can safely **backfill** history after fixing a bug. Overwrite a date partition rather than appending blindly.

#### Alternatives
Dagster and Prefect offer similar ideas with a more modern developer experience; managed tools like dbt Cloud jobs or Fivetran schedules cover simple cases without an orchestrator.

**Pitfall:** writing tasks that append rows on every run, so a retry duplicates yesterday's data. You are ready to move on when you can run Airflow locally and schedule a two-task DAG that loads a CSV and builds a summary table idempotently.

Key concepts: DAGs, tasks and operators, Schedules and logical dates, Retries, timeouts and alerts, Idempotent tasks, Backfills, Dagster and Prefect.

Mini project: Run Airflow with Docker Compose and write a daily DAG that downloads a public CSV, loads it into PostgreSQL by date partition, and runs a summary query, then backfill one week.

Self-check: What does it mean for a pipeline task to be idempotent, and why does it make backfills safe?

Resources:
- [Apache Airflow documentation](https://airflow.apache.org/docs/) (Apache)
- [Dagster documentation](https://docs.dagster.io/) (Dagster)

### Data Quality Testing and Observability

optional · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-analyst/data-quality-testing

Catching bad data before stakeholders do with automated tests, freshness checks, reconciliation and ownership.

Every analyst has shipped a wrong number caused by bad upstream data. Automated data quality checks catch most of these before they reach a dashboard.

#### Dimensions of quality
- **Completeness**: are required fields filled, did all expected rows arrive?
- **Uniqueness**: no duplicate primary keys.
- **Validity**: values in allowed ranges and sets (status in a known list, amount not negative).
- **Consistency**: foreign keys match, totals agree across tables.
- **Freshness**: data updated as recently as expected.

#### Where to test
- **At ingestion**: row counts and schema changes vs the source.
- **In transformations**: dbt tests (`unique`, `not_null`, `relationships`, `accepted_values`) or libraries like Great Expectations and Soda.
- **At the output**: reconcile key metrics against a system of record (finance revenue, billing counts).

#### Observability
Beyond fixed tests, monitor **volume, freshness and distribution** over time and alert on anomalies, such as a daily row count dropping 40% or a column suddenly 30% null.

#### Response process
- Every critical table has an **owner**.
- Failed tests alert the owner, not a generic channel no one reads.
- Dashboards show a warning or data-as-of date when upstream checks fail.
- Write a short incident note after serious data issues: cause, impact, fix, prevention.

**Pitfall:** adding hundreds of tests nobody monitors, so failures become background noise. Start with keys, freshness and a few business rules on the most important tables. You are ready to move on when your pipeline fails loudly on duplicate keys and stale data.

Key concepts: Quality dimensions, Uniqueness and not-null tests, Freshness checks, Reconciliation against source systems, Great Expectations and Soda, Anomaly monitoring, Ownership and incident notes.

Mini project: Add at least eight tests to a dbt project (keys, accepted values, relationships, freshness) and one custom test that total order revenue matches payments within 0.5%.

Self-check: Which three data quality checks would you add first to an orders table feeding the revenue dashboard?

Resources:
- [dbt docs: data tests](https://docs.getdbt.com/docs/build/data-tests) (dbt Labs)
- [Great Expectations documentation](https://docs.greatexpectations.io/) (Great Expectations)

## Machine Learning for Analysts

The handful of predictive techniques analysts use most: forecasting, customer segmentation and simple predictive models.

### Time Series Forecasting

optional · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/forecasting

Projecting metrics like sales and demand with trend, seasonality, baselines, exponential smoothing and honest error measures.

Planning teams constantly ask analysts "what will next quarter look like?" Forecasting gives a structured, testable answer instead of a guess.

#### Understand the series first
- **Trend**: long-run increase or decrease.
- **Seasonality**: repeating patterns by week, month or year.
- **Holidays and events**: one-off spikes like sales events.
- **Noise**: what is left.
Plot the series and a **decomposition** before modelling anything.

#### Start with baselines
- **Naive**: next value equals the last value.
- **Seasonal naive**: next Monday equals last Monday.
- **Moving average**.
A fancy model that cannot beat these is not worth using.

#### Common methods
- **Exponential smoothing (ETS / Holt-Winters)**: weights recent observations more, handles trend and seasonality. Built into Excel as `FORECAST.ETS`.
- **ARIMA / SARIMA**: models autocorrelation; available in statsmodels.
- **Prophet**: handles multiple seasonalities and holidays with little tuning.
- **Regression with features**: price, promotions and marketing spend as drivers.

#### Evaluate honestly
- Split by time: train on the past, test on the most recent period. Never shuffle.
- Measure error with **MAE**, **RMSE** or **MAPE** (careful with values near zero).
- Show **prediction intervals**, not just a single line.

**Pitfall:** presenting a single-line forecast with false precision. Communicate a range and the assumptions. You are ready to move on when you can forecast 12 weeks of a real series, beat a seasonal naive baseline on a holdout period, and chart the prediction interval.

Key concepts: Trend, seasonality and decomposition, Naive and seasonal naive baselines, Exponential smoothing, ARIMA and SARIMA, Prophet, Time-based train/test splits, MAE, RMSE and MAPE, Prediction intervals.

Mini project: Forecast the next 12 weeks of a Kaggle store sales series using seasonal naive, Holt-Winters and one other method, and compare their MAE on the last 12 known weeks.

Self-check: Why must a forecasting test set be the most recent period rather than a random sample?

Resources:
- [Forecasting: Principles and Practice (free online)](https://otexts.com/fpp3/) (Hyndman and Athanasopoulos)
- [statsmodels documentation](https://www.statsmodels.org/stable/index.html) (statsmodels)
- [Kaggle Learn: Time Series](https://www.kaggle.com/learn/time-series) (Kaggle)

### Customer Segmentation and Clustering

optional · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/clustering-segmentation

Grouping customers with rule-based RFM segments and unsupervised clustering such as k-means, then making segments actionable.

Marketing and product teams want to treat different customers differently. Segmentation finds groups with similar behaviour so each can get a fitting message, offer or experience.

#### Start with rules: RFM
**Recency** (days since last purchase), **Frequency** (number of purchases) and **Monetary** value (total spend). Score each 1-5 by quintile and combine: "555" customers are champions, high recency with low frequency are at risk. RFM is transparent and often enough.

#### Clustering with k-means
1. Choose behavioural features (orders per month, average basket, share of discounted orders, tenure).
2. **Scale** them (standardise) so large-valued features do not dominate.
3. Run k-means for several values of k; use the **elbow method** or **silhouette score** as a guide, but prefer the k that gives interpretable groups.
4. **Profile** each cluster: average feature values, size, revenue share.
5. Name clusters in business language ("bargain hunters", "loyal big-basket").

```python
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import KMeans
X = StandardScaler().fit_transform(df[features])
df["segment"] = KMeans(n_clusters=4, n_init=10, random_state=0).fit_predict(X)
```

#### Making segments useful
A segment only matters if it leads to a different action. Check stability (do customers stay in their segment next month?), size (too small to act on?) and whether segments differ in outcomes you care about.

**Pitfall:** clustering on unscaled or highly skewed features and getting one giant cluster plus outliers. Log-transform skewed spend first. You are ready to move on when you can build RFM segments and a k-means segmentation on the same data and explain which is more useful and why.

Key concepts: RFM segmentation, Feature selection for segments, Scaling and transforming features, k-means clustering, Elbow and silhouette methods, Profiling and naming clusters, Hierarchical clustering and DBSCAN.

Mini project: Using the UCI Online Retail dataset, build RFM scores and a k-means segmentation with 3-6 clusters, profile each segment, and propose one marketing action per segment.

Self-check: Why must features be scaled before k-means, and how do you choose the number of clusters?

Resources:
- [scikit-learn: clustering](https://scikit-learn.org/stable/modules/clustering.html) (scikit-learn)
- [RFM (market research)](https://en.wikipedia.org/wiki/RFM_(market_research)) (Wikipedia)

### Predictive Modelling with scikit-learn

optional · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/predictive-modelling

Building and evaluating simple churn or conversion prediction models, and knowing when to hand off to data scientists.

Analysts are often asked "which customers are likely to churn?" or "which leads will convert?" A simple, well-evaluated classification model can answer that and is a natural extension of the regression you already know.

#### The workflow
1. **Define the target** precisely: churned within 60 days of the snapshot date.
2. **Build features** only from information available **before** the snapshot to avoid leakage.
3. **Split** into train and test sets (time-based when possible).
4. **Fit** a baseline (logistic regression), then a tree model (random forest or gradient boosting).
5. **Evaluate** on the test set.
6. **Interpret** and communicate.

```python
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report
X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.25, stratify=y, random_state=0)
model = RandomForestClassifier(n_estimators=300, random_state=0).fit(X_tr, y_tr)
print(classification_report(y_te, model.predict(X_te)))
```

#### Choosing metrics
Accuracy misleads when only 5% churn. Look at **precision** (of those flagged, how many churned), **recall** (of churners, how many we caught), **ROC AUC** and a **confusion matrix**. Tie the threshold to the business cost of a missed churner vs a wasted discount.

#### Interpretation
Use feature importance or permutation importance, and partial dependence plots, to explain drivers. Remember these show association, not causation.

#### When to hand off
Production models that retrain automatically, serve predictions in apps, or need rigorous monitoring belong with data science or ML engineering.

**Pitfall:** data leakage, such as using "number of support tickets in the churn month" as a feature. You are ready to move on when you can build a leak-free churn model, beat a logistic regression baseline and explain the precision-recall trade-off to a stakeholder.

Key concepts: Defining a prediction target, Feature engineering without leakage, Train/test splits and cross-validation, Logistic regression baseline, Tree-based models, Precision, recall, ROC AUC, Feature importance and interpretation, Handing off to data science.

Mini project: Build a churn model on the IBM Telco Customer Churn dataset from Kaggle: logistic baseline, random forest, confusion matrix at a chosen threshold, and a one-page summary for a retention manager.

Self-check: Why is accuracy a poor metric for a churn model when only 5% of customers churn?

Resources:
- [scikit-learn user guide](https://scikit-learn.org/stable/user_guide.html) (scikit-learn)
- [Kaggle Learn: Intro to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning) (Kaggle)

## Domain Analytics

How analysis looks in marketing, finance and operations teams: the specific metrics, data sources and questions in each.

### Marketing Analytics

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/marketing-analytics

Measuring channels and campaigns: attribution, ROAS, CAC by channel, incrementality tests and marketing mix basics.

Marketing spends a lot of money and wants to know which spend works. Marketing analysts connect ad platforms, web analytics and sales data to answer that.

#### Core metrics
- **Impressions, clicks, CTR, CPC, CPM**: top-of-funnel delivery metrics from ad platforms.
- **Conversion rate and CPA** (cost per acquisition).
- **ROAS**: revenue attributed to a campaign divided by its spend.
- **CAC by channel** and **payback**, tying marketing back to unit economics.

#### Attribution
When a customer sees a social ad, clicks a search ad and then comes direct, who gets credit?
- **Last click**: all credit to the final touch. Simple, over-credits search and branded terms.
- **First click**: all credit to the first touch.
- **Linear, time decay, position-based**: split credit by rule.
- **Data-driven**: algorithmic, as in GA4.
All attribution models describe correlation along the path; none prove the ad caused the purchase.

#### Incrementality
The real question is "what would have happened without this spend?" Answer it with **holdout tests** (withhold ads from a random group), **geo experiments** (turn spend off in some regions), or platform lift studies.

#### Marketing mix modelling (MMM)
Regression on weekly spend by channel, controlling for seasonality and price, estimates each channel's contribution. Open-source tools like Meta's Robyn and Google's Meridian exist; it is an advanced topic.

**Pitfall:** trusting each ad platform's self-reported conversions, which double count across platforms. You are ready to move on when you can compare last-click and linear attribution on a sample dataset and explain why neither measures incrementality.

Key concepts: CTR, CPC, CPM and CPA, ROAS, Attribution models, Incrementality and holdout tests, Geo experiments, Marketing mix modelling, Campaign and UTM reporting.

Mini project: Build a synthetic dataset of multi-touch customer journeys, compute channel credit under last-click, first-click and linear attribution, and present how channel rankings change.

Self-check: Why can a channel look great under last-click attribution yet have almost no incremental effect?

Resources:
- [Google Analytics Help: attribution](https://support.google.com/analytics) (Google)
- [Google Skillshop](https://skillshop.withgoogle.com/) (Google)
- [Meridian marketing mix model docs](https://developers.google.com/meridian) (Google)

### Financial Analytics and FP&A Basics

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/finance-analytics

Reading financial statements, budgeting vs actuals, variance analysis and the finance vocabulary analysts need.

Finance teams care about the same data as everyone else but through the lens of accounting rules, budgets and forecasts. Analysts who speak this language are trusted with high-stakes work.

#### The three statements
- **Income statement (P&L)**: revenue, cost of goods sold, gross profit, operating expenses, operating income, net income over a period.
- **Balance sheet**: assets, liabilities and equity at a point in time.
- **Cash flow statement**: cash from operations, investing and financing. Profit is not cash.

#### Key concepts
- **Revenue recognition**: revenue is booked when earned, not when paid. An annual subscription paid upfront is recognised monthly, which is why product "bookings" and finance "revenue" differ.
- **Gross vs net revenue**: before or after refunds, discounts and taxes.
- **EBITDA**: earnings before interest, taxes, depreciation and amortisation, a rough operating profitability measure.
- **Fixed vs variable costs** and **contribution margin**.

#### Budget vs actual and variance analysis
FP&A (financial planning and analysis) compares actual results to budget and forecast every month. **Variance analysis** splits differences into drivers: a revenue miss might be volume (fewer orders), price (lower average price) or mix (more low-price products). This is metric decomposition applied to money.

#### Tools and habits
Excel remains central: three-statement models, scenario tables, sensitivity analysis. Reconcile your numbers with the general ledger, and label currency, period and whether figures are audited.

**Pitfall:** reporting product revenue that conflicts with finance's recognised revenue without explaining the definitional difference. You are ready to move on when you can build a budget vs actual table and explain a variance using price, volume and mix.

Key concepts: Income statement, balance sheet, cash flow, Revenue recognition vs bookings, Gross margin, EBITDA and contribution margin, Budget vs actual reporting, Price, volume and mix variance, Scenario and sensitivity analysis, Reconciling to the general ledger.

Mini project: Create a monthly budget vs actual workbook for a small online store with price, volume and mix variance on revenue and a short commentary on the three biggest variances.

Self-check: A customer pays 1,200 upfront for an annual plan in January. How much revenue does finance recognise in January and why?

Resources:
- [Investopedia: financial statements](https://www.investopedia.com/terms/f/financial-statements.asp) (Investopedia)
- [Khan Academy: finance and capital markets](https://www.khanacademy.org/economics-finance-domain/core-finance) (Khan Academy)

### Operations and Supply Chain Analytics

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/operations-analytics

Analysing throughput, inventory, service levels, capacity and process efficiency for operations, logistics and support teams.

Operations analytics looks at how work flows through a business: orders shipped, tickets resolved, drivers dispatched, stock replenished. The goal is usually doing more, faster, at lower cost without hurting quality.

#### Common metrics
- **Throughput**: units processed per hour or day.
- **Cycle time and lead time**: how long from start to finish, reported as medians and percentiles (p90), not just averages.
- **Utilisation**: share of capacity in use. Near 100% utilisation causes queues to explode.
- **Service level / SLA attainment**: share of orders delivered on time or tickets answered within target.
- **Inventory**: stock on hand, days of inventory, turnover, stockout rate.
- **Quality**: defect rate, returns, first contact resolution in support.

#### Typical analyses
- **Bottleneck analysis**: find the process step with the longest wait or lowest capacity; improving any other step barely helps.
- **Demand vs capacity planning**: forecast volume by hour or day and staff to it (support agents, warehouse shifts).
- **Inventory policy**: reorder points and safety stock trade off holding costs against stockouts.
- **ABC analysis**: rank products by revenue or volume share to focus attention on the vital few.
- **Variation analysis**: control charts separate normal noise from real process changes.

#### Data sources
Warehouse management systems, ERP, ticketing tools and logistics event logs, often with messy timestamps and status codes that need careful cleaning.

**Pitfall:** optimising the average while ignoring the tail. Customers remember the order that took 12 days. You are ready to move on when you can compute cycle time percentiles by stage from an event log and identify the bottleneck.

Key concepts: Throughput, cycle time and lead time, Percentiles and SLA attainment, Utilisation and queues, Inventory metrics and turnover, Bottleneck analysis, ABC analysis, Control charts, Staffing and capacity planning.

Mini project: Using the Brazilian Olist ecommerce dataset from Kaggle, compute order-to-delivery cycle time by stage and state, report p50 and p90, and identify the stage that most drives late deliveries.

Self-check: Why can raising utilisation from 85% to 98% make wait times much worse?

Resources:
- [Supply chain management (overview)](https://en.wikipedia.org/wiki/Supply_chain_management) (Wikipedia)
- [Control chart](https://en.wikipedia.org/wiki/Control_chart) (Wikipedia)
- [Kaggle datasets](https://www.kaggle.com/datasets) (Kaggle)

## Portfolio, Case Studies and Job Search

Proving your skills with end-to-end projects, writing them up as case studies, and presenting yourself to employers.

### Building a Portfolio of Analysis Projects

core · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/data-analyst/portfolio-projects

Choosing three to five end-to-end projects with real data, real questions and visible SQL, Python and BI skills.

Employers hiring junior analysts cannot see your judgement from a certificate. A small portfolio of well-chosen projects shows it directly.

#### What a strong project has
- **A real question** with a decision attached, not "exploring the Titanic dataset".
- **Messy, realistic data**: public APIs, government open data, scraped data, or large Kaggle datasets that need cleaning.
- **The full lifecycle**: framing, cleaning, analysis, visualisation and a recommendation.
- **Visible code**: SQL and notebooks on GitHub with a clear README.
- **A polished output**: a dashboard link, a short slide deck or a written summary.

#### A balanced set of three to five
1. A **SQL-heavy** business analysis (cohorts, funnels, window functions) on a relational dataset.
2. A **Python** cleaning and EDA project on messy data.
3. A **BI dashboard** published publicly (Tableau Public, Power BI publish-to-web with sample data, or Looker Studio).
4. An **experiment or statistics** project (A/B test analysis, regression).
5. Optional: a **domain project** matching the industry you want (marketing attribution, finance variance, operations).

#### Finding data
Government portals (data.gov, data.gov.uk, data.gov.in), city open data, the World Bank, Kaggle, Google BigQuery public datasets, and APIs from services you use.

#### Quality over quantity
Three deep projects beat ten tutorial clones. Recruiters skim, so each project needs a one-line result at the top of the README.

**Pitfall:** only using clean, overused datasets (Titanic, Iris) that every applicant has. You are ready to move on when you have three projects, each with a question, code, an output and a one-line finding.

Key concepts: Choosing a decision-driven question, Finding realistic public data, SQL business analysis project, Python cleaning and EDA project, Published BI dashboard, Experiment or statistics project, Domain-specific project, README with headline finding.

Mini project: Plan your portfolio: list three to five project ideas with the question, dataset URL, tools and expected output for each, then complete the first one end to end.

Self-check: What makes a portfolio project stand out compared with a completed tutorial notebook?

Resources:
- [Kaggle datasets](https://www.kaggle.com/datasets) (Kaggle)
- [Data.gov open data](https://data.gov/) (US Government)
- [BigQuery public datasets](https://cloud.google.com/bigquery/public-data) (Google Cloud)

### Writing Portfolio Case Studies

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/case-study-writeups

Presenting each project as a short case study: problem, approach, findings, impact and what you would do next.

A project nobody understands in 60 seconds does not help your job search. Turn each portfolio project into a **case study** that a recruiter can skim and a hiring manager can dig into.

#### A case study structure
1. **Headline**: one sentence with the result. "Found that 40% of late deliveries come from one carrier in two states."
2. **Problem**: who cares about this and why.
3. **Data**: sources, size, time period and the main cleaning challenges.
4. **Approach**: the key steps and techniques, briefly, with links to code.
5. **Findings**: three to five findings, each with one chart and a takeaway title.
6. **Recommendation and impact**: what a business should do, and an estimate of the effect.
7. **Limitations and next steps**: what you would do with more time or data.

#### Where to publish
- The **README** of the GitHub repo.
- A simple personal site (GitHub Pages, Notion, or a blog platform).
- A LinkedIn post or article summarising the headline and linking to the full write-up.

#### Showing judgement
Hiring managers look for: sensible definitions, awareness of bias and data quality, honest caveats, and a recommendation that follows from the evidence. Mention a decision you made and why ("I excluded test accounts, which removed 3% of orders").

#### Keep it visual and short
Aim for a five-minute read. Use images of charts rather than raw notebook output, and put the long technical details in the notebook.

**Pitfall:** writing a chronological diary of every step. Lead with the result. You are ready to move on when each of your projects has a case study with a one-sentence headline a stranger can understand.

Key concepts: Headline result first, Problem and data context, Approach with links to code, Findings with takeaway charts, Recommendation and impact, Limitations and next steps, Publishing on GitHub Pages or a blog.

Mini project: Write a case study for your strongest project following the seven-part structure, publish it as a README or GitHub Pages site, and share it with two people for feedback.

Self-check: What should a recruiter learn from the first two lines of your case study?

Resources:
- [GitHub Pages documentation](https://docs.github.com/en/pages) (GitHub)
- [Storytelling with Data blog](https://www.storytellingwithdata.com/blog) (Storytelling with Data)

### Resume, LinkedIn and the Analyst Job Search

recommended · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-analyst/job-search

Writing an impact-focused analyst resume, targeting roles, networking and planning a steady application process.

Getting a first analyst role is partly a skills problem and partly a marketing problem. Treat your job search like a project with a funnel of its own.

#### Resume essentials
- One page for early career, clean single-column layout that passes applicant tracking systems.
- A **skills line** grouped by type: SQL (PostgreSQL, BigQuery), Python (pandas), BI (Power BI), spreadsheets, statistics.
- Bullets in the form **action + what + result**: "Built a cohort retention model in SQL that identified a 12-point drop in week-4 retention for mobile users."
- Quantify wherever possible: rows, time saved, revenue affected, people served.
- Link your portfolio and GitHub at the top.

#### LinkedIn
Headline with your target role and core tools, an About section with a short story, featured links to case studies, and occasional posts about what you are building.

#### Targeting
- Titles to search: data analyst, business analyst, product analyst, reporting analyst, BI analyst, junior analyst, analytics intern.
- Tailor the top third of your resume to each posting's tools and domain.
- Industries that hire many analysts: ecommerce, fintech, consulting, healthcare, logistics, SaaS.

#### The application funnel
Track applications, responses and interviews in a spreadsheet. If response rates are low, fix the resume; if interviews stall, fix interview prep. Referrals and messages to hiring managers convert far better than cold applications.

**Pitfall:** listing every tool you have touched with no evidence. You are ready to move on when your resume has at least four quantified bullets linked to real projects and you are tracking applications weekly.

Key concepts: ATS-friendly resume format, Impact-focused bullet points, Skills section by category, LinkedIn profile and posting, Tailoring to job descriptions, Networking and referrals, Tracking your application funnel.

Mini project: Rewrite your resume with quantified bullets for each portfolio project, tailor it to two real postings, and set up a tracking sheet with stage, date and outcome for every application.

Self-check: Rewrite the bullet 'Used SQL to analyse data' so it shows action, scope and result.

Resources:
- [Google career certificates: data analytics](https://grow.google/certificates/data-analytics/) (Google)
- [LinkedIn Help: profile](https://www.linkedin.com/help/linkedin) (LinkedIn)

## Interview Preparation

Getting through analyst interviews: timed SQL problems, business case questions, statistics and product sense, and take-home assignments.

### SQL Interview Challenges

core · intermediate · about 15 h · https://www.internhack.in/roadmaps/tracks/data-analyst/sql-interviews

Solving timed SQL problems on joins, aggregation, window functions and dates, and talking through your approach clearly.

Nearly every analyst interview includes live or timed SQL. The questions repeat a small set of patterns, so deliberate practice pays off quickly.

#### Patterns to master
- **Top N per group**: `ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC)` then filter `rn <= 3`.
- **Running totals and moving averages** with window frames.
- **Period over period**: `LAG()` for month-over-month growth.
- **Gaps and islands / consecutive days**: subtract a row number from the date to group streaks.
- **Anti-joins**: customers with no orders using `LEFT JOIN ... WHERE o.id IS NULL` or `NOT EXISTS`.
- **Conditional aggregation**: `SUM(CASE WHEN ... THEN 1 ELSE 0 END)` to pivot.
- **Retention and funnels**: first event per user, then join back.
- **Deduplication**: keep the latest row per key.

#### How to approach a question live
1. **Clarify**: grain of each table, duplicates, nulls, ties, time zone.
2. **Describe the plan** out loud before typing.
3. Build step by step with **CTEs**, checking intermediate results.
4. **Test edge cases**: empty groups, ties, nulls.
5. Mention **performance** if tables are large.

#### Practice routine
Solve two or three problems daily for a few weeks, mixing easy and medium. Time yourself (15-20 minutes each), and rewrite solutions you struggled with a few days later from scratch.

**Pitfall:** silently writing a huge query and debugging it in panic. Narrate and build in small pieces. You are ready to move on when you can solve medium window-function problems in under 20 minutes while explaining your reasoning.

Key concepts: Top N per group, Running totals and moving averages, LAG and period-over-period, Gaps and islands, Anti-joins and NOT EXISTS, Conditional aggregation, Deduplication patterns, Thinking aloud and clarifying.

Mini project: Solve 40 SQL problems over four weeks across the eight patterns, keep a notebook of each pattern with your cleanest solution, and do two mock interviews with a friend.

Self-check: Write, from memory, a query returning each customer's second most recent order.

Resources:
- [HackerRank SQL practice](https://www.hackerrank.com/domains/sql) (HackerRank)
- [LeetCode database problems](https://leetcode.com/problemset/database/) (LeetCode)
- [SQLBolt interactive lessons](https://sqlbolt.com/) (SQLBolt)
- [Mode SQL Tutorial](https://mode.com/sql-tutorial) (Mode)

### Business Case and Analytics Case Interviews

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/case-interviews

Structuring open-ended business questions, estimating sizes, and walking an interviewer through a metric investigation.

Case interviews test whether you can think like an analyst without a computer. Typical prompts: "Bookings dropped 10% last week. How would you investigate?" or "How would you measure the success of a new feature?"

#### A general structure
1. **Clarify** the goal, the metric definition, the time frame and the scope.
2. **Lay out a framework** before diving in: say how you will break down the problem.
3. **Prioritise** the most likely branches and ask for data.
4. **Interpret** numbers the interviewer gives you and update your hypothesis.
5. **Conclude** with a recommendation and next steps.

#### Common case types
- **Metric drop investigation**: data issue check, seasonality, decomposition (traffic × conversion × value), segments, events.
- **Measuring a launch**: define success metrics, guardrails, and how to separate the feature's effect (A/B test or before/after with controls).
- **Market sizing / estimation**: top-down (population × share × frequency × price) or bottom-up. State assumptions and round numbers.
- **Business decision**: should we enter a market, raise prices, add a product? Weigh revenue, cost and risk.

#### Talking through it
Think aloud, write your structure where the interviewer can see it, and summarise every few minutes. It is fine to change your mind when new information arrives; it shows judgement.

#### Practice
Use prompts from friends or public collections, time yourself for 20-30 minutes, and record answers to review your structure and clarity.

**Pitfall:** jumping into a random list of causes with no structure. You are ready to move on when you can answer "why did metric X drop?" with a clear tree in under five minutes of setup.

Key concepts: Clarifying questions, Structuring with frameworks and trees, Metric drop investigations, Measuring feature success, Market sizing and estimation, Business decision cases, Summarising and concluding.

Mini project: Write out full answers to six case prompts (two metric drops, two launch measurements, one market sizing, one pricing decision) and practise delivering two of them aloud in under 20 minutes each.

Self-check: Estimate the number of food delivery orders placed in your city per day, stating every assumption.

Resources:
- [Fermi problem (estimation technique)](https://en.wikipedia.org/wiki/Fermi_problem) (Wikipedia)
- [Kaggle Learn](https://www.kaggle.com/learn) (Kaggle)

### Statistics and Experimentation Interview Questions

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-analyst/stats-product-interviews

Explaining p-values, confidence intervals, A/B test design and common pitfalls clearly in interview conditions.

Product analyst and data analyst interviews often include statistics questions. They test understanding and communication more than formulas.

#### Concepts you must explain simply
- **Mean vs median** and when each misleads.
- **Standard deviation vs standard error**.
- **p-value**: the probability of seeing a result at least this extreme if there were truly no effect. Not the probability the hypothesis is true.
- **Confidence interval**: a range of plausible values for the true effect produced by a method that captures it 95% of the time.
- **Type I and II errors**, **power**, and what sample size depends on.
- **Correlation vs causation** with a concrete confounder example.

#### A/B testing questions
- How do you choose the **primary metric** and **guardrails**?
- How long should the test run? (Sample size from baseline rate, minimum detectable effect, power; full weekly cycles.)
- What is **peeking** and why is stopping early a problem?
- What is **sample ratio mismatch** and what does it indicate?
- How would you handle **novelty effects**, **network effects**, or many simultaneous metrics (multiple testing)?
- The test is significant but the effect is tiny: should we launch?

#### Answering well
Give the intuition first, then the technical detail, then an example. Say what you would check before trusting a result.

#### Practice
Explain each concept to a non-technical friend in under a minute, and work through a few sample-size calculations by hand or with an online calculator.

**Pitfall:** reciting definitions without being able to apply them to a scenario. You are ready to move on when you can design an A/B test end to end aloud, including sample size reasoning and how you would read ambiguous results.

Key concepts: Explaining p-values and CIs simply, Standard deviation vs standard error, Type I, Type II errors and power, Designing an A/B test aloud, Peeking and early stopping, Sample ratio mismatch, Network and novelty effects.

Mini project: Write one-paragraph plain-language explanations of ten statistics concepts, then record yourself designing an A/B test for a checkout change in under ten minutes.

Self-check: An A/B test shows p = 0.03 for a 0.1% lift in conversion. What else would you want to know before recommending launch?

Resources:
- [Khan Academy: statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)
- [OpenIntro Statistics (free textbook)](https://www.openintro.org/book/os/) (OpenIntro)

### Take-Home Assignments and Presentation Rounds

recommended · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-analyst/take-home-assignments

Scoping, completing and presenting take-home data challenges within the time limit while showing clear judgement.

Many companies send a dataset and a prompt and ask for results within a few days, followed by a presentation round. It is the closest simulation of the real job, so treat it like one.

#### Before you start
- Read the prompt twice and list the explicit questions.
- Note the **time guidance** (often 3-5 hours). Going far over it can look like poor prioritisation.
- Ask clarifying questions by email if something is truly ambiguous, and state assumptions otherwise.

#### Doing the work
1. **Profile the data**: row counts, keys, nulls, duplicates, date ranges. Report anything odd.
2. **Answer the asked questions first**, then add one or two extra insights if time allows.
3. Keep the analysis simple and correct rather than sophisticated and fragile.
4. Validate totals and sanity-check key numbers.

#### What to submit
- A short **summary document or slide deck** with answers first, charts with takeaway titles, and recommendations.
- **Clean, runnable code** (SQL files or a notebook that runs top to bottom) with brief comments.
- A section on **assumptions, data issues and next steps**.

#### The presentation round
Expect 15-30 minutes of presenting plus questions. Open with the answers, spend most time on the two or three findings that matter, and have backup detail ready. Interviewers often probe choices ("why did you exclude these rows?"), so know your reasoning.

**Pitfall:** delivering a 60-cell notebook with no summary. Reviewers may read only the first page. You are ready to move on when you can complete a practice take-home in four hours with a two-page summary and runnable code.

Key concepts: Reading and scoping the prompt, Time management, Profiling and flagging data issues, Answer-first summary deck, Runnable, commented code, Stating assumptions, Presentation and Q&A round.

Mini project: Do a timed four-hour mock take-home on a Kaggle ecommerce dataset with three business questions you write in advance, then present it to a friend in 15 minutes and collect feedback.

Self-check: You find 8% of orders have negative amounts in a take-home dataset. What do you do and how do you report it?

Resources:
- [Kaggle datasets](https://www.kaggle.com/datasets) (Kaggle)
- [Google Technical Writing courses](https://developers.google.com/tech-writing) (Google)

## Related

- [Career roadmaps](https://www.internhack.in/roadmaps)
