一、数据集概况#

2025-10-27 22:36:50 | 中国队世界杯出线 | admin | 3630°c

近 30 年来,arXiv 一直向公众和研究社区提供开放访问的学术文章,从物理学的广阔分支到计算机科学的众多子学科,再到经济学等所有领域,包括数学、统计学、电气工程、定量生物学等。这一丰富的信息库提供了重要的深度,但有时也会显得令人难以应对。

在这些独特的全球挑战时期,从数据中高效提取洞察至关重要。为了使 arXiv 更加易于访问,康奈尔大学将 arXiv元信息数据集存放在 Kaggle 供大家下载,该数据集目前含 268 万篇元信息,如文章标题、作者、类别、摘要、全文 PDF 等。

一、数据集概况#

数据集名: arXiv学术论文元数据

数据来源: https://arxiv.org/

提交日期: 1986-04-25 ~ 2025-03-13(数据每周更新)

论文数量: 2689088(截止到2025.3.14)

所含字段: 标题、作者、摘要、期刊信息、DOI等

数据格式: json

数据体积: 4.58G

下载数据: https://www.kaggle.com/datasets/Cornell-University/arxiv

本文声明: 科研用途; 如分享有问题,可加微信372335839,备注「姓名-学校-专业」

二、查看数据#

2.1 读取数据#

import pandas as pd

df = pd.read_json('arxiv-metadata-oai-snapshot.json', lines=True)

print('论文数量: ', len(df))

df.head()

Run

论文数量: 2689088

2.2 提交日期#

字段 versions 中含论文提交日期信息,可以通过如下代码提取并保存为字段 created 。

df['created'] = df['versions'].apply(lambda text: text[0]['created'])

df['created'] = pd.to_datetime(df['created'])

print('提交日期: ', df['update_date'].min().date(), '~', df['update_date'].max().date())

Run

提交日期: 1986-04-25 ~ 2025-03-13

2.3 所含字段#

for col in df.columns:

print(f' - {col}')

Run

- id ArXiv ID(可以用来访问论文,详情请见下方)

- submitter 论文提交者

- authors 论文作者

- title 标题

- comments 附加信息,例如页数和图表数量

- journal-ref 论文发表的期刊信息

- doi 论文的DOI号(数字对象标识符)

- report-no 报告编号(作者在提交到arXiv前已经获得作者所属机构的报告编号)

- categories arXiv 系统的类别/标签

- license 论文所依据的许可协议

- abstract 论文摘要

- versions 版本历史

- update_date 论文更新日期

- authors_parsed 论文作者

字段数据的缺失程度

import missingno as ms

ms.matrix(df)

2.4 作者#

可以使用字段 authors_parsed 计算每篇论文的作者数量

df['N_authors'] = df['authors_parsed'].apply(lambda ap: len(ap))

df['N_authors']

Run

0 4

1 2

2 1

3 1

4 2

..

2689083 7

2689084 4

2689085 3

2689086 1

2689087 3

Name: N_authors, Length: 2689088, dtype: int64

data = df['N_authors'].value_counts().sort_index(ascending=True).reset_index()

data['N_authors'] = data['N_authors'].astype(str)

data

三、可视化#

3.1 论文年度提交量#

from plotnine import *

from matplotlib.font_manager import FontProperties

font_prop = FontProperties(fname='文泉驿微米黑.ttf')

data = df.created.dt.year.value_counts().sort_index().reset_index()

(

ggplot(data, aes(x='created', y='count'))

+geom_bar(stat='identity')

+labs(title='arXiv论文年度提交量趋势图(1986-2025.3)',

x='',

y='')

+ annotate(

'text',

x= 1986,

y= data['count'].max() * 1.05,

label='公众号: 大邓和他的Python',

ha='left',

va='top',

size=10,

color='black',

)

+scale_x_continuous(breaks=range(1986, 2026, 3))

+theme(figure_size=(8, 5),

text=element_text(family= font_prop.get_name(), size=8, rotation=0),

plot_title = element_text(size=13, rotation=0, weight='bold'),

axis_text_x = element_text(size=8, rotation=0))

)

3.2 作者数量分布图#

from plotnine import *

from matplotlib.font_manager import FontProperties

font_prop = FontProperties(fname='文泉驿微米黑.ttf')

data = df['N_authors'].value_counts().sort_index(ascending=True).reset_index()

(

ggplot(data.head(20), aes(x='N_authors', y='count'))

+geom_bar(stat='identity')

+labs(title='arXiv每篇论文作者数量分布图',

x='',

y='')

+ annotate(

'text',

x= 16,

y= data['count'].max() ,

label='公众号: 大邓和他的Python',

ha='left',

va='top',

size=10,

color='black',

)

+scale_x_continuous(breaks=range(0, 21, 1))

+theme(figure_size=(8, 5),

text=element_text(family= font_prop.get_name(), size=8, rotation=0),

plot_title = element_text(size=13, rotation=0, weight='bold'),

axis_text_x = element_text(size=8, rotation=0))

)

3.3 前10大研究热点#

from plotnine import *

import pandas as pd

from matplotlib.font_manager import FontProperties

font_prop = FontProperties(fname='文泉驿微米黑.ttf')

data = df['categories'].value_counts().reset_index()

data.sort_values(by='count', ascending=False, inplace=True)

data['categories'] = pd.Categorical(data['categories'], categories=data['categories'], ordered=True)

(

ggplot(data.head(10), aes(x='categories', y='count')) # 注意这里x和y的位置

+ geom_bar(stat='identity')

+ labs(title='arXiv每篇论文作者数量分布图',

x='',

y='')

+ coord_flip() # 翻转坐标轴以创建水平条形图

+ theme(figure_size=(8, 4),

text=element_text(family=font_prop.get_name(), size=8, rotation=0),

plot_title=element_text(size=12, rotation=0, weight='bold'),

axis_text_x=element_text(size=8, rotation=0))

)