how it works

a brief introduction to how habitmap works. if this is your first time using habitmap, please read this before moving on to any other sections.

steps

what are steps?

steps are the number of different values that any record can have. if a habit only has the option to be marked as done or not done, we count that as one step. if a habit has two steps, one would be allowed to mark the habit as done, undone or half-done. similar rules apply for three or four steps.

here is an example for a habit with 4 steps.

x in step x of 4desc
0the habit has not been done at all.
1the user is one step closer to their goal (for the day).
2the user is halfway towards their goal.
3the user is one step away from their goal.
4the user's goal for the day is reached.

the stepno for any habit is the number of steps that habit has. due to the limitations of the characters that can be printed, the max stepno is 4.

here is a quick conversion table:

(x, y) in step x of ysame step if habit stepno changed to 4
(0, 1), (0, 2), (0, 3)(0, 4)
(1, 3)1(1, 4)
(1, 2)(2, 4)
(2, 3)1(3, 4)
(1, 1), (2, 2), (3, 3)(4, 4)

the database stores all values with stepno 4 to avoid complications when the stepno for each habit is changed. thus, if a habit has the record step 2 of 3 on a certain day, that number will be recorded in the database as 3.

not only does this make conversion convenient, it also allows easier translation from numbers into the five characters used for heatmaps.

x in step x of 4square printed in heatmap (white)
0
1░░
2▒▒
3▓▓
4██

while these characters do not look like squares on this site, they resemble squares much more in the terminal where habitmap is to be run.

do note that changing the stepno of a habit will not change its data. for example, if a habit with stepno 3 has its stepno changed to 2, the data will remain in its original form.

1

while 1/3 and 2/3 are both closer to 2/4 (1/2) than 1/4 and 3/4 respectively, making them both 2/4 would mean they would be indistinguishable in maps. giving these two values different values when the stepno is changed to 4 maintains a clear difference between 1/3 and 2/3.

heatmaps

what are heatmaps?

heatmaps are a form of data presentation. according to oxford languages, heatmaps are:

a representation of data in the form of a map or diagram in which data values are represented as colours.

while there are many types of heatmaps, habitmap only uses the following three.

heatmapx-axis / columny-axis / rowcli (hbmp map)discord botdescription
dailydayhabit-d / --day/durmallows you to see your progress in committing to each habit across multiple days.
average per durationduration (week/month/year)habit-b / --bydur/durmsimilar to the daily heatmap, but you can view your average across a few weeks or months to more easily visualise long-term progress.
yearly calendarweekday of the week-y / --year/yearmsimilar to the github contributions heatmap at the bottom of the user profile, but only allows one habit and across one year.

for more details on how to use these, see map.