Skip to contents

Performs cumulative community detection on a network over specified time spans, returning group statistics and keyword analysis for each time period.

Usage

sniff_groups_cumulative(
  groups,
  time_span = 2000:2024,
  min_group_size = 10,
  top_n_keywords = 10,
  algorithm = "fast_greedy"
)

Arguments

groups

A list created by sniff_groups() containing at least network (a tbl_graph or igraph object whose vertices have attributes PY, component, and DE), as well as auxiliary elements such as pubs_by_year and aggregate.

time_span

Numeric vector of years to analyze (default: 2000:2024).

min_group_size

Minimum size for a cluster to be retained (default = 10).

top_n_keywords

Number of top keywords to extract per group (default = 10).

algorithm

Community detection algorithm to use. One of: "louvain", "walktrap", "edge_betweenness", "fast_greedy" (default), or "leiden".

Value

A named list (by year) where each element contains:

groups

A tibble with group statistics and top keywords

documents

A tibble mapping documents to groups

network

The cumulative network up to that year

Examples

if (FALSE) { # \dontrun{
# Typical pipeline:
data  <- read_wos("savedrecs.txt")
net   <- sniff_network(data)
comps <- sniff_components(net)
groups <- sniff_groups(comps)

# Cumulative analysis
groups_cumulative <- sniff_groups_cumulative(
  groups,
  time_span = 2010:2020,
  algorithm = "leiden"
)

# Access results for 2015
groups_cumulative[["network_until_2015"]]$groups
} # }