| type | skill |
| lifecycle | stable |
| inheritance | inheritable |
| name | data-preparation |
| description | Data cleaning, profiling, transformation, and quality gates -- prepares raw data for visualization and analysis |
| tier | standard |
| applyTo | **/*data*,**/*clean*,**/*transform*,**/*prep*,**/*pivot*,**/*aggregate* |
| currency | 2026-08-15T00:00:00.000Z |
| lastReviewed | 2026-08-15T00:00:00.000Z |
Data Preparation
Prepare raw data for visualization. This module fires after ingestion and before
chart selection. It does not analyze or visualize; it makes data ready for those
steps.
When to Use
- Raw data has nulls, duplicates, or inconsistent types
- Data needs aggregation, pivoting, or reshaping for the target visual
- The brief specifies quality concerns
- You are unsure whether the data is visualization-ready
When to Skip
- Data is already clean, typed, and shaped for the target visuals
- The dataset is small and you can verify quality by inspection
- The brief says "data is analysis-ready"
State why you are skipping. Silent skips hide data problems.
Step 1: Profile
Before cleaning, understand what you have. Run these checks on every column:
| Check | What to look for |
|---|
| Row count | Is it what you expected? Zero rows = ingestion failed |
| Column types | Dates stored as strings? Numbers as text? |
| Null count | Which columns have nulls? What percentage? |
| Unique count | Cardinality: is this a dimension (low) or measure (high)? |
| Min / Max / Mean | For numeric columns: are ranges plausible? |
| Sample values | Eyeball 5 rows. Do they look right? |
Report the profile as a table before proceeding. The user (or orchestrator)
needs to see it to decide what cleaning is needed.
Step 2: Clean
Apply fixes in this order. Each fix is a decision; state what you chose and why.
2a. Duplicates
| Signal | Action |
|---|
| Exact duplicate rows | Remove. Log count removed. |
| Near-duplicates (same key, different values) | Flag for user decision. Do not silently drop. |
2b. Null handling
| Strategy | When to use |
|---|
| Drop row | Null is in a must-have column and row is < 5% of data |
|