【问题标题】:Generate a friend graph on gephi with python dictionary使用python字典在gephi上生成朋友图
【发布时间】:2012-11-21 14:46:20
【问题描述】:

我正在尝试使用 gephi (http://gephi.org/) 来生成朋友地图。目前我的数据存储在一个字典中,如下所示:

{id1 : [friend_id, friend_id2 etc],
id2 : [friend_id3],
id3 : ... }

gephi 需要什么样的数据结构来制作这样的图 https://gephi.org/wp-content/themes/gephi/images/screenshots/layout2-mini.png

非常感谢!

【问题讨论】:

    标签: python gephi


    【解决方案1】:

    您可以在多个之间进行选择。最简单的方法是使用 Excel 图表并将其保存为 CSV。 在第一列中放入 person1id,在 column2 中放入 person2id:

     person1id  person2id
     Adam       Maria
     Maria      Ben
     Ben        Adam
    

    您还可以使用以下任何格式:https://gephi.org/users/supported-graph-formats/ 从您的数据中最容易生成的可能是 GML 或 GraphML。

    另请参阅我对这个问题的回答,概述如何使用 GML:Data structure for visualizing organizations and individuals using Gephi?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多