Enrich corpus with OpenCitations citation data
Source:R/enrich-opencitations.R
sm_enrich_opencitations.RdLook 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())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)
} # }