Network Theory, Social Network Analysis, Community Detection, Yelp, R.
degree(network, mode = 'all') #graph user with max degrees sub_all <- subcomponent(network_s, which(all_degree == max(all_degree)), 'all') g_sub <- induced_subgraph(network_s, sub_all) #communities graph.com <- fastgreedy.community(as.undirected(g_sub)) V(g_sub)$color <- graph.com$membership + 1