This little script allows me to include a heatmap, much in the style of github, that shows me how many notes i created each day.
It uses the Obsidian heatmmap calendar and Obsidian Dataview.
As a preparation i use the obsidian Update Time on Edit, that gives me a created
field in the properties of every file I create.
I had originally forseen to use dv.view()
from Dataview but unfortunately it does not render the calender. Anyway, i have a script that you could use, if you figure out how to make it render. It is in heatMap.js.
To use it as is, just copy the content of view.md into a note. You can also customize this.
You can change the folders to be read for the calendar view by changing it here:
const docs = dv.pages('"" and -("Excalidraw" and "_ressources" and "_templates")');
All folders in -()
are excluded from the calendar.
if (value >1){
calendarData.entries.push({
date: key, // (required) Format YYYY-MM-DD
intensity: value, // (required) the data you want to track, will map color intensities automatically
color: 'green'
});
}
I use the if clause to prevent lighting up every day, as I have daily notes for every day so far, and those would just clog up my view.
I have used Joplin for about a year and now use Obsidian since August, hence I still have only a few notes.