NodeXL <> Graphistry 转换器#
现在你可以通过Graphistry GPU视觉效果探索你的NodeXL数据工作流的结果!
获取一个指向NodeXL .xls文件的URL(你也可以上传到你的Colab会话中),并创建一个实时的Graphistry可视化
创建一个函数
graphistry.nodexl('http://my_url/file.xls').plot(),请参见底部的调用您还可以为更多绑定指定数据源,详细查看进度,以及选择适合Pandas的Excel引擎:
graphistry.nodexl('http://my_url/file.xls', 'twitter', engine='xlrg', verbose=True)也可以在这里上传一个XLS文件,请参见左侧的文件上传菜单(文件将为
"./my_file.xls")点击Graphistry徽标以开始会话,或右键单击以在新窗口中打开并保存其URL
通过按下shift-enter从上到下重新运行单元格
安装、导入和凭证#
首次运行(非Graphistry分发版)#
您可能需要在此之后重新启动笔记本的Python运行时
[ ]:
# ! pip install -q --user graphistry pandas
[ ]:
# Sometimes also need to install a new system Excel parser, and pass in as `graphistry.nodexl(..., engine='openpyxl')
# pip install -q --user openpyxl
导入和凭证#
[ ]:
import pandas as pd
import graphistry
graphistry.__version__
[ ]:
# To specify Graphistry account & server, use:
# graphistry.register(api=3, username='...', password='...', protocol='https', server='hub.graphistry.com')
# For more options, see https://github.com/graphistry/pygraphistry#configure
示例用法#
[ ]:
#g = NodeXLGraphistry().xls(xls, 'twitter')
g = graphistry.nodexl('https://nodexlgraphgallery.org/Pages/Workbook.ashx?graphID=220232')
[ ]:
print('%s nodes, %s edges' % (len(g._nodes), len(g._edges)))
g._nodes.sample(2)
[ ]:
g.plot()
Twitter 演示#
辩论沃伦#
[ ]:
graphistry.nodexl('https://nodexlgraphgallery.org/Pages/Workbook.ashx?graphID=220055', 'twitter', verbose=True).plot()
CES 三星#
[ ]:
graphistry.nodexl('https://nodexlgraphgallery.org/Pages/Workbook.ashx?graphID=219924', 'twitter', verbose=True).plot()
更大的图#
[ ]:
graphistry.nodexl('https://www.nodexlgraphgallery.org/Pages/Workbook.ashx?graphID=220124', 'twitter', verbose=True).plot()
MediaWiki 演示#
演示 1#
[ ]:
graphistry.nodexl('https://nodexlgraphgallery.org/Pages/Workbook.ashx?graphID=203001', 'mediawiki').plot()