返回 文章 apply CMS 文章

datasette-charts 0.3a0 发布:新增图表注释功能

datasette-charts 0.3a0 新增图表注释功能,提升数据可视化表达力。

datasette数据可视化图表注释插件更新
成长分 / 100 68 综合收获、行动、留存与影响

datasette-charts 0.3a0 发布:新增图表注释功能
为什么值得读了解 datasette-charts 插件的最新功能更新。

学习如何通过注释增强图表的信息传达效果。

关键洞察
  1. 新增图表注释功能,支持线条、阴影区域、标签及其组合。
  2. 注释可通过图表构建器 UI 进行编辑和实时预览。
  3. 安装 Datasette Agent 后,可通过自然语言提示自动生成带注释的图表。
转成行动

深入阅读

正文与原文对照

原文保真覆盖:全文原文字符:5413

发布 datasette-charts 0.3a0 — 一个用于 Datasette 的图表插件

我为 datasette-charts 添加了图表注释功能!

现在你可以渲染图表,然后用线条、阴影区域、标签或三者的组合来注释它。

带有注释的图表看起来像这样:

一张带有注释的柱状图截图,y轴标签为“↑ Total capacity_mw”,显示了1950年至2010年每个十年的蓝色柱子。早期几十年的容量较低,然后在2000年和2010年急剧上升。图表上有三个注释:一个从1950年到1990年的灰色阴影带,注释为“Much smaller summed capacity in earlier decades”;2000年柱子上方的一个点,标注为“Largest decade total in these records: 1.157 million MW”;以及一条虚线水平线,标注为“1,000,000 MW reference”。下方标题为“Global plant records with commissioning years 1950–2019; coverage and missing years may affect comparisons.”

这里是在 Datasette Lite 中的同一张图表,你可以使用图表构建器 UI 调整注释:

一段动画屏幕录制,展示了标题为“Total capacity_mw by decade”的图表的“Edit annotation”对话框。左侧表单包含“Kind”、“Capacity_mw”、“Label (optional)”、“Label position”、“Color”和“Line style”字段,右侧的“PREVIEW”面板显示了一张1950年至2010年每个十年总容量的蓝色柱状图,并有一条标注为“1,000,000 MW reference”的虚线水平线。预览会随着用户的编辑实时更新:将 Capacity_mw 值从“1000000”改为“900000”再改为“800000”,虚线会相应地在图表中下移;编辑标签文本,先添加感叹号,然后删除感叹号并删除单词“reference”,线条上的标签会变为“1,000,000 MW reference!”并最终变为“1,000,000 MW”。然后用户点击“Save”按钮。

如果你还安装了 Datasette Agent,代理可以为你构建带注释的图表。以下是我在 agent.datasette.io 演示中针对此提示得到的结果:

Show a chart comparing Simon's tagged content about LLMs with his tagged content about Datasette, with annotations

一张聊天式 AI 代理界面的截图,该界面已根据问题生成了图表。顶部是一行折叠的推理行,内容为“Thinking: …26 partial year is labeled correctly in the output. Let's go with this approach!”,随后是一个折叠的工具调用,标记为“chart”。下方是一张标题为“Total content_count per year by topic”的折线图,图例为“LLMs”(蓝色)和“Datasette”(橙色),y轴标签为“↑ Total content_count”,x轴为2017年至2026年。Datasette 线始终较低,有一个注释“Datasette peak year”指向2020年。LLMs 线在2022年之前接近零,然后急剧上升至2025年的峰值,并在2026年下降,有一个注释“LLM-tagged content rises”指向2023年。图表上的注释写道“Counts include posts, notes and links; 2026 is year-to-date.”。图表下方是控件:“Open in the chart builder”、“Copy link”、“This chart's SQL”、“Copy TSV”和“Copy CSV”。另一行折叠的推理行写道“Thinking: …rends start low for LLMs in 2020, and they're projected to rise sharply by 2026.”。代理的回复随后写道:“The chart compares annual counts of non-draft posts, notes, and link posts tagged with LLM-related terms or Datasette-related terms. The annotations mark Datasette's peak year (2020) and the sharp rise in LLM-tagged content beginning in 2023. 2026 is year-to-date.”。底部是一个消息框,占位符为“Type a message... (# to tag a table or query)”和一个“Send”按钮。