CSV, JSON or nothing: habit data export formats compared
What each format keeps, what it silently drops, and which one to ask for.
Two apps can both advertise CSV export and give you completely different things. One writes a row per entry with a date, a habit name and a value. The other writes a wide grid with one column per day, no header, and ticks encoded as the letter x. Both are CSV. Only one of them can be analysed without an hour of cleanup.
The differences that matter are structural rather than cosmetic. Long format, one row per observation, survives adding a habit and is what every analysis tool expects. Wide format breaks the moment your habit list changes. Timestamps versus dates decides whether you can ever look at completion times. Whether skipped and scheduled days are recorded at all decides whether your completion rate can be recomputed, or whether you have to take the app’s word for it.
JSON exports are usually richer, because the app is dumping its own model rather than flattening it, and that means they often contain the schedule, the target and the streak history that a CSV drops. They are also more work to parse and more likely to change shape between versions.
This page defines a canonical long format, compares what the main iOS trackers actually emit against it, and gives conversion snippets for the four shapes you are most likely to be handed.
Outline
Status: outline. The introduction above is finished copy. Everything below is the section plan for the full draft, targeted at about 1 300 words.
- The canonical shape. Long format, ISO dates, one row per observation.
- Long versus wide. Why wide breaks the first time you add a habit.
- What gets dropped. Timestamps, skips, schedules and targets.
- JSON exports. Richer, more brittle, and worth taking anyway.
- What the main apps emit. A table, with a sample row from each.
- Conversion snippets. Four shapes to canonical, in a few lines each.