| plot_user_network | R Documentation |
The network graph is constructed by putting users into close proximity based on their shared joined rooms.
plot_user_network( rooms, joined_threshold = 2, user_blacklist = NULL, shared_threshold = 2, show_labels = TRUE, label_threshold = 5, label_whitelist = NULL )
rooms |
Rooms object to use. See |
joined_threshold |
Minimum number of joined rooms for including a user. |
user_blacklist |
User IDs that should be excluded. |
shared_threshold |
Minimum number of shared rooms for including a connection between two users. The default value is 2 to accomodate the fact, that all users share a room with the user doing the request. |
show_labels |
Whether to show labels. This parameter does not apply to
the users on the |
label_threshold |
Minimum number of joined rooms for labeling a user. |
label_whitelist |
User IDs that should be labeled. |
An igraph object for plotting. See igraph::igraph.plotting for
information on tweaking the visuals.
# Retrieve some rooms (in this case all joined rooms): initial_sync <- sync() rooms <- get_rooms( all_rooms(initial_sync), since = lubridate::today(), initial_sync ) # Create the network graph: graph <- plot_user_network(rooms) # Plot the graph tweaking some of the visuals: plot( graph, edge.color = "#BBBBBB1A", vertex.frame.color = NA, vertex.color = "#303030AA" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.