Annotate and explore your data with datasette-comments
Nov. 29, 2023, 6:04 p.m. Alex Garcia
datasette-comments is a new Datasette plugin for collaborative discussions on your Datasette. You can leave comments on specific rows of your SQLite tables, @mention your collaborators and coworkers, track your work with hashtags, and more. Check out our demo read-only instance, and try it out today with Datasette Cloud or self-host it yourself!
Data exploration is an inherently collaborative and social process. Rarely do you ever work with data by yourself: eventually you need to bring in a coworker, manager, or rubber duck to make sense of it all.
Datasette, a tool for exploring and publishing data, is already social, to some degree. You can share URLs that link directly to specific tables, rows, and SQL queries of your database. But that requires a "3rd party" platform to share those messages, like a separate Slack, Teams chat, or email thread.
Until now!
datasette-comments for collaborative exploration
datasette-comments is a new Datasette plugin that allows you to communicate with your coworkers or teammates all inside Datasette, without the back-and-forth of Slack or emails. It is free, open-source software that you can run yourself, and an integral feature to Datasette Cloud.
Once setup, you can leave comments on individual rows inside the Datasette UI. Comments live in threads on specific rows, and can be accessed from table or row pages.
You can "at mention" coworkers, to bring attention to issues, ask for help, or share new insights!
And even "react" to others messages!
Once your discussion ends, you can "resolve" the entire thread to keep everyone focused.
You can even leave "tags" in comments, to organize your discussions!
Finally, the comments activity page allows you to search through all your discussions, while filtering by comment table location, authors, hashtags, and more.
How datasette-comments works
datasette-comments is a good ol' fashion, open source Datasette plugin. It extensively uses the new internal database feature to store comments. If you make comments on rows inside of your_data.db
, the comments themselves are stored inside the separate internal.db
database.
The "frontend" requires a lot of interaction, local state, and data updates. So instead of traditional Datasette Jinja templates, we opted for using preact to make the frontend components, and esbuild as the build tool.
Future datasette-comments features
The current datasette-comments release is full of neat features, but is still in beta. We have many feature we want to include in the near future, including a user-facing API, notifications, and more.
An API to create comments
We plan on adding an API to programmatically create comments from outside workflows. For example, you may have a script that automatically create a comment on rows where a column meets a condition (ex dollar_amount > 100.0
or status == 'overdue'
).
Additionally, you could use the comments API to defer manual triage to a ChatGPT-powered assistant. If it thinks a row has an interesting enough row for human intervention, leave a comment and @ mention you for further review.
Comment notifications
We also aim to improve "notifications" when comments are left, especially when you are mentioned by coworkers. A native inbox inside Datasette would be great, but also integrations with 3rd party services like Slack and emails, so you're always on-top of conversations you're a part of.
Your ideas!
Datasette Comments is open source and built in the public. If you have any feature request, ideas, or suggestion to improve Comments, feel free to start a discussion on Github, or start a conversation in our Discord!