Overview - Obsidian Research ๐ชจ¶
Description¶
Adding heatmap calendar to my obsidian set up to to give me annual/year in review style stats/heatmaps
Dan's Blog ๐ - take notes for this! potentially great post!
Notes¶
SCRIPTS!¶
PUBLIC OPEN SOURCE PROJECT / TUTORIAL - https://github.com/dan1229/ai-file-analyzer
REPO - https://github.com/dan1229/dans-notes-analyzer
Heatmap Calendar Plugin¶
things to figure out: - how many days I worked out and how many times - count bullets and sub bullets - did habits like duolingo, scalp massage, etc. - in 2024 Long Term TODO ๐ - which months were busiest / had most bullets - which tasks had most sub bullets - i.e., details?
gonna try with what should be a simple/useful one - daily workouts! - curious how this stacks up to my apple watch stats...
- add metadata to page - specifically daily notes template
how to attach to a workout?
simple in-line metadata: (longKeyIDontNeedWhenReading:: key). -
TODO
-
create query to get it
TABLE WITH completed_dates AS ( SELECT file.name, JSON_EXTRACT(file.content, '$.tasks[*].content') AS tasks FROM file WHERE file.extension = 'md' ) SELECT count(*), tasks FROM completed_dates WHERE JSON_EXTRACT_ARRAY_LENGTH(tasks, '$[*].children[*].checked') > 0 -
Create dataview block:
dv.span("** ๐ Title ๐ฅ**") /* optional โน๏ธ๐คโกโ ๐งฉโโโณ๐๐พ๐๐๐๐๐โจ๏ธ๐ธ๏ธ๐ ๐โจ */ const calendarData = { year: 2022, // (optional) defaults to current year colors: { // (optional) defaults to green blue: ["#8cb9ff", "#69a3ff", "#428bff", "#1872ff", "#0058e2"], // first entry is considered default if supplied green: ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"], red: ["#ff9e82", "#ff7b55", "#ff4d1a", "#e73400", "#bd2a00"], orange: ["#ffa244", "#fd7f00", "#dd6f00", "#bf6000", "#9b4e00"], pink: ["#ff96cb", "#ff70b8", "#ff3a9d", "#ee0077", "#c30062"], orangeToRed: ["#ffdf04", "#ffbe04", "#ff9a03", "#ff6d02", "#ff2c01"] }, showCurrentDayBorder: true, // (optional) defaults to true defaultEntryIntensity: 4, // (optional) defaults to 4 intensityScaleStart: 10, // (optional) defaults to lowest value passed to entries.intensity intensityScaleEnd: 100, // (optional) defaults to highest value passed to entries.intensity entries: [], // (required) populated in the DataviewJS loop below } //DataviewJS loop for (let page of dv.pages('"daily notes"').where(p => p.exercise)) { //dv.span("<br>" + page.file.name) // uncomment for troubleshooting calendarData.entries.push({ date: page.file.name, // (required) Format YYYY-MM-DD intensity: page.exercise, // (required) the data you want to track, will map color intensities automatically content: "๐๏ธ", // (optional) Add text to the date cell color: "orange", // (optional) Reference from *calendarData.colors*. If no color is supplied; colors[0] is used }) } renderHeatmapCalendar(this.container, calendarData) -
CLEANUP
- update upcoming todos
- update template itself
- update previous todos from this year?
Other ideas/heatmaps?¶
- journaling?
- hebrew?
- massaging head?
- plants?
- anything recurring lol