Automated data pipeline that fetches repository data from the GitHub API and generates data visualizations.
- Automated ETL pipeline for GitHub repository data
- Theme-able dark dashboard (see Themes below)
- Fork-excluded portfolio view — only your own work is counted
- Lifecycle classification (Live / In progress / Stub / Archived)
- Language composition treemap
- Cumulative repository growth
- Star leaderboard and portfolio composition breakdown
github-analytics-dashboard/
├── src/
│ ├── config.py # Environment configuration
│ ├── palettes.py # Theme color definitions
│ ├── extract.py # GitHub API data extraction
│ ├── transform.py # Data processing and enrichment
│ └── main.py # Pipeline orchestration
├── assets/
│ └── dashboard.py # Visualization generation
├── data/ # Generated outputs
├── notebooks/ # Data exploration
└── requirements.txt # Python dependencies
- Clone the repository
git clone <repository-url>
cd github-analytics-dashboard- Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Configure environment variables
Create a .env file in the project root:
GITHUB_TOKEN=your_personal_access_token
USERNAME=your_github_usernameTo generate a GitHub token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Create a token with
reposcope for private repositories - Copy the token to your
.envfile
cd src
python main.pyThe pipeline will:
- Fetch all repositories from your GitHub account
- Process and enrich the data with calculated metrics
- Generate visualizations and save outputs to
data/
data/github_repos_clean.csv- Processed repository datadata/github_dashboard.svg- Analytics dashboard visualization
The pipeline calculates:
- Total repositories and active status (forks excluded — see below)
- Star and language counts
- Repository size and age
- Days since last push
- Lifecycle stage (see below)
transform.py drops any repository where GitHub's API reports fork: true
before computing metrics. The dashboard is meant to report on your own work,
not repos you cloned from someone else. This means the total repo count (and
every percentage derived from it) reflects "your portfolio minus forks," not
your full GitHub account.
Each repo is assigned a stage, in this order:
| Stage | Rule |
|---|---|
| Archived | archived flag set on GitHub |
| Live | pushed to within the last 90 days |
| In progress | last push between 90 and 365 days ago |
| Stub | last push over a year ago |
This is purely activity-based (recency of the last push) rather than a
quality/maturity judgment — a repo you consider "done" still shows as Stub
once it's been quiet for a year, and that's intentional: the dashboard is
reporting on activity, not grading your repos. Adjust the day thresholds in
transform.py's lifecycle() if your own definition of "stale" differs.
description, topics, and has_license are still extracted per repo in
transform.py if you want to build your own quality signal on top of them.
The language treemap excludes HTML, CSS, and JavaScript by default —
these tend to be a side effect of a repo (a docs page, a build config) rather
than its primary language, and can crowd out what the repo is actually
written in. To include them again, open assets/dashboard.py and comment out
(or clear) FILTERED_LANGS:
# FILTERED_LANGS = {"HTML", "CSS", "JavaScript"}
FILTERED_LANGS = set()Set DASHBOARD_THEME to switch the dashboard's color palette. Three themes
ship today, more are planned, and a theme builder (pick colors, preview live)
is on the roadmap.
DASHBOARD_THEME=lab python src/main.pydivergence (default) |
lab |
github |
|---|---|---|
| Amber / auburn, warm and high-contrast | Petrol base with green/amber/auburn accents | GitHub's native dark palette |
To add your own theme, add a block to the THEMES dict in src/palettes.py
(copy an existing one and change the hex values) — it becomes selectable via
DASHBOARD_THEME=<your-key> immediately, no other code changes needed.
MIT License
This repository includes a GitHub Action that automatically updates the dashboard daily at midnight UTC.
Manual Trigger: Go to Actions tab → "Update GitHub Analytics Dashboard" → Run workflow
Schedule: Daily at 00:00 UTC (configurable in .github/workflows/update-dashboard.yml)
Theme: Set a repository variable named DASHBOARD_THEME (Settings → Secrets and variables → Actions → Variables) to divergence, lab, or github to control the theme without a commit. Defaults to divergence if unset.
To display this dashboard in your GitHub profile README:
- Make sure this repository is public
- Enable GitHub Actions in repository settings
- Add to your profile README (replace
YOUR_USERNAMEandREPO_NAME):
The dashboard will automatically update daily via GitHub Actions.