首页 > 解决方案 > 如何从以下 csv 制作图网络

问题描述

我从抓取 scopus 中获得了以下 csv。我想建立一个来自同一个国家的作者网络——就像每次两位作者来自同一个国家时,我们在他们之间添加一个优势。

此图像有 csv 文件截图

这是我正在使用的完整 csv 的链接。

https://drive.google.com/file/d/1B8yaMqFu9yHQudrWI-8-mCpo6pt1T2oW/view?usp=sharing

另外,有谁知道如何查找文章 ['eid] 的引文数据并解析数据,例如:

下表:

author   cited-by author   paper    auth-university     auth-country

这个想法是建立一个由作者和共同作者组成的网络,如果每个作者在被引作者列中都有相应的值,则添加一条边。

标签: pythonjsonapigraphnetworkx

解决方案


您可以在国家/地区使用内部连接来获得优势:

import pandas as pd
data = pd.read('/path/to/file.csv')
combinations = pd.merge(data, data, how='inner', on='country')
edges = combinations['author_x', 'author_y']

推荐阅读