View source: R/community_labels.R
community_labels | R Documentation |
community_labels( graph, biggest_community = FALSE, community_threshold = 0.01, community_name_column = "Community_name", community_size_column = "Size_com" )
graph |
A tidygraph object. |
biggest_community |
If true, you have the possibility to remove the smallest community, depending of the |
community_threshold |
If |
community_name_column |
Name of the column with the name of the community to be used as label |
community_size_column |
Name of the column with the total number of nodes or the share of nodes in each community. |
A simple function to calculate the mean of coordinates x and y for each community. These coordinates are to be used to plot the name of the community on the graph visualisation.
You have to run this function only after having calculating (x,y) coordinates for your nodes.
A data.frame with the list of your communities names (only the biggest one if biggest_community
set to TRUE
) and a pair of coordinates to project these names on your visualisation. It also
keeps the color of the community and its size.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.