Using Vega-Lite in Observable Framework for declarative visualizations.
Observable Framework documentation: Library: Vega-Lite Source: https://observablehq.com/framework/lib-vega-lite
Vega-Lite is a “high-level grammar of interactive graphics” with “concise, declarative syntax to create an expressive range of visualizations for data analysis and presentation.” It is an alternative to Observable Plot. Vega-Lite is available by default in Markdown as vl, but you can import it explicitly as:
import * as vega from "npm:vega";
import * as vegaLite from "npm:vega-lite";
import * as vegaLiteApi from "npm:vega-lite-api";
const vl = vegaLiteApi.register(vega, vegaLite);
You can use the Vega-Lite JavaScript API to construct a chart:
vl.markBar()
.data(alphabet)
.encode(vl.x().fieldQ("frequency"), vl.y().fieldN("letter"))
.width(640)
.render()
Or you can use a Vega-Lite JSON view specification:
vl.render({
spec: {
width: 640,
height: 400,
data: {url: await FileAttachment("gistemp.csv").url(), format: {type: "csv"}},
mark: "point",
encoding: {
x: {type: "temporal", field: "Date"},
y: {type: "quantitative", field: "Anomaly"},
color: {type: "quantitative", field: "Anomaly", scale: {range: "diverging", reverse: true}}
}
}
})
<div class="tip">When loading data from a file as above, use <a href="../files"><code>FileAttachment</code></a> so that referenced files are included on <a href="../files#static-analysis">build</a>.</div>npx skills add spqw/适用于 Observable Framework 的 Vega-Lite 库下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer