These functions offer ways to measure the heterogeneity of an attribute across a network, within groups of a network, or the distribution of ties across this attribute:
node_by_richness() measures the number of unique categories
of an attribute to which each node is connected.
node_by_diversity() measures the heterogeneity of each node's
local neighbourhood.
node_by_richness(.data, attribute)
node_by_diversity(
.data,
attribute,
diversity = c("blau", "teachman", "variation", "gini")
)A network object of class mnet, igraph, tbl_graph, network, or similar.
For more information on the standard coercion possible,
see manynet::as_tidygraph().
Name of a nodal attribute, mark, measure, or membership vector.
Which method to use for *_diversity().
Either "blau" (Blau's index) or "teachman" (Teachman's index) for categorical attributes,
or "variation" (coefficient of variation) or "gini" (Gini coefficient) for numeric attributes.
Default is "blau".
If an incompatible method is chosen for the attribute type,
a suitable alternative will be used instead with a message.
A node_measure numeric vector the length of the nodes in the network,
providing the scores for each node.
If the network is labelled,
then the scores will be labelled with the nodes' names.
Other diversity:
measure_assort_net,
measure_assort_node,
measure_diverse_net
Other measures:
measure_assort_net,
measure_assort_node,
measure_breadth,
measure_broker_node,
measure_broker_tie,
measure_brokerage,
measure_central_between,
measure_central_close,
measure_central_degree,
measure_central_eigen,
measure_centralisation_between,
measure_centralisation_close,
measure_centralisation_degree,
measure_centralisation_eigen,
measure_centralities_between,
measure_centralities_close,
measure_centralities_degree,
measure_centralities_eigen,
measure_closure,
measure_closure_node,
measure_cohesion,
measure_core,
measure_diffusion_infection,
measure_diffusion_net,
measure_diffusion_node,
measure_diverse_net,
measure_features,
measure_fragmentation,
measure_hierarchy,
measure_periods
Other nodal:
mark_core,
mark_degree,
mark_diff,
mark_nodes,
mark_select_node,
measure_assort_node,
measure_broker_node,
measure_brokerage,
measure_central_between,
measure_central_close,
measure_central_degree,
measure_central_eigen,
measure_closure_node,
measure_core,
measure_diffusion_node,
member_brokerage,
member_cliques,
member_community,
member_community_hier,
member_community_non,
member_components,
member_core,
member_diffusion,
member_equivalence,
motif_brokerage_node,
motif_exposure,
motif_node,
motif_path
node_by_richness(ison_networkers, "Discipline")
#> ▂▃▁▅
#> `Lin Freeman` `Doug White` `Ev Rogers` `Richard Alba` `Phipps Arabie`
#> 1 4 4 2 4 4
#> # ... and 27 more values from this nodeset. Use `print_all(...)` to print all values.
marvel_friends <- to_unsigned(to_uniplex(fict_marvel, "relationship"), "positive")
node_by_diversity(marvel_friends, "Gender")
#> ▃▁▁▃▂
#> Abomination `Ant-Man` Apocalypse Beast `Black Panther` `Black Widow` Blade
#> 1 0 0.48 0 0.363 0.34 0.337 0
#> # ... and 46 more values from this nodeset. Use `print_all(...)` to print all values.
node_by_diversity(marvel_friends, "Attractive")
#> ▂▄▂▂▁▁▁▁▁
#> Abomination `Ant-Man` Apocalypse Beast `Black Panther` `Black Widow` Blade
#> 1 NA 0.559 NaN 0.332 0.316 0.288 0
#> # ... and 46 more values from this nodeset. Use `print_all(...)` to print all values.