Retrieving basic information

## Define the id for Richard Feynman
id <- 'B7vSqZsAAAAJ'

## Get his profile
get_profile(id)
## $id
## [1] "B7vSqZsAAAAJ"
## 
## $name
## [1] "Richard Feynman"
## 
## $affiliation
## [1] "California Institute of Technology"
## 
## $total_cites
## [1] 131676
## 
## $h_index
## [1] 62
## 
## $i10_index
## [1] 103
## 
## $fields
## [1] "quantum mechanics"       "quantum electrodynamics"
## 
## $homepage
## character(0)
## 
## $coauthors
## [1] "Sort by citations" "Sort by year"      "Sort by title"    
## [4] "About Scholar"     "Search help"      
## 
## $available
## [1] NA
## 
## $not_available
## [1] NA

Retrieving publications

get_publications() return a data.frame of publication records. It contains information of the publications, including title, author list, page number, citation number, publication year, etc..

The pubid is the article ID used by Google Scholar and the identifier that is used to retrieve the citation history of a selected publication.

## Get his publications (a large data frame)
p <- get_publications(id)
head(p, 3)
##                                    title
## 1 Quantum mechanics and path integration
## 2        The Feynman lectures on physics
## 3      Simulating physics with computers
##                                         author
## 1                         RP Feynman, AR Hibbs
## 2 RP Feynman, RB Leighton, M Sands, SB Treiman
## 3                                   RP Feynman
##                                        journal          number cites year
## 1                                  McGraw–Hill                 37629 1965
## 2                                Physics Today          17, 45 23750 1964
## 3 International journal of theoretical physics 21 (6), 467-488 14205 1982
##                                                                                 cid
## 1 8172747039614742666,12091496877795411869,3494294362048429920,18041911941623786099
## 2 8172747039614742666,15649786516955137750,13112633961799421939,3669163321259408309
## 3                                                              15599256484525608168
##          pubid
## 1 hMod-77fHWUC
## 2 u-x6o8ySG0sC
## 3 d1gkVwhDpl0C

Retrieving citation data

## Get his citation history, i.e. citations to his work in a given year
ct <- get_citation_history(id)

## Plot citation trend
library(ggplot2)
ggplot(ct, aes(year, cites)) + geom_line() + geom_point()

Users can retrieve the citation history of a particular publication with get_article_cite_history().

## The following publication will be used to demonstrate article citation history
as.character(p$title[1])
## [1] "Quantum mechanics and path integration"
## Get article citation history
ach <- get_article_cite_history(id, p$pubid[1])

## Plot citation trend
ggplot(ach, aes(year, cites)) +
    geom_segment(aes(xend = year, yend = 0), linewidth=1, color='darkgrey') +
    geom_point(size=3, color='firebrick')

Comparing scholars

You can compare the citation history of scholars by fetching data with compare_scholars.

# Compare Feynman and Stephen Hawking
ids <- c('B7vSqZsAAAAJ', 'qj74uXkAAAAJ')

# Get a data frame comparing the number of citations to their work in
# a given year
cs <- compare_scholars(ids)
## remove some 'bad' records without sufficient information
cs <- dplyr::filter(cs, !is.na(year) & year > 1900) 

ggplot(cs, aes(year, cites, group=name, color=name)) + 
  geom_line() + theme(legend.position="bottom")

## Compare their career trajectories, based on year of first citation
csc <- compare_scholar_careers(ids)
ggplot(csc, aes(career_year, cites, group=name, color=name)) + 
  geom_line() + geom_point() +
  theme(legend.position = "inside", 
    legend.position.inside=c(.2, .8)
  )

Visualizing and comparing network of coauthors

# Be careful with specifying too many coauthors as the visualization of the
# network can get very messy.
coauthor_network <- get_coauthors('DO5oG40AAAAJ', n_coauthors = 4)

coauthor_network
##                              author          coauthors
## qgFBNJgAAAAJ&hl      Guangchuang Yu       Shuangbin Xu
## kRtxIw0AAAAJ&hl      Guangchuang Yu Tommy Tsan-Yuk Lam
## WmjCTgMAAAAJ&hl      Guangchuang Yu        Zhu Huachen
## 1M8ux5YAAAAJ&hl      Guangchuang Yu       Qianwen Wang
## DO5oG40AAAAJ&hl        Shuangbin Xu     Guangchuang Yu
## 1M8ux5YAAAAJ&hl1       Shuangbin Xu       Qianwen Wang
## HxxRzrYAAAAJ&hl        Shuangbin Xu      Zhangran Chen
## 4                Tommy Tsan-Yuk Lam      About Scholar
## kRtxIw0AAAAJ&hl1        Zhu Huachen Tommy Tsan-Yuk Lam
## 1mTtPIIAAAAJ&hl         Zhu Huachen       Steven Riley
## DO5oG40AAAAJ&hl1        Zhu Huachen     Guangchuang Yu
## bib_lf0AAAAJ&hl         Zhu Huachen     Gavin Jd Smith
## DO5oG40AAAAJ&hl2       Qianwen Wang     Guangchuang Yu
## qgFBNJgAAAAJ&hl1       Qianwen Wang       Shuangbin Xu
## b-duIhMAAAAJ&hl        Qianwen Wang       Hon-Ming Lam
## GzJd-VoAAAAJ&hl        Qianwen Wang     Wai-Shing Yung

