返回全部资讯
Simon Willison 博客T2·开发与工程

Datasette Charts 0.5a0 新增日历热力图与箱线图

原标题:datasette-charts 0.5a0
38AI 研判分

Datasette Charts 发布 0.5a0 版本,在大量原型验证后新增日历热力图、箱线图与活跃时长图三种图表类型。日历热力图按年呈现日期密度,箱线图展示数值的四分位与极值分布,活跃时长图则识别起止日期对并统计各时段活跃记录数。

报道正文

After some extensive prototyping, I added three new chart types to Datasette Charts:

  • Calendar heatmaps, where density of dates over a year is represented as a heatmap calendar.
  • Box plots, capturing the variance of a numeric value by representing the quartiles, median, minimum and maximum values.
  • Active over time, which detects start/end date pairs and uses them to determine how many records were active during different time periods.

Here's a calendar heat map demo in Datasette Lite, showing the publish dates of releases in the Datasette package ecosystem.

Calendar heatmap chart titled 'Rows per day of published_at'. A legend labeled 'Rows' shows a color scale from pale blue to dark navy, marked 0, 5 and 10. Month labels run across the top: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec. Three year-long grids are stacked, labeled 2026, 2025 and 2024, each with one column per week and seven rows for days of the week, labeled Mon, Wed, Fri. Gray squares are days with no rows; blue squares get darker as the count rises. 2026 has activity scattered fairly evenly through the year, ending in late November. 2025 is busy from January to May, almost empty from June to mid-October, then has the single darkest square in the chart in late October followed by a dense cluster in November. 2024 is busiest of all from January to May, with sparser activity through the rest of the year.