Learn by Directing AI
Unit 1

Diego's email and the FitPro data

Step 1: Diego's email

Diego Vargas runs Movimiento Fitness, a chain of four boutique fitness studios across Costa Rica's Central Valley. Two in San Jose, one in Escazu, one in Heredia. About 2,400 active members, thirty-five employees, and a fifth location planned for next year.

Open the chat with Diego. Read his email. Five requirements:

  1. All four locations' health at a glance -- no scrolling to find the important number
  2. Fair comparison across locations -- they're different, the numbers need to account for that
  3. Retention tracking month by month -- cohort-level, not just a single percentage
  4. Filters for location, time period, and membership type
  5. Investor-ready -- something he can screenshot and send

Diego is fast, high-energy, and mixes English and Spanish. He sends long emails from his phone. He cares most about retention -- members signing up and disappearing after three months is the problem keeping him up at night.

Step 2: Project setup

Open a terminal and start Claude Code:

cd ~/dev
claude

Paste this prompt:

Create the folder ~/dev/analytics/p4. Download the project materials from https://learnbydirectingai.dev/materials/analytics/p4/materials.zip and extract them into that folder. Read CLAUDE.md -- it's the project governance file. If anything needs admin access, tell me what to run in a separate terminal.

Claude creates the folder, downloads the materials, and reads CLAUDE.md. That file describes Diego's situation, the deliverables, the tech stack, and the work breakdown. Once Claude confirms it has read CLAUDE.md, you are set up.

Confirm Docker and Metabase are still running from P3. If they are not, direct Claude to restart them using the docker-compose from the previous project.

Step 3: Membership types

Open materials/membership-types.md. Four tiers: unlimited, 8-class, 4-class, and drop-in. Note the standard pricing -- unlimited at about 48,000 CRC per month, 8-class at 33,000, 4-class at 21,000, drop-in at 7,200 per visit.

This is standard pricing. Keep in mind that Diego mentioned comparing locations "fairly." If pricing differs between locations, these standard numbers will not tell the full story. You will find out whether they differ when you look at the data.

Step 4: Data profiling

The FitPro export (materials/fitpro-export.csv) is a single file covering all four locations and twelve months of data. Member sign-ups, cancellations, class bookings, and revenue transactions. About 15,000 rows.

Direct AI to load the data into DuckDB and profile it. Be specific -- profile one thing at a time:

Load materials/fitpro-export.csv into DuckDB. Show me the column names, types, and row count.

Then:

Show me the distinct values and counts for the location column.

Then:

Profile each column: null counts, distinct value counts, value ranges for numeric columns, date ranges for date columns.

Breaking this into separate requests keeps each response focused. A single "profile everything" request forces AI to hold too many concerns at once and you get a wall of output that is harder to verify.

Step 5: Initial patterns

Look at what the profiling reveals. Four locations with different member counts. Revenue varying by location. Class booking patterns across five class types. Cancellation dates that suggest when members leave.

Direct AI to show member counts by location:

How many unique members are in each location? How many are currently active (no cancellation record)?

Note anything that seems off or worth investigating. Members with zero revenue. Revenue amounts that are noticeably higher at one location. Class types with very different attendance patterns. These are signals, not problems -- you will investigate them in the next unit.

✓ Check

Check: How many unique members are in the dataset? How many are currently active (no cancellation date)? Do these counts match Diego's claim of 2,400 active members?