Title: | Get and Show Personal 'Google Scholar' Profile |
---|---|
Description: | Provides functions to get personal 'Google Scholar' profile data from web API and show it in table or figure format. |
Authors: | Shixiang Wang [aut, cre] |
Maintainer: | Shixiang Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.7 |
Built: | 2024-08-20 02:29:06 UTC |
Source: | https://github.com/ShixiangWang/tinyscholar |
Show Scholar Profile Plot.
scholar_plot( profile, bar_width = 0.5, add_total = FALSE, add_text = TRUE, title_citations = NULL, title_publications = NULL, caption_citations = paste("Update:", Sys.Date()), caption_publications = caption_citations )
scholar_plot( profile, bar_width = 0.5, add_total = FALSE, add_text = TRUE, title_citations = NULL, title_publications = NULL, caption_citations = paste("Update:", Sys.Date()), caption_publications = caption_citations )
profile |
Result from tinyscholar. |
bar_width |
bar width. |
add_total |
If |
add_text |
If |
title_citations |
Title for plot |
title_publications |
Title for plot |
caption_citations |
Caption for plot |
caption_publications |
Caption for plot |
a length-2 list of ggplot2::ggplot object.
Search Google Scholar Highly Related Papers or Author
scholar_search( keyword, is_author = TRUE, server_url = "https://api.scaleserp.com", server_key = NULL )
scholar_search( keyword, is_author = TRUE, server_url = "https://api.scaleserp.com", server_key = NULL )
keyword |
A keyword, can be author name, e.g. "Shixiang Wang". |
is_author |
Default is |
server_url |
Server URL, here I use Scale SERP API. |
server_key |
Key for searching data (multiple is acceptable), you can obtain it from URL above. If not set, use personal key from Shixiang. Total 125x2 free searches per month. |
A data.frame
or a list
.
x <- scholar_search("Shixiang Wang") x x <- scholar_search("Shixiang Wang", is_author = FALSE) if (!is.null(x)) { x$gt }
x <- scholar_search("Shixiang Wang") x x <- scholar_search("Shixiang Wang", is_author = FALSE) if (!is.null(x)) { x$gt }
Show Scholar Profile Table
scholar_table( profile, as_raw_html = FALSE, title_citations = "Citations", title_publications = "Publications", caption_citations = gt::md(paste("**Update**:", Sys.Date())), caption_publications = caption_citations )
scholar_table( profile, as_raw_html = FALSE, title_citations = "Citations", title_publications = "Publications", caption_citations = gt::md(paste("**Update**:", Sys.Date())), caption_publications = caption_citations )
profile |
Result from tinyscholar. |
as_raw_html |
If |
title_citations |
Title for table |
title_publications |
Title for table |
caption_citations |
Caption for table |
caption_publications |
Caption for table |
a length-2 list of gt::gt/html
object.
Get Google Scholar Profile
tinyscholar( id, sortby_date = FALSE, use_cache = TRUE, cache_dir = file.path(tempdir(), "tinyscholar") )
tinyscholar( id, sortby_date = FALSE, use_cache = TRUE, cache_dir = file.path(tempdir(), "tinyscholar") )
id |
Your google scholar identifier. You can find it in the URL of your google scholar profile. |
sortby_date |
Logical. If |
use_cache |
If |
cache_dir |
A directory path. |
a Profile
object with list structure.
# Put one unique Scholar ID from Google Scholar r <- tinyscholar("FvNp0NkAAAAJ") r if (!is.null(r)) { tb <- scholar_table(r) tb$citations tb$publications pl <- scholar_plot(r) pl$citations pl$publications }
# Put one unique Scholar ID from Google Scholar r <- tinyscholar("FvNp0NkAAAAJ") r if (!is.null(r)) { tb <- scholar_table(r) tb$citations tb$publications pl <- scholar_plot(r) pl$citations pl$publications }