And then we have a built-in function to plot this visualization.

plot_coauthors(coauthor_network)
## Warning: Removed 6 rows containing missing values or values outside the scale range
## (`geom_point()`).

Note however, that these are the coauthors listed in Google Scholar profile and not coauthors from all publications.

Formatting publications for CV

The format_publications function can be used for example in conjunction with the vitae package to format publications in APA Style. The short name of the author of interest (e.g., of the person whose CV is being made) can be highlighted in bold with the author.name argument. The function after the pipe allows rmarkdown to format them properly, and the code chunk should be set to results = "asis".

APA style

format_publications("DO5oG40AAAAJ", "Guangchuang Yu") |> head() |> cat(sep='\n\n')

Xu, S., Wang, Q., Wen, S., Li, J., He, N., Li, M., Hackl, T., Wang, R., Zeng, D., Wang, S., & … (2025). aplot: Simplifying the creation of complex graphs to visualize associations across diverse data types. The Innovation.

Wang, Q., Zhu, H., Deng, L., Xu, S., Xie, W., Li, M., Wang, R., Tie, L., Zhan, L., & Yu, G. (2025). Spatial Transcriptomics: Biotechnologies, Computational Tools, and Neuroscience Applications. Small Methods. 9 (5), 2401107

Gao, Y., Li, B., Jin, Y., Cheng, J., Tian, W., Ying, L., Hong, L., Xin, S., Lin, B., Liu, C., & … (2025). Spatial multi-omics profiling of breast cancer oligo-recurrent lung metastasis. Oncogene. 1-15

Chen, M., Luo, X., Xu, S., Li, L., Li, J., Xie, Z., Wang, Q., Liao, Y., Liu, B., Liang, W., & … (2025). Scalable method for exploring phylogenetic placement uncertainty with custom visualizations using treeio and ggtree. iMeta, e. e269

Tu, Y., Xu, S., Shu, H., Wang, X., Li, W., Yu, G., & He, L. (2025). 16S rRNA Sequencing Reveals Dysbiosis of Skin Microbiome Associated With Disease Severity in Chronic Actinic Dermatitis. Photodermatology, photoimmunology & photomedicine. 41 (3), e70022

Yu, G., Xu, S., Wang, Q., Li, J., Li, J., Wang, R., Zhang, L., Xie, W., Wen, S., Li, M., & … (2025). Precise Characterization of Cellular States and Spatial Variable Patterns within Spatial Transcriptomics. **.

Numbering format

format_publications("DO5oG40AAAAJ", "Guangchuang Yu") |> head() |> print(quote=FALSE)

[1] Xu, S., Wang, Q., Wen, S., Li, J., He, N., Li, M., Hackl, T., Wang, R., Zeng, D., Wang, S., & … (2025). aplot: Simplifying the creation of complex graphs to visualize associations across diverse data types. The Innovation.
[2] Wang, Q., Zhu, H., Deng, L., Xu, S., Xie, W., Li, M., Wang, R., Tie, L., Zhan, L., & Yu, G. (2025). Spatial Transcriptomics: Biotechnologies, Computational Tools, and Neuroscience Applications. Small Methods. 9 (5), 2401107
[3] Gao, Y., Li, B., Jin, Y., Cheng, J., Tian, W., Ying, L., Hong, L., Xin, S., Lin, B., Liu, C., & … (2025). Spatial multi-omics profiling of breast cancer oligo-recurrent lung metastasis. Oncogene. 1-15
[4] Chen, M., Luo, X., Xu, S., Li, L., Li, J., Xie, Z., Wang, Q., Liao, Y., Liu, B., Liang, W., & … (2025). Scalable method for exploring phylogenetic placement uncertainty with custom visualizations using treeio and ggtree. iMeta, e. e269
[5] Tu, Y., Xu, S., Shu, H., Wang, X., Li, W., Yu, G., & He, L. (2025). 16S rRNA Sequencing Reveals Dysbiosis of Skin Microbiome Associated With Disease Severity in Chronic Actinic Dermatitis. Photodermatology, photoimmunology & photomedicine. 41 (3), e70022 [6] Yu, G., Xu, S., Wang, Q., Li, J., Li, J., Wang, R., Zhang, L., Xie, W., Wen, S., Li, M., & … (2025). Precise Characterization of Cellular States and Spatial Variable Patterns within Spatial Transcriptomics. **.