宇宙图
一个强大的 JavaScript 图形可视化库 GPU 加速力布局 引擎为 二维和三维 支助。 它特别适合 知识图大型的实体、关系和本体学网络,你需要在浏览器中看到和浏览——以及 语义图 从机器学习嵌入。 宇宙图使这些图表在规模上具有响应性,并将渲染器配以交互式工具来进行搜索、过滤和探索.
* 特性
- 🕸️ 知识图友好:可视化实体 - 规模关系网络,其布局和互动可帮助您建立点状结构、邻接点和外围点
- 🧊 二维和三维: 在平面视图和带有轨道相机的GPU 3D力布局之间切换(
spaceDimensions: 3),包括嵌入式的可选 Z 坐标 - * 现代硬件上数百万分和边的高性能处理
- QQ 准备使用交互式组件,包括时间线,搜索,直方图,传说等.
- QQ 完全定制于图形行为和外观的灵活配置 API
- * 丰富的基于数据的自动配色和大小化策略
- * 点和链接的实时添加、去除和定位
- 对标准数据格式的支持,包括
.csv, (中文(简体) ),.parquet, (中文(简体) ),.arrow财务报告和审定财务报表.json - SQL 强大的数据转换和过滤能力
- 与外部 DuckDB 实例中的表格直接连接
- QQ TypeScript 支持, 包含全面的类型和 API 提示
QQ 快速启动
1️⃣ 安装软件包 :
npm install @cosmograph/cosmograph
2️⃣ 在提供的容器中获取数据,配置图表并渲染宇宙图:
import { Cosmograph, prepareCosmographData } from '@cosmograph/cosmograph'
// Points and links data can be:
// - Array of objects
// - File (.csv/.tsv, .parquet/.pq, .arrow, .json)
// - URL string to a file
// - Apache Arrow Table (binary data Uint8Array/ArrayBuffer)
// - DuckDB table name if connection is passed into the Cosmograph constructor
const rawPoints = [{ id: 'a' }, { id: 'b' }, { id: 'c' }]
const rawLinks = [
{ source: 'a', target: 'b' },
{ source: 'b', target: 'c' },
{ source: 'c', target: 'a' },
]
// Create a config to map your data into Cosmograph's internal format
const dataConfig = {
points: {
pointIdBy: 'id',
},
links: {
linkSourceBy: 'source',
linkTargetsBy: ['target'],
},
}
const createCosmograph = async (container: HTMLElement): Promise<void> => {
// Prepare data and config for Cosmograph
const result = await prepareCosmographData(dataConfig, rawPoints, rawLinks)
// Create Cosmograph instance from prepared data and config
if (result) {
const { points, links, cosmographConfig } = result
const cosmograph = new Cosmograph(container, { points, links, ...cosmographConfig })
}
}
// Render Cosmograph in the provided container
createCosmograph(document.getElementById('cosmograph-container'))
看看这个 宇宙图文件 更多信息和实例.
问题和贡献
虽然目前已关闭来源,我们欢迎您的反馈! 帮助改进宇宙图,方法是提交错误报告,并在我们中突出想法 问题存放处。 。 。 .
许可证
宇宙图根据 CC-BY-NC-4.0. 许可证 任何非商业用途都可以免费使用。 如果你想在商业项目中使用,请 联系我们。 。 。 .
宇宙空间
@ cosmograph/ 反应 - 反应应用的宇宙图
py 相册 - Python 数据科学工作流程的 Jupyter 部件