How aathi-11/sna_case_study works
This repository is a football passing-network research and scouting application built around StatsBomb match events. Its main workflow prepares and truncates match data, builds directed player-passing graphs, computes team/player metrics and communities, then supports comparisons, visualizations and opposition reports. A separate dashboard path exports processed datasets to JSON for browser-based exploration. The README documents the analytical stages and capabilities; sampled code confirms several implementations, but not every connection between analysis modules or the dashboard frontend’s data loading.
Main entry points: graphs.py Passing graphs · metrics.py Network metrics · communities.py Community detection · export_dashboard_data.py Dashboard export
Components 17
Data preparation
- Event preparation
src/data_prep.py - Cached match data
data/raw - Processed datasets
data/processed
Network analysis
- Passing graphs
src/graphs.py - Network metrics
src/metrics.py - Community detection
src/communities.py
Research extensions
- Statistical comparisons
src/comparisons.py - Block modeling
src/blockmodeling.py - Weak-tie analysis
src/weak_ties.py - Pitch visualizations
src/plots.py
Scouting outputs
- Scouting reports
src/scouting.py
Interactive dashboard
- Dashboard export
src/export_dashboard_data.py - Dashboard launcher
run_dashboard.py - Local web server
run_dashboard.py - Interactive dashboard
dashboard/app.js - Dashboard JSON
dashboard/data/dashboard_data.json
Other components
- StatsBomb data
Connections 20
- StatsBomb data → Event preparation: supplies events
README.md - Event preparation → Cached match data: caches data
README.md - Cached match data → Passing graphs: builds from
README.md - Passing graphs → Network metrics: supports metrics
README.md - Passing graphs → Community detection: supports detection
README.md - Network metrics → Statistical comparisons: feeds comparisons
README.md - Community detection → Weak-tie analysis: classifies passes
src/weak_ties.py - Passing graphs → Weak-tie analysis: builds team graph
src/weak_ties.py - Passing graphs → Pitch visualizations: builds team graph
src/plots.py - Community detection → Pitch visualizations: colors communities
src/plots.py - Network metrics → Pitch visualizations: measures fragility
src/plots.py - Passing graphs → Scouting reports: builds team graph
src/scouting.py - Network metrics → Scouting reports: measures vulnerability
src/scouting.py - Community detection → Scouting reports: summarizes structure
src/scouting.py - Processed datasets → Dashboard export: aggregates datasets
src/export_dashboard_data.py - Dashboard export → Dashboard JSON: writes JSON
src/export_dashboard_data.py - Dashboard launcher → Dashboard export: runs if missing
run_dashboard.py - Dashboard launcher → Local web server: starts server
run_dashboard.py - Local web server → Interactive dashboard: serves dashboard
run_dashboard.py - Interactive dashboard → Dashboard JSON: loads data