ITPub博客

首页 > > > R语言实战——Nature Neuroscience的十年(一)

R语言实战——Nature Neuroscience的十年(一)

作者:浪花小雨滴 时间:2020-06-17 10:56:15 0 删除 编辑

原创:hxj7

序

前言

学习R语言有半年时间了,一直想找个机会找个小项目练练手,所以才有了这篇文章。

目的

对《Nature Neuroscience》杂志2009-2018年的研究文章进行可视化初探。

主要分为以下几个部分:

1. 基础统计及可视化

2. 进一步统计及可视化

3. 主要国家比较及可视化

4. 热词统计及可视化

5. 对接收时间的统计建模及特征选择

(截至发文才完成第1和第2部分,其余部分只能有机会再做)

数据来源

从Nature杂志官网搜索文章,搜索参数为:

journal: neuro

subject: biological-sciences/health-sciences

article_type: research, review, protocol(不包括Introduction, Editorial)

time_range: 2009-2018

说明

1. 港澳台与大陆合并计算。

2. 如果不做特别说明,日期默认按照发表日期(Publlish Date)统计。

不足

1. 数据缺失或不规范为数据分析带来偏差。比如国家、省份、城市名称前后不一致或缺失。

2. 对NA的处理还不够完善。什么时候该去除NA是要仔细考量的。

3. 有些作者的英文名是重合的,计算时没有做区分。

4. 文章数相同的作者排名是按照姓名的字典序排序的。

5. 没有统计标准差。

6. R作图的一些细节还需要改善。

7. 实现的代码虽然经过简化,但还是有些冗余。

8. 还有很多有意思的东西限于时间经历和篇幅就暂不研究了。

声明

本文仅是个人练习的结果,肯定有谬误的地方,不具有任何参考价值,那些花里胡哨的话不要乱了心!

第一部分:基础统计及可视化

导入数据

数据预处理

观察数据

