Skip to content

Habit tracker + dashboards

TL;DR — Annotate habits in your daily note with inline Dataview metadata. Build a single dashboard note that shows streaks, heatmaps, and per-habit trends. Your habit data becomes a second-brain metric, viewable alongside notes and goals.

In your daily note, add a habits section the template generates:

## Habits
- exercise:: true
- meditation:: 10
- writing:: 500
- alcohol:: false
- sleep_hours:: 7.5

The :: is Dataview’s inline metadata syntax. Each line becomes a queryable field on this day’s note.

Be honest. Tracking dishonest data is worse than tracking nothing.

Create 30-Areas/health/habits-dashboard.md:

# Habits dashboard
## Exercise — last 30 days
```dataview
CALENDAR file.day
FROM "10-Daily"
WHERE exercise = true AND date(file.day) >= date(today) - dur(30 days)
```
## Writing words this week
```dataview
TABLE writing AS "Words", file.day AS "Day"
FROM "10-Daily"
WHERE writing AND date(file.day) >= date(today) - dur(7 days)
SORT file.day DESC
```
## Streak: meditation
```dataview
LIST file.day AS "Day"
FROM "10-Daily"
WHERE meditation > 0
SORT file.day DESC
LIMIT 7
```

Pin this note to your sidebar. Open weekly during your review.

The community plugin Tracker gives you proper line/bar charts. Install if you want visual graphs beyond Dataview’s tables.

Example chart:

```tracker
searchType: dvField
searchTarget: sleep_hours
folder: 10-Daily
startDate: -30d
endDate: today
line:
title: Sleep hours, last 30 days
yAxisLabel: Hours
lineColor: "#7c5cff"
```
  • Daily Driver can prompt you to log habits if today’s note doesn’t have them yet (“you skipped habits yesterday — track them now?”)
  • Weekly Review can pull habit stats automatically: “Exercise: 5/7 days. Writing: 3200 words. Sleep avg: 7.1h.”
  • A new skill habit-correlate could find correlations: “On weeks you exercised 5+ times, your mood scores averaged 8.2. On weeks you exercised fewer than 3 times, 6.4.”

Don’t track 15 habits. Track 3–5 you actually care about, for 90 days, before deciding what to do next. Over-instrumented systems get abandoned. Under-instrumented systems teach you the truth.