Dataview Dashboard: Quản lý Papers như Database | Research Tools

Library đã có 50+ papers. Mỗi lần cần tìm "papers về nostalgia từ 2020 trở đi" phải scroll qua từng folder. Muốn biết đã đọc bao nhiêu, còn bao nhiêu chưa đọc - không có cách nào ngoài đếm tay.

Dataview biến vault thành database, cho phép query và filter notes như SQL. Bài này hướng dẫn tạo Paper Dashboard để track reading progress và filter papers theo nhiều tiêu chí.

Bài này yêu cầu literature notes có frontmatter đầy đủ. Xem bài ZotLit Templates để setup template trước.

Dataview là gì?

Tính năng Mô tả
📊 Query như Database Filter papers theo year, journal, status, tags
📈 Statistics Đếm số papers, group theo tiêu chí
🔄 Auto-update Kết quả tự động cập nhật khi thay đổi notes
☑️ Task Tracking Hiển thị tất cả tasks chưa hoàn thành

Cài đặt Dataview

Settings → Community plugins → Browse → tìm "Dataview" (by Michael Brenan) → Install → Enable.

Cấu hình: Settings → Dataview → bật:

  • ✅ Enable inline queries
  • ✅ Enable JavaScript queries
  • ✅ Enable inline JavaScript queries

Frontmatter cho Literature Notes

Dataview query dựa trên frontmatter. Đảm bảo template zt-field.eta có các fields:

title: "Paper Title"
citekey: "nguyen2024sustainable"
authors: "Nguyen et al."
year: "2024"
journal: "Journal of Marketing"
doi: "10.1234/example"
tags:
  - paper
status: unread
Notes cũ không có frontmatter đầy đủ cần re-import từ Zotero sau khi update template.

Tạo Paper Dashboard

Tạo file mới: 2 - Source Material/Papers/_Paper Dashboard.md

Đặt tên bắt đầu bằng _ để file luôn ở đầu danh sách.

Nội dung Dashboard:

# 📊 Paper Dashboard

## 📥 Chưa đọc (Unread)

```dataview
TABLE authors, year, journal
FROM "2 - Source Material/Papers"
WHERE status = "unread" AND !contains(file.name, "Dashboard")
SORT year DESC
```

---

## ✅ Đã đọc (Read)

```dataview
TABLE authors, year, journal
FROM "2 - Source Material/Papers"
WHERE status = "read" AND !contains(file.name, "Dashboard")
SORT year DESC
```

---

## 📚 Theo Journal

```dataview
TABLE WITHOUT ID journal as "Journal", length(rows) as "Số papers"
FROM "2 - Source Material/Papers"
WHERE journal AND !contains(file.name, "Dashboard")
GROUP BY journal
SORT length(rows) DESC
```

---

## 📊 Thống kê theo Năm

```dataview
TABLE WITHOUT ID year as "Năm", length(rows) as "Số papers"
FROM "2 - Source Material/Papers"
WHERE year AND !contains(file.name, "Dashboard")
GROUP BY year
SORT year DESC
```

---

## 🏷️ Theo Topic

### Nostalgia

```dataview
TABLE authors, year, journal
FROM "2 - Source Material/Papers"
WHERE contains(tags, "nostalgia") AND !contains(file.name, "Dashboard")
SORT year DESC
```

### Consumer Behavior

```dataview
TABLE authors, year, journal
FROM "2 - Source Material/Papers"
WHERE contains(tags, "consumer-behavior") AND !contains(file.name, "Dashboard")
SORT year DESC
```

---

## 🆕 Thêm gần đây

```dataview
TABLE authors, year, status
FROM "2 - Source Material/Papers"
WHERE citekey AND !contains(file.name, "Dashboard")
SORT file.ctime DESC
LIMIT 10
```

---

## ☑️ Action Items chưa hoàn thành

```dataview
TASK
FROM "2 - Source Material/Papers"
WHERE !completed
GROUP BY file.link
LIMIT 50
```

---

## 📈 Tổng quan

| Metric | Count |
|--------|-------|
| **Tổng papers** | `$= dv.pages('"2 - Source Material/Papers"').where(p => p.citekey && !p.file.name.includes("Dashboard")).length` |
| **Đã đọc** | `$= dv.pages('"2 - Source Material/Papers"').where(p => p.status == "read").length` |
| **Chưa đọc** | `$= dv.pages('"2 - Source Material/Papers"').where(p => p.status == "unread").length` |

Sử dụng Dashboard

Đánh dấu paper đã đọc: Mở paper → Properties panel (phía trên note) → field status → đổi unread thành read. Dashboard tự động cập nhật.

Thêm topic tags: Properties panel → tags → thêm tag mới như nostalgia, consumer-behavior. Queries theo topic sẽ tự động hiển thị paper.

Gợi ý Tags

Topic Tag
Hành vi người tiêu dùng consumer-behavior
Quảng cáo hoài niệm nostalgia
Thương hiệu brand, brand-authenticity
Chuỗi cung ứng supply-chain
Bền vững sustainability, green

Query Syntax cơ bản

TABLE field1, field2      # Hiển thị dạng bảng
FROM "folder/path"        # Lấy notes từ folder
WHERE condition           # Điều kiện lọc
SORT field DESC           # Sắp xếp (DESC = mới nhất trước)
LIMIT 10                  # Giới hạn số kết quả

Điều kiện thường dùng:

Điều kiện Ý nghĩa
status = "unread" Chưa đọc
year >= 2020 Từ 2020 trở đi
contains(tags, "nostalgia") Có tag nostalgia
!contains(file.name, "Dashboard") Loại trừ Dashboard

Resources


Bài đầu series: Foundation - Setup Zotero + Obsidian

Bài trước: Pandoc Reference List - Citations đẹp

Series: Research Tool Stack