Django 和交互式图形/网络可视化 [英] Django and interactive graph/network visualization

查看:22
本文介绍了Django 和交互式图形/网络可视化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 Django 应用程序并希望对社交网络进行可视化.我正在寻找一个可以绘制图形/网络数据结构的库,但也可以使其具有交互性.我希望能够点击一个节点并在页面上的其他地方显示来自该节点的信息(名称、网络等)

I am creating a Django app and want to have visualizations of a social network. I'm looking for a library that can draw a graph/network data structure, but also make it interactive. I'd like to be able to click on a node and have information from that node be displayed (Name, Network, etc) somewhere else on the page

到目前为止,我发现 python-graph 和 graphviz 是非常强大的可视化工具,但它们创建静态图像,因此您无法单击它们.我也找到了这个帖子

So far I've found python-graph and graphviz to be very powerful visualization tools, but they create static images, so you can't click on them. I've also found this thread

JavaScript 中的图形可视化库

其中有很多建议,但其中一些是针对图表中的图表,而不是社交网络图表中的图表.其中一些非常旧,而其中一些是交互性的,因为节点可以在画布上的其他地方拖动和移动.我不太关心用户是否能够更改图表,我只想让节点对象携带可以在某处显示的数据.

which had a lot of suggestions, but some of them are for graphs as in charts, not graph as in social network graph. Some of them are very old, and some of them are interactive only in that the node can be dragged and moved elsewhere on a canvas. I don't care so much about the user being able to change the graph, I'd just like to have the node object carry data with it that can be displayed somewhere.

有什么建议吗?

推荐答案

我喜欢 d3.这是一个力导向图的示例(通常用于显示社交网络).

I like d3. Here's an example of a force-directed graph (often used to display social networks).

将您想要的点击处理类型添加到 d3 force 示例中会相当容易.

It would be fairly easy to add the kind of click handling you're seeking to the d3 force example.

这篇关于Django 和交互式图形/网络可视化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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