Interactive visualization of NBA player teammate relationships (1946-2026) using network graph analysis. Built with Next.js 16, Sigma.js, Graphology, and Python data pipeline.
| Layer | Technologies |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript 5.x |
| Graph rendering | Sigma.js 3.x, Graphology |
| Data pipeline | Python 3.12+, NetworkX, NumPy, uv |
| Testing | Jest, Pytest, Playwright |
| CI/CD | GitHub Actions |
Prerequisites: Node.js 20+, Python 3.12+, uv
# Install dependencies
npm install
uv sync
# Start development server
npm run dev# Build for production (static export)
npm run buildOutput is written to out/ for deployment to Vercel/Netlify.
src/app/ → Next.js pages (static export)
src/components/ → React components (graph, filters, search, tooltips)
src/lib/ → Graph data loading, types, performance utilities
src/config/ → Team colors configuration
scripts/ → Python data pipeline scripts
tests/ → JS unit tests, Python tests, E2E tests
schemas/ → JSON validation schemas (nodes, edges)
data/ → Generated JSON data files
db/ → SQLite source database
Scripts run in sequence to generate the graph data:
extract_teammates— Parse raw data into teammate relationshipsbuild_graph— Construct graph structure from relationshipscompute_metrics— Calculate centrality and graph metricscompute_layout— Generate node positions and community colorsexport_json— Export to frontend-compatible formatvalidate_json_schema— Validate against schemas
# Run individual scripts
uv run python scripts/extract_teammates.py
uv run python scripts/build_graph.py
uv run python scripts/compute_metrics.py
uv run python scripts/compute_layout.py
uv run python scripts/export_json.py
uv run python scripts/validate_json_schema.py| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build static export |
npm run start |
Start production server |
npm run lint |
Lint TypeScript/JavaScript |
npm run lint:py |
Lint Python with Ruff |
npm run format |
Format code with Prettier |
npm run format:py |
Format Python with Ruff |
npm run test:js |
Run Jest tests |
npm run test:py |
Run Pytest tests |
npm run test:e2e |
Run Playwright E2E tests |
npm run typecheck |
Run TypeScript compiler check |
Uses npm for the frontend app and uv for the Python data pipeline. Both have lockfiles (package-lock.json, uv.lock).
MIT