Sparkline

Turn any number column into a tiny embeddable SVG chart. Downsampling, mean and bucket-importance run as Mojo-compiled kernels; the SVG is string assembly in the handler.

Embed with <img src="..."> or paste the SVG into any README/Markdown.

The kernels

def series_mean(values: list[float]) -> float:
    total = 0.0
    for i in range(len(values)):
        total += values[i]
    return total / len(values)

One reduction, one loop. The LTTB importance score in bucket_extremes follows the same shape — per-bucket mean then deviation — which is why it compiles; a list-returning version would not.