Obsidian-internal way to document and compare a vaults development via various metrics

Hi,
Is there a way to document the organic growth and evolution of the vault over time? I would like to document in regular intervals how the different metrics of the vaults properties change over time. So I could compare my way of creating and fostering a new vault as a beginner with an experienced users way of doing so.

Some possible metrics would be:

  • number of notes
  • number of words
  • size of notes
  • length of file-names
  • number of tags
  • number of links
  • etc…

All of the above may be interesting to know in three ways:

  • how many different insert metric here are in this vault?
  • how many insert metric here are in a file on average?
  • how many files do have a certain number of insert metric here? (“probability distribution”)

Basicly I am looking for a way to compare Obsidian vaults. But not only the vault itself by size (e.g. number of files ) or growth rate , but to compare also the chosen approach for creating and using/fostering the vaults AND to compare the changes in the “quality” of the vault, which occurs during the organic growth and development of the vault.

Until now I tried to document the growth of the vault using the “tree-command” (Tree command in Linux with examples - GeeksforGeeks). But it only prints the number of files and their size. To me it seems, like an internal plug-in is needed.

I found this post (🐍 obsidiantools: Python package for doing advanced analytics of your vault) , which looks interesting to me, but im not sure whether this is what im looking for and I am a little bit overwhelmed by the technical stuff.

What do you think? Am I the only one who thinks this would be a good plugin /feature? (especially for beginners)?

Hi, assuming you want metrics for the vault as a whole at a specific point in time, I think most of those metrics can be obtained via my package obsidiantools:

  • number of notes: len(vault.file_index)
  • number of words: there’s a way to do this with vault.readable_text_index - this won’t match Obsidian’s word count (which includes text like front matter), but is fine for my purposes.
  • size of notes: I think this could be done with a few lines of Python from a list of filepaths / vault filepath in obsidiantools, if you want the number of bytes.
  • length of file-names: this could be done with a few lines of Python from a list of filepaths / vault filepath in obsidiantools.
  • number of tags: probably something I could add in as a feature to do this more easily, if I added counts to the dataframe in df = vault.get_note_metadata().
  • number of links: this can be done already via sum(df['n_wikilinks']), if you mean the number of wikilinks.

To get the metrics on snapshots of the vault over time, I think you could run a short Python script on a scheduler (e.g. a CRON job) to append these metrics to a CSV file on each run.

I’m not a TypeScript or JavaScript developer so I can’t do an app-based solution for this, but I think a basic solution could be done with some Python to build up data on those metrics on a regular basis. I appreciate it might be difficult for a Python beginner to do this, but it could be quick to do for someone experienced with Python via my package.

1 Like