'data.frame': 2575 obs. of 21 variables:
 $ date : chr "2018-12-31" "2018-12-17" "2018-12-17" "2018-12-17" ...
 $ title : chr "Panoptic imaging of transparent mice reveals whole-body neuronal projections and skull–meninges connections" "TDP-43 extracted from frontotemporal lobar degeneration subject brains displays distinct aggregate assemblies a"| __truncated__ "Efficient coding of subjective value" "Invasion of white matter tracts by glioma stem cells is regulated by a NOTCH1–SOX2 positive-feedback loop" ...
 $ type : chr "Research" "Research" "Research" "Research" ...
 $ magzine : chr "Nature Neuroscience" "Nature Neuroscience" "Nature Neuroscience" "Nature Neuroscience" ...
 $ volume : int NA 22 22 22 22 22 22 22 22 22 ...
 $ startPage : int 1 65 134 91 120 57 78 37 106 25 ...
 $ endPage : int 11 77 142 105 133 64 90 46 119 36 ...
 $ abstract : chr "Analysis of entire transparent rodent bodies after clearing could provide holistic biological information in he"| __truncated__ "Accumulation of abnormally phosphorylated TDP-43 (pTDP-43) is the main pathology in affected neurons of people "| __truncated__ "Preference-based decisions are essential for survival, for instance, when deciding what we should (not) eat. De"| __truncated__ "Early invasive growth along specific anatomical structures, especially the white matter tract, is regarded as o"| __truncated__ ...
 $ receiveDate: chr "2018-04-01" "2018-09-10" "2018-01-20" "2018-04-06" ...
 $ reviseDate : chr "" "" "" "" ...
 $ acceptDate : chr "2018-11-21" "2018-11-14" "2018-11-13" "2018-10-31" ...
 $ author : chr "Ruiyao Cai|Chenchen Pan|Alireza Ghasemigharagoz|Mihail Ivilinov Todorov|Benjamin F<U+00F6>rstera|Shan Zhao|Hars"| __truncated__ "Florent Laferrière|Zuzanna Maniecka|Manuela Pérez-Berlanga|Marian Hruska-Plochan|Larissa Gilhespy|Eva-Maria Hoc"| __truncated__ "Rafael Polanía|Michael Woodford|Christian C. Ruff" "Jun Wang|Sen-Lin Xu|Jiang-Jie Duan|Liang Yi|Yu-Feng Guo|Yu Shi|Lin Li|Ze-Yu Yang|Xue-Mei Liao|Jiao Cai|Yan-Qi Z"| __truncated__ ...
 $ nauthor : int 22 23 3 22 4 10 18 17 20 15 ...
 $ ncoauthor : int 2 2 1 4 1 1 3 1 2 1 ...
 $ corresp : chr "Ali Ertürk" "Magdalini Polymenidou" "Rafael Polanía|Christian C. Ruff" "Xiu-Wu Bian|Shi-Cang Yu" ...
 $ ncorresp : int 1 1 2 2 1 2 2 1 3 2 ...
 $ institute : chr "Ludwig-Maximilians University Munich;Graduate School of Systemic Neurosciences Munich|Ludwig-Maximilians Univer"| __truncated__ "University of Zurich|University of Zurich|University of Zurich|University of Zurich|University of Zurich|Univer"| __truncated__ "University of Zurich;ETH Zurich;Columbia University|Columbia University|University of Zurich" "Army Medical University (Third Military Medical University);Army Medical University (Third Military Medical Uni"| __truncated__ ...
 $ city : chr "Munich;Munich|Munich;Munich|Munich|Munich;Munich|Munich|Munich|Munich|Munich|Munich|Munich;Munich|Munich|Copenh"| __truncated__ "Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|London;London|London;London|London;London"| __truncated__ "Zurich;Zurich;New York|New York|Zurich" "Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|C"| __truncated__ ...
 $ province : chr "Munich;Munich|Munich;Munich|Munich|Munich;Munich|Munich|Munich|Munich|Munich|Munich|Munich;Munich|Munich|Copenh"| __truncated__ "Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|Zurich|London;London|London;London|London;London"| __truncated__ "Zurich;Zurich;NY|NY|Zurich" "Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|Chongqing|Chongqing;Chongqing|C"| __truncated__ ...
 $ country : chr "Germany;Germany|Germany;Germany|Germany|Germany;Germany|Germany|Germany|Germany|Germany|Germany|Germany;Germany"| __truncated__ "Switzerland|Switzerland|Switzerland|Switzerland|Switzerland|Switzerland|Switzerland|Switzerland|Switzerland|Swi"| __truncated__ "Switzerland;Switzerland;USA|USA|Switzerland" "China;China|China|China;China|China|China;China|China|China;China|China;China|China;China|China;China|China|Chi"| __truncated__ ...
 $ address : chr "Institute for Stroke and Dementia Research, Klinikum der Universit<U+00E4>t München, Ludwig-Maximilians Univers"| __truncated__ "Institute of Molecular Life Sciences, University of Zurich, Zurich, Switzerland|Institute of Molecular Life Sci"| __truncated__ "Zurich Center for Neuroeconomics (ZNE), Department of Economics, University of Zurich, Zurich, Switzerland;Deci"| __truncated__ "Institute of Pathology and Southwest Cancer Center, Key Laboratory of the Ministry of Education, Southwest Hosp"| __truncated__ ...

转换数据类型

看各列是否有NA

       date       title        type     magzine      volume   startPage 
          0           0           0           0           1           0 
    endPage    abstract receiveDate  reviseDate  acceptDate      author 
          0           0          87        2574          87           0 
    nauthor   ncoauthor     corresp    ncorresp   institute        city 
          0           0           9           0           0           0 
   province     country     address 
          0           0           0 

删除重复数据

原来共有多少行:

[1] 2575

删除后还有多少行:

[1] 1847

添加文章序号

杂志近N年的发文数、发文类型分布

看看每年的发文数变化

杂志近N年一篇文章的标题字数

标题是不是越来越长呢?


杂志近N年一篇文章的平均页数

多盼望两三页就能搞定论文啊!

