
Analyze Cumulative Network Groups Over Time
Source:R/sniff_groups_cumulative.R
sniff_groups_cumulative.Rd
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 leastnetwork
(atbl_graph
origraph
object whose vertices have attributesPY
,component
, andDE
), as well as auxiliary elements such aspubs_by_year
andaggregate
.- 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
} # }