Builds a sparse term-document matrix for a given profession, computes the
co-occurrence via Matrix::crossprod(), and extracts the top edges using
an igraph largest-component filter. This is the workhorse behind
cooc_all_professions().
Usage
.cooc_single(
professione,
data,
group_col = "preferredLabel",
top_n = 30L,
min_weight = 10L
)Arguments
- professione
Character scalar identifying the profession to filter on.
- data
A data.table with at least columns
general_id,escoskill_level_3, and the column named bygroup_col.- group_col
Character name of the column used to identify professions. Defaults to
"preferredLabel".- top_n
Integer maximum number of edges to retain (before largest-component filtering). Defaults to
30L.- min_weight
Integer minimum co-occurrence count. Edges below this threshold are dropped. Defaults to
10L.