2021-01-13

数据分析task1

一.任务说明
二.数据集介绍
三.arxiv论文类别介绍
四.具体代码以及一定讲解
4.1导入package并读取数据
4.2定义函数
4.3数据预处理
4.4数据分析及可视化
五.总结

一.任务说明

任务主题:论文数量统计,即统计2019年全年计算机各个方向论文数量;
任务内容:赛题的理解、使用 Pandas 读取数据并进行统计;
任务成果:学习 Pandas 的基础操作;

二.数据集介绍

数据集来:[link]https://cdn.coggle.club/arxiv-metadata-oai-2019.json.zip .
数据集的格式如下:id:arXiv ID,可用于访问论文;
submitter:论文提交者;
authors:论文作者;
title:论文标题;
comments:论文页数和图表等其他信息;journal-ref:论文发表的期刊的信息;
doi:数字对象标识符https://www.doi.org;
report-no:报告编号;
categories:论文在 arXiv 系统的所属类别或标签;
license:文章的许可证;
abstract:论文摘要;
versions:论文版本;
authors_parsed:作者的信息。

三.arxiv论文类别介绍

[link]https://arxiv.org/help/api/user-manual 的 5.3 小节的 Subject Classifications 的部分

四.具体代码实现以及一定讲解

4.1导入package并读取数据
import seaborn as sns
from bs4 import BeautifulSoup
import re
import requests
import json
import pandas as pd
import matplotlib.pyplot as plt
这里使用的package的版本如下(python 3.10):seaborn:0.9.0
BeautifulSoup:4.8.0
requests:2.22.0
json:0.8.5
pandas:0.25.1
matplotlib:3.1.1
4.2
data = [] #初始化
#使用with语句优势:1.自动关闭文件句柄;2.自动显示(处理)文件读取数据异常
with open(“arxiv-metadata-oai-2019.json”, ‘r’) as f:
for line in f:
data.append(json.loads(line))

data = pd.DataFrame(data) #将list变为dataframe格式,方便使用pandas进行分析
data.shape #显示数据大小

4.3预处理
data[“categories”].describe()
4.4数据分析以及可视化
_df = data.merge(df_taxonomy, on=“categories”, how=“left”).drop_duplicates([“id”,“group_name”]).groupby(“group_name”).agg({“id”:“count”}).sort_values(by=“id”,ascending=False).reset_index()
_df

五.总结

year 2019 2020
category_name
Artificial Intelligence 558 757
Computation and Language 2153 2906
Computational Complexity 131 188
Computational Engineering, Finance, and Science 108 205
Computational Geometry 199 216
Computer Science and Game Theory 281 323
Computer Vision and Pattern Recognition 5559 6517
Computers and Society 346 564
Cryptography and Security 1067 1238
Data Structures and Algorithms 711 902
Databases 282 342
Digital Libraries 125 157
Discrete Mathematics 84 81
Distributed, Parallel, and Cluster Computing 715 774
Emerging Technologies 101 84
Formal Languages and Automata Theory 152 137
General Literature 5 5
Graphics 116 151
Hardware Architecture 95 159
Human-Computer Interaction 420 580
Information Retrieval 245 331
Logic in Computer Science 470 504
Machine Learning 177 538
Mathematical Software 27 45
Multiagent Systems 85 90
Multimedia 76 66
Networking and Internet Architecture 864 783
Neural and Evolutionary Computing 235 279
Numerical Analysis 40 11
Operating Systems 36 33
Other Computer Science 67 69
Performance 45 51
Programming Languages 268 294
Robotics 917 1298
Social and Information Networks 202 325
Software Engineering 659 804
Sound 7 4
Symbolic Computation 44 36
Systems and Control 415 133

PS:在手机上编辑的,不知道怎么插入图片

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值