Qurak

Analyze social networks

Example 6 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
g = ExampleData[{"NetworkGraph", "ZacharyKarateClub"}]
Output
Graph[<34>, <78>]
Step 2
VertexCount[g]
Output
34
Step 3
EdgeCount[g]
Output
78
Step 4
With[{d = DegreeCentrality[g]}, Pick[VertexList[g], d, Max[d]]]
Output
{34}
Step 5
Part[VertexList[g], Reverse[Ordering[BetweennessCentrality[g]]][[ ;; 2]]]
Output
{1, 34}
Step 6
Pick[VertexList[g], DegreeCentrality[g], 0 | 1]
Output
{12}

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client