The code behind https://developmentseed.org/contributor-network.
This visual is derived from the excellent ORCA top-contributor-network by Nadieh Bremer.
- uv for Python package management
- A GitHub personal access token with
public_reposcope
python -m http.server 8000Then open http://localhost:8000/ (the root index.html)
All commands are run via uv run contributor-network <command>.
List all configured contributors by category:
uv run contributor-network list-contributorsFind new repositories that DevSeed employees contribute to:
export GITHUB_TOKEN="your_token_here"
uv run contributor-network discover --min-contributors 2 --limit 50This queries GitHub to find repos where multiple DevSeed employees have contributed, which are not yet in the configuration.
Fetch contribution data from GitHub for all configured repositories:
export GITHUB_TOKEN="your_token_here"
uv run contributor-network assets/data assets/dataOptions:
--all-contributors: Include alumni/friends (not just current DevSeed employees)
Generate CSV files from the fetched JSON data:
uv run contributor-network csvs assets/dataBuild the static site to the dist/ folder:
uv run contributor-network build assets/data distTo update the visualization with new data:
# 1. Set your GitHub token
export GITHUB_TOKEN="your_token_here"
# 2. (Optional) Discover new repos to add
uv run contributor-network discover --min-contributors 2
# 3. Edit config.toml to add/remove repos or contributors
# 4. Fetch data from GitHub
uv run contributor-network assets/data assets/data
# 5. Generate CSVs
uv run contributor-network csvs assets/data
# 6. Build the site
uv run contributor-network build assets/data dist
# 7. Preview locally
cd dist && python -m http.server 8000Edit config.toml to configure:
- repositories: List of GitHub repos to track (format:
"owner/repo") - contributors.devseed: Current DevSeed employees (format:
github_username = "Display Name") - contributors.alumni: Friends and alumni (commented out by default)
The visualization code is organized into modular ES6 modules in src/js/:
src/js/
├── config/ # Configuration (theme, scales)
├── data/ # Data filtering and utilities
├── interaction/ # Mouse hover and click handling
├── layout/ # Canvas sizing and layout
├── render/ # Drawing functions (shapes, text, labels)
├── simulations/ # D3 force simulations
├── state/ # State management
├── utils/ # Utilities (helpers, validation, formatters, debug)
└── __tests__/ # Unit tests
The main entry point is index.js which:
- Loads dependencies (D3, etc.)
- Imports all modular components
- Exports
createContributorNetworkVisualfunction
The visualization is used in dist/index.html to render the interactive network.
npm testTests use Vitest and cover filtering, validation, and utility functions.
When modifying the visualization:
- Edit files in
src/js/ - Changes are immediately available in the browser (no build step needed)
- Refresh
http://localhost:8000/to see updates - Run
npm testto verify changes don't break tests
uv sync
uv run ruff check --fix
uv run ruff format
uv run pytestWe use workflow dispatch to rebuild the source data manually.
This visualization uses the Development Seed brand colors:
- Grenadier (#CF3F02): Primary orange accent
- Aquamarine (#2E86AB): Secondary blue
- Base (#443F3F): Text color
This work was copied-and-modified from https://github.com/nbremer/ORCA and is licensed under the same (MPL).
