Skip to contents

A function to perform a snowball search and convert the result to a tibble/data frame.

Usage

oa_snowball(
  identifier = NULL,
  ...,
  id_type = c("short", "original"),
  mailto = oa_email(),
  endpoint = "https://api.openalex.org",
  verbose = FALSE,
  citing_filter = list(),
  cited_by_filter = list()
)

Arguments

identifier

Character vector of openalex_id identifiers.

...

Additional arguments to pass to `oa_fetch` when querying the input works, such as `doi`.

id_type

Type of OpenAlex IDs to return. Defaults to "short", which remove the prefix https://openalex.org/ in the works' IDs, for example, W2755950973. If "original", the OpenAlex IDs are kept as are, for example, https://openalex.org/W2755950973

mailto

Character string. Gives OpenAlex an email to enter the polite pool.

endpoint

Character. URL of the OpenAlex Endpoint API server. Defaults to endpoint = "https://api.openalex.org".

verbose

Logical. If TRUE, print information on querying process. Default to verbose = FALSE.

citing_filter

filters used in the search of works citing the input works.

cited_by_filter

filters used in the search of works cited by the input works.

Value

A list containing 2 elements: - nodes: dataframe with publication records. The last column `oa_input` indicates whether the work was one of the input `identifier`(s). - edges: publication link dataframe of 2 columns `from, to` such that a row `A, B` means A -> B means A cites B. In bibliometrics, the "citation action" comes from A to B.

Examples

if (FALSE) {

snowball_docs <- oa_snowball(
  identifier = c("W2741809807", "W2755950973"),
  citing_filter = list(from_publication_date = "2022-01-01"),
  cited_by_filter = list(),
  verbose = TRUE
)
}