A function to get the nodes for a snowball search
Source:R/pro_snowball_get_nodes.R
pro_snowball_get_nodes.RdA function to get the nodes for a snowball search
Usage
pro_snowball_get_nodes(
identifier = NULL,
doi = NULL,
limit = NULL,
snapshot = NULL,
max_results = 100000L,
workers = 1L,
chunk_limit = NULL,
select = NULL,
endpoint = "https://api.openalex.org",
duckdb_config = NULL,
resume = FALSE,
cleanup = TRUE,
prepared = FALSE,
output = tempfile(fileext = ".snowball"),
verbose = FALSE
)Arguments
- identifier
Character vector of openalex identifiers.
- doi
Character vector of dois.
- limit
If
citedOnlyonly works cited by the keypaper are retrieved,citingOnlyretrieves only works citing the keypaper. Default:NULLwhere all will be retrieved. 'none' is equal toNULL- snapshot
Path to a local OpenAlex snapshot (either a root directory containing
parquet/, or theparquet/directory itself). When supplied, nodes are gathered offline from the snapshot instead of the OpenAlex API. Requires the indexes built byopenalexSnapshot::build_corpus_index()andbuild_citation_index(). DefaultNULL(use the API).- max_results
Snapshot mode only: refuse to expand a keypaper with more citing works than this. See
openalexSnapshot::get_citing().- workers
Number of parallel workers. Default
1(sequential).- chunk_limit
API mode only: ids per filter URL.
NULL(default) derives one fromworkers; seepro_snowball().- select
Snapshot mode only: node columns to keep. See
pro_snowball().- endpoint
API mode only: base URL of the OpenAlex API. See
pro_snowball().- duckdb_config
DuckDB settings for the assembly connection. See
snowball_duckdb_config().- resume
Keep an existing
outputand continue from where a previous run stopped, instead of deleting it. DefaultFALSE.- cleanup
Remove the intermediate
*_json/*_parquetdirectories once the nodes are assembled. DefaultTRUE.pro_snowball()passesFALSEand cleans up after edge extraction instead, so that a failure there is still resumable.- prepared
Internal.
TRUEmeans the caller has already created or cleanedoutputand this function must not delete it.- output
parquet dataset; default: temporary directory.
- verbose
Logical indicating whether to show a verbose information. Defaults to
FALSE