- Maximalist12小时前⭐️ 新访客2006
简介
我们是 AntV ,蚂蚁做数据可视化解决方案的,今天发布了 AVA 4.0 版本。
开源地址: https://github.com/antvis/AVA
感谢关注一下 ⭐️⭐️。~50 行核心代码 即可构建你的 Data Agent ;
AVA 4.0 是 一套面向 JavaScript 应用和 AI Agent 的开源数据分析与可视化框架。
3.0 基于规则与统计方法,聚焦数据洞察与图表推荐,帮助开发者发现数据中的异常、趋势,并选择合适的图表。4.0 进一步面向 AI Agent ,打通数据接入、分析执行与可视化表达。Agent 可以结合业务口径理解问题,调用 AVA 查询和计算数据,再用图表呈现结果。
如果你熟悉 PandasAI ,可以把 AVA 理解为 JavaScript 生态中面向 AI Agent 的数据分析与可视化框架。
使用
1.安装
npm install /ava@4
2.实例化 AVA
import { AVA } from '/ava';
const ava = new AVA({
llm: {
model: '',
apiKey: '',
// baseURL: '',
},
});3.加载数据
await ava.source({ type: 'csv-file', options: { path: './sales.csv' } });
支持 10+ 中数据源,包括本地文件、远程数据、以及像飞书、腾讯表格、Supabase 的 Saas 产品数据,还在社区生态扩展中。
4.探索数据
const schema = await ava.schema();
const profile = await ava.profile({ metrics: ['row_count', 'null_count'] });
await ava.semantic(undefined, () => ({
description: 'Use the sales column for amounts after discounts and order_date for monthly comparisons.',
}));通过 API 了解加载的数据集是什么样的?可以做什么分析!
5.问题推荐
如果不知道需要问什么?可以让 AVA 来推荐。
const suggestions = await ava.suggest(3);
// - How did sales change from January to February 2025?
// - Which products contributed most to the sales decline?
// - How do sales and profit vary by region?6.分析和洞察
自然语言对话,问数,查数,洞察信息等。
const result = await ava.analyze(
'Compare January and February 2025 sales by product. Show both months and the change, ordered by the largest decline.'
);7.可视化
AntV 做可视化的,自然少不了分析结果数据的可视化。可视化能力基于 GPT-Vis https://gpt-vis.antv.vision/ 同样也是开源的.
const chart = await ava.visualize({
query: 'Plot the sales change by product from January to February 2025 as a bar chart.',
data: result.data,
});周边
除了以 SDK 用 API 快速接入 Data Agent 之外, 也可以直接使用 CLI 或者 Skill ,快速本地做数据分析。具体:
生态周边收集: https://github.com/antvis/AVA/issues/1035
论坛 不能贴图,还是去官网看吧,官网有 AI 体验能力,填入 APIKey 就能体验纯前端版本。
主楼 - 暂无回复