tinyscholar

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The goal of tinyscholar is to provide a simple way to get and show Google scholar profile.

Installation

You can install the released version of tinyscholar from CRAN with:

install.packages("tinyscholar")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ShixiangWang/tinyscholar")
# devtools::install_git("https://gitee.com/ShixiangWang/tinyscholar")

Usage

Here I will use my profile as an example.

library(tinyscholar)

Get You Google Scholar ID

Firstly, you need to get your Google scholar ID from URL of your Google scholar profile or by running the following function with a keyword:

scholar_search("Shixiang Wang")
#> Searching author Shixiang Wang
#> Using API server: https://api.scaleserp.com
#> Using Shixiang's personal API key, only 125 free searches per month for all packages users
#> Search times used: 38
#> Search times left: 87
#>             id
#> 1 FvNp0NkAAAAJ
#>                                                                                               desc
#> 1 Wang, Shixiang (王诗翔)ShanghaiTech. UniversityVerified email at shanghaitech.edu.cnCited by 127

Copy your ID and go to the next step.

Get Personal Profile

Then you can use function tinyscholar() to get the tidy data, which is a list of two data.frame with added profile class.

profile <- tinyscholar("FvNp0NkAAAAJ")
str(profile, max.level = 1)

You can use this data in your way. The following parts provide two simple ways to show the profile.

Show Table

Table is the best way to show the scholar profile. Tinyscholar uses gt package to generate tables which can be easily modified.

tb <- scholar_table(profile)
tb$citations
tb$publications

Show Plot

Similarly, you can show numeric data with ggplot2 package.

pl <- scholar_plot(profile)
pl$citations
pl$publications

Similar R package

R package scholar is a more comprehensive package to get and visualize the Google scholar profile. However, tinyscholar is lightweight and not limited in China.



Try the tinyscholar package in your browser

Any scripts or data that you put into this service are public.

tinyscholar documentation built on Aug. 9, 2022, 5:06 p.m.