Skip to contents

The birddog stock map: every paper in the cumulative network is a point, laid out by a force-directed layout of the citation network and coloured by its final group, with a text label at each group's centroid. It is the stock snapshot – all final groups, the whole network at once – positioned by citation structure rather than text embeddings.

Usage

plot_groups_map(
  groups_cumulative,
  labels_text = NULL,
  network_until = NULL,
  layout = "drl",
  seed = 888L,
  point_size = 0.9,
  point_alpha = 0.7,
  show_unassigned = TRUE,
  label = TRUE,
  label_size = 3.2,
  title = "Group map",
  title_size = 14,
  normalize = FALSE,
  normalize_q = 0.99
)

Arguments

groups_cumulative

A stock object from sniff_groups_cumulative(); each network_until_<year> element must carry $network (an igraph/tbl_graph whose vertices have a name attribute) and $documents (with columns name, group).

labels_text

Optional data.frame with columns id (matching the group ids, e.g. "c1g1") and text (the human description). NULL (default) uses the bare group id as the label. If no id matches any group, a warning is issued and the group ids are used.

network_until

Snapshot year to map. NULL (default) uses the last element (the final groups).

layout

Force-directed layout passed to ggraph::create_layout() (default "drl", the OpenOrd layout, which separates communities into legible territories on dense citation networks; "fr" and "kk" tend to collapse a large network into a single hairball).

seed

Integer seed for the stochastic layout (default 888L).

point_size

Node point size (default 0.9).

point_alpha

Node point alpha (default 0.7).

show_unassigned

Draw nodes with no group (NA) as grey background (default TRUE); FALSE drops them.

label

Draw the group text labels at centroids (default TRUE).

label_size

Font size of the centroid labels (default 3.2).

title

Plot title: the default "Group map", any string, or NULL for no title.

title_size

Title font size (default 14).

normalize

Rescale the layout for cross-year comparison (default FALSE). When TRUE, coordinates are centred on the median and divided by the robust radius (the normalize_q quantile of the distance to the centre), then framed with a fixed unit window, so the dense core fills the plot identically across snapshots. This equalises scale only, not orientation: the force-directed layout assigns each graph an arbitrary rotation, so node positions are not correspondable across years.

normalize_q

Quantile of the radial distance kept inside the normalised window (default 0.99); only used when normalize = TRUE.

Value

A ggplot object.