Dataview DASHBOARD Showcase

Hi all, I created this topic so I and others can post their Dataview Dashboard ideas.

Please only post working code along with an explanation if needed.

What ideas have you come up with? Please post here.

4 Likes

This dashboard is a work in progress, the goal is to give myself a place to start editing notes that were either Orphans(Olivers haha) meaning no links in or out, files that were too small or zero (meaning I probably should add content), or too large (meaning I should pare it down or break it apart into more atomic sized notes).

I have a Dashboard note for this code in my ‘000 Inbox’ folder. My Daily Notes and Tasks note are in my ‘001 Daily’ folder.

You’ll see that I ended up adding filter statements in the snippets to avoid my Templates folder files, or my Daily Notes, etc. If you use my snippets, you will have to edit the paths or remove those sections as needed.

The #io tag I filter out stands for Information Only, meaning they are small notes that may have no links but I want to keep them as is for information purposes only. But I don’t need to see them in the limited space of the dashboard.

You can change the limit on the tables. I made it 5 so I’m forced to deal with the ones it shows me instead of scrolling down a long list.

++++++++

OLIVERS - Zero Links In or Out (without #io tag)

```dataview
LIST
from “”
where length(file.inlinks) =0 and length(file.outlinks) = 0 and file.folder != “4. ARCHIVE” and file.folder != “4. ARCHIVE/TEMPLATES” and !contains(file.tags, “#io”) and file.folder != “001 DAILY” and file.folder != “001 DAILY/PAST”
```

FILES BY SIZE (Low)

```dataview
TABLE file.size as “File Size”
SORT file.size asc
LIMIT 5
```

FILES BY SIZE (High)

```dataview
TABLE file.size as “File Size”
SORT file.size desc
where file.name != “obsidian.css”
LIMIT 5
```

7 Likes

nice idea and actually useful snippets. You might want to display your file sizes in kB though. You can do so with this:

```dataview  
TABLE round(file.size / 1024) as "File Size (kb)"  
SORT file.size desc  
LIMIT 5  
```
1 Like

I posted it somewhere else in the forum before, but since this topic is explicitly about dashboards, I guess this also fits here?

This is my snippet for estimating the word count of all files in a folder. The dataview plugin is right now only able to directly display the file size in bytes (file.size). However, it is possible to estimate the word count based on some calculations:

```dataview
TABLE round(file.size * 1.005) as "Character Est.", round(file.size * 1.005 / 4.79) as "Word Est. (English)"
FROM "folder"
SORT file.size DESC
```

Note that the factor “4.79” will of course vary depending of type of text (e.g. academic texts have longer words), and of course the language. In German, for example, the factor should be 5.99.

1 Like

@pseudometa very clever use of the file size. I am planning on writing a book, so I might incorporate the word count calc. I know there are word count plugins, but I like the idea of doing it ‘manually’.

I hadn’t really thought about what the file size number represented, for my current purposes of building properly sized atomic notes, Big or Small is good enough. Adding this to my dataview snippets note for future use. :slight_smile:

1 Like

yeah, but the problem is that they only count the words of one note – not of multiple notes. And especially if you write longer texts like a book, you might want to split up chapters into separate notes for easier reordering – which has the drawback of making word counts somewhat complicated. (Scrivener is actually the only app I know that has solved this well.)

1 Like

I like this idea!

I’ve come up with a ‘What to do’ dashboard for those free hours in the weekends when I don’t know what to pick up. For now it contains three parts:

  1. Books / shows / comics / projects / other things I have started (labelled ‘active’)
  2. Three random picks from all my notes labelled ‘someday’
  3. Three random picks from my knowledge-notes that are ‘stubs’ (less than 200 bytes) and waiting to be further researched

Some ideas for extending it:
4. People I haven’t seen in a while
5. Read it later articles

Code:

Actief

Boeken

List
FROM #status/actief AND #media/boek AND -"_meta"
SORT Gelezen DESC

Series

List
FROM #status/actief AND #media/serie AND -"_meta"
SORT Gelezen DESC

Comics

List
FROM #status/actief AND #media/comic AND -"_meta"
SORT Gelezen DESC

Overige

LIST
FROM #status/actief AND -#media/boek AND -#media/serie AND -#media/comic AND -"_meta"
SORT Gelezen DESC

Someday

const limit = 3;
const notes = dv.pages('#status/someday')
    .sort(() => 0.5 - Math.random())
    .slice (0, limit)
    .map (note => note.file.link);
dv.list(notes);

Stubs om uit te werken

const limit = 3;
const notes = dv.pages('#kennis')
    .where(note => note.file.size < 200)
    .sort(() => 0.5 - Math.random())
    .slice (0, limit)
    .map (note => note.file.link);
dv.list(notes);