Social Network Analytics
Analyze social network dynamics — trending content, user influence, viral propagation, and engagement metrics — in a unified platform. Materialized views with three refresh modes (PERIODIC for trending dashboards, INCREMENTAL for post counts on commit, and MANUAL for on-demand influence scores) pre-compute key analytics, graph traversal powers viral spread chain analysis and community overlap detection, time-series tracking captures engagement metrics as historical snapshots, and polyglot query support lets you use SQL for views and aggregations alongside OpenCypher for graph traversals.
Architecture Overview
Vertices |
|
Edges |
|
Documents |
|
Users create and interact with posts, follow each other, and belong to groups. Engagement metrics are captured as time-series snapshots. Materialized views pre-compute trending scores, post counts, and influence rankings.
Key Queries
Trending Content Dashboard — Aggregate engagement into trending scores (via PERIODIC materialized view):
SELECT postId, SUM(likes + shares * 2 + comments * 3) AS trendingScore
FROM EngagementMetric
WHERE timestamp > date('2024-01-15', 'yyyy-MM-dd')
GROUP BY postId ORDER BY trendingScore DESC
Viral Spread Chain — Trace how content propagates through the network:
MATCH path = (origin:User)-[:CREATED]->(p:Post)<-[:SHARED]-(sharer:User)-[:FOLLOWS]->(reached:User)
WHERE origin.name = 'Alice'
RETURN origin.name, sharer.name, reached.name, p.title
Community Overlap — Find users active in multiple groups:
MATCH (u:User)-[:MEMBER_OF]->(g1:Group), (u)-[:MEMBER_OF]->(g2:Group)
WHERE g1 <> g2
RETURN u.name, g1.name, g2.name
Try It Yourself
git clone https://github.com/ArcadeData/arcadedb-usecases.git
cd arcadedb-usecases/social-network-analytics
docker compose up -d
./setup.sh
./queries/queries.sh
Full source: social-network-analytics on GitHub
Related Documentation
-
PageRank — Rank user influence in the network
-
Louvain Community Detection — Discover user communities
-
Betweenness Centrality — Identify bridge users connecting communities
-
Label Propagation — Fast community assignment