使用Chord Diagram可视化通过交通数据 [英] Visualizing the pass traffic data with Chord Diagram

查看:695
本文介绍了使用Chord Diagram可视化通过交通数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有玩家之间的传球数据,这里的数据,第一次列和第一行表示玩家人数。

I have a pass traffic data between players, here's the data, first column and first row indicate the Player Numbers.

我想要显示此数据,例如 Uber骑。我认为它是用来自Bostock的和弦图构建的。

I want to visualize this data like Uber Rides. I think it was built with Chord Diagram from Bostock's.

由于我几乎没有JavaScript的经验,我只是不知道从哪里开始。

Since I almost have no experience in JavaScript, I just don't know where to begin.

如何实现这样的东西?

推荐答案

这是我获得的数据

我只是用你的数组替换矩阵数组

I just replaced the matrix array with your array

[2,3,1,0,0,2,0,6,5,2,5,0,3],
[0,7,2,0,4,7,0,1, 2,0,3,0,2],
[0,0,4,1,5,3,3,0,1,1,5,1,0],
[0, 0,0,0,4,0,5,4,2,0,1,1,0],
[0,0,0,0,0,0,0,3,2,0, 1,0,1],
[0,0,0,0,0,1,3,4,1,1,9,1,6],
[0,0,0, 0,0,0,0,1,3,0,1,1,1],
[0,0,0,0,0,0,0,0,0,1,0,0, 0],
[0,0,0,0,0,0,0,0,5,5,5,0,8],
[0,0,0,0,0, 0,0,0,0,0,8,0,1],
[0,0,0,0,0,0,0,0,0,0,2,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,2],
[0,0,0,0,0,0,0, 0,0,0,0,0,2]

[2,3,1,0,0,2,0,6,5,2,5,0,3], [0,7,2,0,4,7,0,1,2,0,3,0,2], [0,0,4,1,5,3,3,0,1,1,5,1,0], [0,0,0,0,4,0,5,4,2,0,1,1,0], [0,0,0,0,0,0,0,3,2,0,1,0,1], [0,0,0,0,0,1,3,4,1,1,9,1,6], [0,0,0,0,0,0,0,1,3,0,1,1,1], [0,0,0,0,0,0,0,0,0,1,0,0,0], [0,0,0,0,0,0,0,0,5,5,5,0,8], [0,0,0,0,0,0,0,0,0,0,8,0,1], [0,0,0,0,0,0,0,0,0,0,2,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,2], [0,0,0,0,0,0,0,0,0,0,0,0,2]

我不是说这是正确的,只是给你一个想法,如何简单地你可以实现这一工作人们已经做到了。

I am not claiming this to be correct but just giving you a idea how simply you can achieve this with the work people already did.

这篇关于使用Chord Diagram可视化通过交通数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