Basic Examples
Basic Examples
Retrieve the graph:
In[]:=
ResourceData["Online Social Network"]
Out[]=
Graph
Summary properties:
In[]:=
ResourceData["Online Social Network",All]["Summary"]
Out[]=
Name | Online Social Network |
VertexCount | 1899 |
EdgeCount | 20296 |
Description | Social network of an online community. |
ByteCount |
Basic Applications
Basic Applications
Find the person with the most sent and most received messages:
In[]:=
g=ResourceData["Online Social Network"];
In[]:=
{sender,receiver}={First[MaximalBy[VertexList[g],VertexOutDegree[g,#]&]],First[MaximalBy[VertexList[g],VertexInDegree[g,#]&]]}
Out[]=
{9,32}
Visualize the sender's connections within the receiver's neighborhood:
In[]:=
HighlightGraphNeighborhoodGraphg,receiver,,{Style[NeighborhoodGraph[g,sender],Yellow],Style[receiver,Red]},
Out[]=