(暂不统计缺失数据(NA)的比例)


杂志近N年一篇文章的接收时间

新年愿望:当天发,当天收~

(暂不统计缺失数据(NA)的比例)

杂志近N年一篇文章的平均作者数

师兄师姐帮帮忙,师弟师妹挂挂名~

(暂不统计缺失数据(NA)的比例)


杂志近N年一篇文章的共一作者数

分你一杯羹!

(暂不统计缺失数据(NA)的比例)


杂志近5年一篇文章的通讯作者数

报告老板,文章发啦!

(暂不统计缺失数据(NA)的比例)


一个作者发了几篇文章

有一篇就是人生赢家了,嘿嘿嘿…


一个作者发了几篇一作(包括共一)

跟别人合作也是不错的~


一个作者发了几篇通讯

老板棒棒的!


一个国家发了几篇文章

都在烧钱啊


一个机构发了几篇文章

拿经费拿到手软


近N年一篇文章平均有几个国家参与

地球是个村嘛


近N年一篇文章平均有几个机构参与

小伙伴一起玩!


发文数最多的作者

计算方式为平均值,即一篇文章每位作者的贡献度是一样的。暂时以每人一篇计算。

围观大牛


发文数最多的一作(包括共一)作者

围观希望之星


发文数最多的通讯作者

围观大Boss


发文数最多的国家

明年留学就去那


发文数最多的机构

知道博后去哪里了


发文数最多的中国省份

和经济发展程度有关系吗?


质控:有多少中国省份缺失或者没有转换成中文(计算文章比例)

缺失比例:


没有转换成中文比例


发文数最多的中国城市


质控:有多少中国城市缺失或者没有转换成中文(计算文章比例)

缺失比例:


没有转换成中文比例

发文数最多的中国机构


第二部分:进一步统计及可视化

哪个月份更适合投稿呢?

按发表日期月份统计文章数


统计每月文章数占全年的比例


按发表日期月份统计接收时间

乱糟糟的,是不是要平滑一下呢


按收到日期月份统计接收时间


接收时间最短的国家

你快你牛



接收时间最长的国家


合作最多的两个国家

以国际合作的文章数多少衡量

看看谁是哥俩好


国际合作文章数最多的国家

以国际合作的文章数多少衡量


国际合作占比最多的国家

计算某个国家国际合作的文章数占其文章总数的比例。挑选年度文章数不少于三篇的进行计算。


大牛的文章比一般人更快接收吗?

按照发文数将作者们分为Top3,前1%, 前10%,前50%,全部

不同群体文章接收时间


大牛国家分布

假设作者S以两个国家名义A和B发表文章,其中在某年该作者涉及到A国的文章有100篇,而涉及到B国的有10篇,而作者S在文章总数排行的前1%。如果文章不区分国家来源,那么A和B国都拥有了一位排名Top1%的作者,如果文章区分国家来源,那么B国很可能就算不上有这一位Top1%的作者。

1. 不区分国家来源


2. 区分国家来源


合作文章数最多的两个人

年度最佳合伙人


大牛之间合作多吗?

取Top3的大牛来计算。


第三部分:主要国家比较及可视化

选取中国、美国、英国、日本、德国这几个国家进行分析

这几个国家的发文数


这几个国家的平均接收时间

这几个国家互相合作的文章数


这几个国家合作文章数占各自国际合作文章总数的比例


中国最常合作的国家


大牛数

不区分文章作者的国家来源


区分文章作者的国家来源

大牛比例

不区分文章作者的国家来源


区分文章作者的国家来源


第四部分:热词统计及可视化

各年份热词(标题)

各年份热词(标题+摘要)

大牛引领热词潮流?

第五部分:对接收时间的统计建模及特征选择

建模

聚类

分类、特征选择

Special:香港城市大学的统计

发文数、发文最多作者,共一作者,通讯作者,最多合作机构

(未完待续)

(公众号:生信了)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31537575/viewspace-3169529/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-05-16

  • 博文量
    4259
  • 访问量
    40389