One-shot workflow: fetch all works for a researcher by ORCID, enrich, embed, and build a trajectory analysis.
Usage
sm_researcher_profile(
orcid,
sources = c("openalex"),
enrich = c("oa_status"),
embed = FALSE,
trajectory = TRUE,
mailto = Sys.getenv("SCIMAPR_MAILTO"),
n_max = 200L
)Arguments
- orcid
ORCID identifier.
- sources
API sources to query.
- enrich
Enrichment steps to run.
- embed
Logical; compute embeddings?
- trajectory
Logical; build trajectory analysis?
- mailto
Contact address sent to OpenAlex (see
sm_fetch_openalex()).- n_max
Maximum number of works to fetch (default
200, as insm_fetch_openalex()). A researcher with more works gets a profile of the firstn_maxonly, so raise it for long careers.
Examples
# \donttest{
# Queries the OpenAlex web API; 0000-0002-1825-0097 is the ORCID test record.
if (requireNamespace("curl", quietly = TRUE) && curl::has_internet()) {
profile <- try(sm_researcher_profile("0000-0002-1825-0097", n_max = 20))
print(profile)
}
#> ℹ Fetching works from OpenAlex...
#> ℹ Fetched 20 / 20 works.
#> ✔ Parsed 20 OpenAlex works into sm_corpus.
#>
#> ── <sm_corpus> ─────────────────────────────────────────────────────────────────
#> Works: 20 | Authors: 79 | Institutions: 0
#> Years: 2004 - 2025
#> Sources (journals): 19
#> Embeddings: none
#> Provenance: openalex (20)
#> Status: Unlocked (last refreshed: never)
# }