network core

Influencer Impact Analysis on Large-Scale Social Graphs

Scénario de test & Cas d'usage

Business Context

A Marketing agency analyzes a massive social media dataset (Twitter/X style) to find 'Core Influencers'. Unlike simple follower counts, they want to find users who are followed by other well-connected users. Given the volume of data (millions of users), the analysis must be distributed and respect the direction of the relationship (Follower -> Followed).
Data Preparation

Simulating a social graph. 'Influencer_X' is the hub. 'Fan_Y' users follow the influencer but don't follow each other.

Copied!
1 
2DATA mycas.social_graph;
3LENGTH follower $20 followed $20;
4DO i=1 to 1000;
5follower=cats('Fan_', i);
6followed='Influencer_Top';
7OUTPUT;
8IF mod(i, 10)=0 THEN DO;
9followed=cats('Fan_', i-1);
10OUTPUT;
11END;
12END;
13 
14RUN;
15 

Étapes de réalisation

1
Run Directed Core Decomposition in Distributed mode to handle volume and directionality.
Copied!
1 
2PROC CAS;
3network.core / direction='DIRECTED' distributed=TRUE links={name='social_graph', from='follower', to='followed'} outNodes={name='influence_metrics', replace=true};
4 
5RUN;
6 
7QUIT;
8 
2
Verify the 'ProblemSummary' to ensure the graph was treated as directed and distributed.
Copied!
1 
2PROC CAS;
3TABLE.fetch / TABLE='influence_metrics' sortby={{name='core_out', order='DESCENDING'}} to=10;
4 
5RUN;
6 
7QUIT;
8 

Expected Result


The 'Influencer_Top' node should have a distinct core number reflecting its central position in the directed graph. The execution must succeed without memory errors due to the 'distributed=TRUE' parameter, and the results must differentiate between 'following' and 'being followed'.