Skip to contents

Look up DOIs in the corpus via the OpenCitations COCI API and add incoming and outgoing citation counts, plus citation links between works in the corpus.

This enricher is idempotent: re-running it updates existing citation data rather than duplicating it.

Usage

sm_enrich_opencitations(corpus, verbose = TRUE, call = rlang::caller_env())

Arguments

corpus

An sm_corpus object.

verbose

Print progress messages?

call

Caller environment for error reporting.

Value

An sm_corpus object with updated cited_by_count in the works table, enriched references table, and new provenance rows.

Examples

if (FALSE) { # \dontrun{
corpus <- sm_example_corpus()
corpus <- sm_enrich_opencitations(corpus)
} # }