Package 'tinyscholar'

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

Help Index


Show Scholar Profile Plot.

Description

Show Scholar Profile Plot.

Usage

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
)

Arguments

profile

Result from tinyscholar.

bar_width

bar width.

add_total

If TRUE (not default), add total records in plot.

add_text

If TRUE (default), add text on the top of bar.

title_citations

Title for plot citations. Set by ggplot2::labs.

title_publications

Title for plot publications. Set by ggplot2::labs.

caption_citations

Caption for plot citations. Set by ggplot2::labs.

caption_publications

Caption for plot publications. Set by ggplot2::labs.

Value

a length-2 list of ggplot2::ggplot object.

See Also

tinyscholar, scholar_table


Show Scholar Profile Table

Description

Show Scholar Profile Table

Usage

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
)

Arguments

profile

Result from tinyscholar.

as_raw_html

If TRUE (not default), convert result gt::gt object to raw html text. This is useful when apply the result to GitHub Markdown file.

title_citations

Title for table citations. Set by gt::tab_header.

title_publications

Title for table publications. Set by gt::tab_header.

caption_citations

Caption for table citations. Set by gt::tab_source_note.

caption_publications

Caption for table publications. Set by gt::tab_source_note.

Value

a length-2 list of gt::gt/html object.

See Also

tinyscholar, scholar_plot


Get Google Scholar Profile

Description

Get Google Scholar Profile

Usage

tinyscholar(
  id,
  sortby_date = FALSE,
  use_cache = TRUE,
  cache_dir = file.path(tempdir(), "tinyscholar")
)

Arguments

id

Your google scholar identifier. You can find it in the URL of your google scholar profile.

sortby_date

Logical. If TRUE, the publications are sorted by date.

use_cache

If TRUE (default), store data to a cache file to avoid querying in next time within a day. The store file is identical for each person and each date.

cache_dir

A directory path.

Value

a Profile object with list structure.

Examples

# 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
}