Skip to content

Instantly share code, notes, and snippets.

@amitbhsingh
Last active May 8, 2018 18:41
Show Gist options
  • Save amitbhsingh/04bbc9dd369334c47d89c53f9cca67d3 to your computer and use it in GitHub Desktop.
Save amitbhsingh/04bbc9dd369334c47d89c53f9cca67d3 to your computer and use it in GitHub Desktop.
Network Science
library(readr)
library(igraph)
library(ggplot2)
library(ggraph)
nodes<-read_csv("nodes>csv")
List of commands (V,vcount,graph_from_data_frame,E,ecount)
# visualize the network with grid layout. Set tie transparency proportional to its weight
ggraph(g, layout = "grid") +
geom_edge_link(aes(alpha =weight)) +
geom_node_point()
# Node Centrality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment