R Tip of the Day
igraph is an R package used to create, visualize, and analyze networks.
It allows you to study relationships between observations instead of looking at each data point individually!
Use Cases:
Networks can be:
edges stores the relationship data.graph_from_data_frame() converts the data into a graph.vcount() counts the nodes.ecount() counts the connections.[1] 7
[1] 10
Degree centrality measures the number of direct connections each node has.
Betweenness centrality measures how frequently a node appears on shortest paths between other nodes.
layout_with_fr() is a layout algorithm in igraph that uses a force-directed approach to position connected nodes near one another.
Healthcare
Transportation
Social Media
igraph provides a way to move from raw relationship data to meaningful network analysis!