Skip to contents

Turns a sniff_trajectory_braid() object into the data a trajectory confluence needs: one rivers row per trajectory (with a per-year size curve) and one confluences row per child to parent merge edge (papers transferred, the first year a transferred paper was published, the handoff year, and the cumulative-inflow curve). Every edge of the flow tree is kept; thresholds are applied later by plot_trajectory_confluence(), so a slider can re-filter without recomputing.

Usage

sniff_trajectory_confluence(
  x,
  min_group_size = 10,
  jaccard_min = 0.05,
  k_out = 2
)

Arguments

x

A sniff_trajectory_braid() object, or a docs_per_group tibble / sniff_groups_lineage() object / sniff_trajectory_dag() object (the flow is built internally).

min_group_size, jaccard_min, k_out

Passed to sniff_trajectory_braid() when x is not already a flow object.

Value

A list with:

rivers

Tibble, one row per trajectory: traj_id, type ("central"/"absorbed"), central (destination group cNgN), size, start, handoff_year (= last_year for centrals, else absorption year), depth, parent (absorber traj_id, NA for central), and size_curve (list-col of tibble(year, size), the trajectory's community size per year).

confluences

Tibble, one row per child to parent merge: child, parent, n (papers transferred), cohort_size (the child's size), first_feed_year (publication year of the first transferred paper), handoff_year, and inflow_curve (list-col of tibble(year, size)).

destinations

Tibble, one row per (absorbed trajectory, final group) it fed: traj_id, g_final, n (papers of the trajectory's terminal cohort that ended up in g_final). A trajectory usually appears under several finals, so this is the multi-destination split the forest collapses to one.

centrals

The central group ids (cNgN) in mixed_sort() order.

last_year

Final year of the analysis.