只需要 SVG 即可。
An SVG is all you need

原始链接: https://jon.recoil.org/blog/2025/12/an-svg-is-all-you-need.html

SVG(可缩放矢量图形)提供了一种令人惊讶的强大且持久的方法来分享科学研究,超越了简单的图像。作者强调了它们创建完全交互式环境以伴随研究论文的潜力——允许读者在浏览器中直接探索数据、重新运行实验和操纵参数。 一个来自2004年的个人项目,一个嵌入在单个SVG文件中的真菌网络数据可视化,至今仍然完美运行,展示了这种格式的卓越持久性。SVG通过客户端处理实现这一点,只需要一个静态Web服务器进行分发,并且可以轻松地与版本控制(溯源)和数据许可(权限)集成。 这种方法与Anil的知识系统“四大P”——持久性、溯源、权限和位置——相符,并利用浏览器计算能力的显著提高,有可能在SVG文件中托管整个数据分析流程,从而促进研究的轻松共享和重组。它为Jupyter/Marimo笔记本和其他交互式平台提供了补充。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 SVG 就足够了 (recoil.org) 8 分,由 sadiq 发表于 36 分钟前 | 隐藏 | 过去的 | 收藏 | 1 条评论 WorldPeas 33 分钟前 [–] 我们所需要的只是键盘输入和音频输出,我们就拥有了(大部分)Flash的功能。我可能会在空闲时间研究一下。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

SVGs are pretty cool - vector graphics in a simple XML format. They are supported on just about every device and platform, are crisp on every display, and can have embedded scripts in to make them interactive. They're way more capable than many people realise, and I think we can capitalise on some of that unrealised potential.

Anil's recent post Four Ps for Building Massive Collective Knowledge Systems got me thinking about the permanence of the experimentation that underlies our scientific papers. In my idealistic vision of how scientific publishing should work, each paper would be accompanied by a fully interactive environment where the reader could explore the data, rerun the experiments, tweak the parameters, and see how the results changed. Obviously we can't do this in the general case - some experiments are just too expensive or time-consuming to rerun on demand. But for many papers, especially in computer science, this is entirely feasible.

That line of thought reminded me of a project I tackled as a post-doc in the Department of Plant Sciences here in Cambridge. I was writing a paper on synergy in fungal networks and built a tiny SVG visualisation tool that let readers wander through the raw data captured from a real fungal network growing in a petri dish. I dug it up recently and was surprised (and delighted) to see that it still works perfectly in modern browsers - even though the original “cover page” suggested Firefox 1.5 or the Adobe SVG plug-in (!). Give it a spin; click the 'forward', 'back' and other buttons below the petri dish!

And that, dear reader, is literally all you need. A completely self-contained SVG file can either fetch data from a versioned repository or embed the data directly, as the example does. It can process that data, generate visualisations, and render knobs and sliders for interactive exploration. No server-side magic required - everything runs client-side in the browser, served by a plain static web server, and very easily to share.

How does it fit in with Anil's four Ps?

  • Permanence: SVGs can be assigned DOIs just like papers, blog posts, or datasets. The fact that the above SVG still works after two decades is a testament to the durability of the format.
  • Provenance: Because SVG is plain text, it plays nicely with version control systems such as Git. When an SVG pulls in external data, the same provenance-tracking strategies Anil describes for datasets apply here as well.
  • Permission: Once again, with the separation between the processing in the SVG and that data that it works on, the same permissioning models apply as for data in general.
  • Placement: SVGs are inherently spatial; it's very easy, for example, to make beautiful world maps with SVG.

The SVG above is only a visualisation tool for data; it doesn't really do any processing, but it certainly could. The biggest change that's happened over the 20 years since I wrote this is the massive increase in the computation power available in the browser. If would be entirely feasible to implement the entire data analysis pipeline for that paper in an SVG today, probably without even spinning up the fans on my laptop!

So this is yet another tool in our ongoing effort to be able to effortlessly share and remix our work - added to the pile of Jupyter notebooks, Marimo botebooks, the slipshow/x-ocaml combination, Patrick's take on Jon Sterling's Forester, my own notebooks, and many others - and this is a subset of what we're using just in our own group!

联系我们 contact @ memedata.com