Skip to contents

Visualise international or institutional collaboration patterns.

Usage

sm_plot_collab(
  corpus,
  level = c("country", "institution", "author"),
  top_n = 20L,
  dark = FALSE,
  precompute = FALSE,
  max_nodes = NULL,
  ...
)

Arguments

corpus

An sm_corpus.

level

Collaboration level.

top_n

Number of top entities to include.

dark

Logical; dark mode?

precompute

Logical (default FALSE). When TRUE, return a plain ggplot with the layout computed eagerly (see sm_plot_citation_network() for why this matters when knitting large graphs).

max_nodes

Optional integer node cap. NULL (default) keeps all nodes; set it to downsample large graphs to the highest-degree nodes (opt-in, with a cli message).

...

Additional arguments.

Value

A ggplot object (ggraph when precompute = FALSE, plain ggplot when precompute = TRUE).

Examples

corpus <- sm_example_corpus()
sm_plot_collab(corpus, level = "country")