AI Hints
Home›Data Science Tutorial›What Data Science Is
Data Science · Lesson 2 of 101

The Data Science Family

Analyst, scientist, engineer.

⏱ 2 min read▶ Video at 4:11🎓 Free
Watch this lesson in the Data Science courseWatch on YouTube ↗Full Data Science course

Job titles in data are confusing. Data analyst, data scientist, machine learning engineer, and data engineer. Companies use them differently. But the jobs themselves are quite clear, once you see how data flows through a company.

The Data Science Family
From the video: The Data Science Family
  • Confusing job titles
  • The work itself is clear
  • Follow the data

How data flows through a company

Data engineers build the pipes, moving raw data into clean tables. Data analysts ask what happened, and why, using SQL and dashboards. Data scientists ask what will happen, and what caused it, using statistics and models. And machine learning engineers put models into real products. In a small company, one person does all of this. This course makes you strong in the middle.

  1. Data engineerbuilds the pipes
  2. Analystwhat happened?
  3. Scientistwhy, and what next?
  4. ML engineerships models
How data flows through a company
From the video: How data flows through a company

Four kinds of question

Questions get harder as you go. Descriptive asks what happened. Diagnostic asks why it happened. Predictive asks what will happen. And prescriptive asks what we should do. Most business value comes from doing the first two very well. Don't jump to prediction, if nobody has answered what happened.

Descriptivewhat happened?
Diagnosticwhy did it happen?
Predictivewhat will happen?
Prescriptivewhat should we do?

A surprise in the data

Let's try a diagnostic question. The founder believes that food is the future of the business. Is it? We compare profit margin by category. Run it. Look at the margin column. Tea and coffee earn far more on each dollar than food does. That single table could change the company's whole strategy, and it took five lines. Always check the numbers behind a strong opinion.

margins.pypython
import pandas as pd

sales = pd.read_csv("sales.csv")

margin = sales.groupby("category")[["revenue", "profit"]].sum()
margin["margin"] = (margin["profit"] / margin["revenue"]).round(3)
print(margin.sort_values("margin", ascending=False).round(0).to_string())
Output
            revenue     profit  margin
category
Tea        393887.0   331849.0     1.0
Coffee    4234893.0  2872439.0     1.0
Food      1824344.0   987609.0     1.0

Summary

Now you know how the data family fits together, and the four kinds of question. Next, the workflow that keeps you from getting lost.

Key takeaways
  • Engineer, analyst, scientist
  • What, why, what next, what to do
  • Check opinions against data
Next up: The Data Science Workflow — from question to decision