Build a knowledge graph
build_kgraph(
selected_concepts,
df_weights,
df_dict = NULL,
rm_single_groups = TRUE,
df_sup_nodes = NULL,
display_val_digits = 3,
display_val_str = "\nCosine similarity: ",
str_other = "Other",
highlight_mult = TRUE,
multiline_labs = TRUE,
autoscale = TRUE,
spring_weights = TRUE,
n_max_edges = 1000,
...
)Knowledge graph, list of slots df_nodes and df_links
Concepts of interest
Data frame with columns concept1, concept2, and weight; typically the df_projs slot of the object returned by function fit_embeds_to_pairs
Dictionary data frame, with columns id (matched to concepts in df_weights), desc (for labels), color, and optionally group.
Should groups with only one element be removed
Data frame of supplementary nodes (work in progress)
Number of weight digits to be displayed in labels
String to prefix to the displayed value
String to use for missing groups
Highlight nodes connected to multiple nodes of interest.
Use multiline labels (shown when hovered on)
Perform scaling with sgraph::scale_graph
Use spring weights (reverts edges weights)
Threshold on number of edges
Passed to scale_kgraph