Habit Tracker

You know that recency bias that happens when you learn of something, then you notice it everywhere? Well, that’s been happening with Atomic Habits.

First Cindy brought it home, then I read it, then we had the author James Clear present at our yearly kick-off at work!

During the virtual presentation, while he was discussing habit tracking, I shared that I use Notion.so to create a monthly tracker. I like that I can update it from my phone or desk, and I like that it gives me the percentages of days I completed a task.

I shared a screenshot in Slack

table of days in January, with checkboxes for tasks completed

and was asked “how hard was that to make?”

It wasn’t that difficult, but adding each day as a row turned out to be painful.

Instead of creating the next months, I wrote a script to use Notion’s API to do it automatically.

It was a fun Saturday morning to work with an API, an open-source client, and hack together something I find useful. You can find the scripts and instructions on my Github, or if you prefer, you can just get this year’s trackers that you can copy and modify directly on my Notion pages.

Two caveats. Because the APIs are not fully formed, there are some things I wanted to do that were not available;

  1. Columns created via the API alphabetically sorted, so I had to add a prefix (e.g. “a Date”, “b Exercise”) to get them in the order I wanted. I have to go and manually edit them to remove the prefix.
  2. The “Calculate” feature for a column can’t be added programmatically. This is one of the features that I find really useful in tracker. It’s not too hard to add manually.