Rで研究者の業績を調べたい
Rは日々パッケージが更新されています.
レポジトリには数千のパッケージがあるのでフォローしきれません.
面白そうなものは使っていきたいです.
今回は "scholar"パッケージを使います.
参考文献
http://www.r-bloggers.com/new-r-package-scholar/
Package "scholar"
scholarパッケージを使います.
Google Scholar から研究者の情報を引っ張ってきてなんやかんやします.
アインシュタインが書いた論文の被引用回数をグラフにしました.
2004年前後で急増している様子が確認できます.
何があったのでしょうか. だれか教えてください.
また, 引用数が低下している箇所があります.
これはどういうことなのでしょうか.
よく分かりません.
グラフ作成のためのコードはこんな感じです.
ほとんど文字の大きさ調整です.
# install.packages("scholar") library(scholar) library(ggplot2) # Einstein's ID number id <- 'qc6CJjYAAAAJ&hl' # get profile data from Google Scholar einstein <- get_profile(id) # get citation history data history <- get_citation_history(id) # plot by ggplot function p <- ggplot(history, aes(x=year, y=cites)) + geom_line() # title p <- p + labs(title="Albert Einstein") # font size p <- p + theme(plot.title = element_text(size=rel(3))) p <- p + theme(axis.title.x=element_text(size=rel(2))) p <- p + theme(axis.title.y=element_text(size=rel(2))) p
どんな論文が引用されているかもわかります.
get_publication関数を使うと, 論文の情報が得られます.
# get the paper data by "get_publication function" > pub <- get_publications(id) # show the top 5 cited paper > head(pub[,c("year","cites","title")],5) year cites title 1 1935 11655 Can quantum-mechanical description of physical reality be considered complete? 2 1905 4974 On the movement of small particles suspended in stationary liquids required by the molecular-kinetic theory of heat 3 NA 3493 Zur Elektrodynamik bewegter Körper 4 1956 2891 Investigations on the Theory of the Brownian Movement 5 1906 2582 Eine neue bestimmung der moleküldimensionen
トップは被引用回数が1万回オーバーです.
タイトルは
"Can quantum-mechanical description of physical reality be considered complete?"
”神はサイコロを振らない”で有名な論文ですかね.
確率的な性質を持つ量子力学の世界なんて信じられない...という話です(超適当).
scholarパッケージは, Google Scholarから研究者の情報を引っ張ってきます.
研究者の指定は, 研究者のIDで行います.
IDは, Google Scholarの研究者プロフィールページから分かります.
http://scholar.google.com/citations?user=qc6CJjYAAAAJ&hl=en
URL内の
user=qc6CJjYAAAAJ&hl
という箇所が, IDを表しています.
例えば, ニュートンで著者名検索をすると
http://scholar.google.com/citations?user=xJaxiEEAAAAJ&hl=en
このページにたどり着くので, IDは"xJaxiEEAAAAJ&hl"です.
研究者の比較
ニュートンとアインシュタインの論文被引用回数を比べてみます.
アインシュタインすげえ(小並感)
コードはこんな感じです.
# Einstein's ID number id1 <- 'qc6CJjYAAAAJ&hl' # Newton's ID number id2 <- 'xJaxiEEAAAAJ&hl' ids <- c(id, id2) # get the data for comparison by function "compare_scholar_careers" df <- compare_scholar_careers(ids) # plot library(grid) # for the use of the function "unit" ggplot(df, aes(x=career_year, y=cites)) + geom_line(aes(linetype=name)) + labs(title="Einstein vs Newton") + theme(plot.title=element_text(size=rel(3))) + theme(legend.text=element_text(size=rel(2))) + theme(legend.key.size=unit(1.0,"cm")) + theme(axis.text.x=element_text(size=rel(2))) + theme(axis.text.y=element_text(size=rel(2))) + theme(axis.title.x=element_text(size=rel(2))) + theme(axis.title.y=element_text(size=rel(2)))
文字の大きさ調節がほとんどです.
ggplotを文末+でつなげて書くのは見栄えが悪い.
所属学科の教授陣で業績グラフを作ろうとしたのですが,
Google Scholarにプロフィールが登録されていませんでした.
残念.