One table split across sheets
Rows that belong in one table are spread over several sheets or files, one per month, region, or person.
What it looks like
Before
| sheet | month | donor | amount |
|---|---|---|---|
| Jan | · | Ana Ruiz | 50 |
| Feb | · | Ben Cho | 75 |
| Feb | · | Ana Ruiz | 50 |
After
| sheet | month | donor | amount |
|---|---|---|---|
| combined | Jan | Ana Ruiz | 50 |
| combined | Feb | Ben Cho | 75 |
| combined | Feb | Ana Ruiz | 50 |
How it happens
- A new sheet was started each period to keep things manageable.
- Each team or site kept its own copy of the same template.
- A system limited the size of each export, so the data arrived in pieces.
What it breaks
- No question that spans sheets can be answered without combining them by hand each time.
- The fact that distinguishes the sheets lives in a tab or file name, where formulas and imports do not see it.
- The sheets drift apart: a column is added to one, renamed in another, and reordered in a third.
How to spot it
- Look for tabs or files named after periods, places, or people, each with a similar layout.
- Compare the headers of every sheet. Small differences show where the copies have drifted.
- Check for rows that appear in more than one sheet, such as a record carried over from one month to the next.
How to fix it
- Add a column to each sheet for whatever its name was recording, before combining.
- Bring the column names and order into agreement. See inconsistent column names across files.
- Stack the sheets into one table, and check that the combined row count equals the sum of the parts.
- Check for overlap afterward. Whether a row repeated across sheets is a duplicate or a real repeat is a judgment about the data.
- Inconsistent column names across filesFiles that should share one layout name the same column differently, or use the same name for different things.
- Wide tables that should be longValues of one variable, such as months or years, are spread across the column headers instead of being stored in a column of their own.
- Exact duplicate rowsThe same row appears more than once, identical in every column.
TermsSpreadsheet, Schema, Provenance, Tidy data