Skip to content

Commit bcd8962

Browse files
quantbaiclaude
andcommitted
viz: interactive D3 sunburst + heatmap site on GitHub Pages
Adds an interactive single-page visualization for the v1.0 classification, hosted at https://quantbai.github.io/crypto-sectors/. Pure vanilla JS + D3 v7 from jsdelivr CDN; no framework, no build step, no node_modules. Components - Hero sunburst (3 rings: class / sector / sub-sector) with drill-in to individual asset wedges; weighted by asset count with 1.5° minimum wedge floor; Overview ↔ Zoomed state machine with breadcrumb - Asset detail card (sticky sidebar, slide-up sheet on mobile with 44×44 close button) - Chain × sector matrix heatmap with neutral luminance ramp via color-mix(in oklch); bidirectional highlight with sunburst - Search with 120ms debounce, live sunburst dimming during typing, global / shortcut - Validation KPI footer pulling from data/validation.json (sector spread, 19/19 rolling stability, E5 chain-vs-sector finding) Design system - DESIGN.md (635 lines) — canonical visual spec drafted by UX design lead, dual-reviewed by Linear-style designer + Bloomberg-style quant-viz engineer; all 8 dual-review P0s baked in - Phosphor cyan hsl(186 70% 58%) accent (avoids class 40 sage collision) - Geist Sans + Geist Mono variable woff2 (~140KB total) - Dark mode only; light mode deferred to v1.1 - 4 class colors at 78° hue intervals, colorblind-safe - WCAG AA throughout, AAA on main text (17:1 contrast) - Focus ring: 2px outline + 4px halo per WCAG 2.4.13 Data pipeline - scripts/build_viz_data.py compiles taxonomy.yaml + snapshot.csv + validation/numbers.json into docs/data/{taxonomy,validation}.json - taxonomy.json: 9.7KB gzipped (well under 30KB budget) - Total page weight: 221KB raw / 30KB gzipped excluding D3 CDN Deployment - .github/workflows/pages.yml auto-deploys on push to main; includes stale-data check (fails CI if docs/data/ not regenerated after snapshot/taxonomy/numbers change) Multi-agent build process (1 lead + 6 specialist subagents) - UX design lead: drafted DESIGN.md - Linear-style designer + Bloomberg-style quant-viz engineer: dual reviewed DESIGN.md, produced DESIGN-AMENDMENTS.md (8 P0) - QD-E (quant-infra-architect): built scripts/build_viz_data.py + docs/* + pages.yml from DESIGN.md + amendments + tech spec - Visual designer + accessibility specialist: dual reviewed live rendering via gstack:browse, caught init crash showstopper - QD-F (quant-infra-architect): fixed 4 P0 (D3 dead chain, init cascade, IIFE error fence, hero meta counters) + 6 P1 (dead anchor, scoped scroll-margin, aria pluralization, SVG focus, mobile bottom sheet, scrollIntoView guard); local verified 62 sunburst wedges, full 14×10 heatmap, zero console errors Hero counter polish: shows n_active_sub_sectors (33) instead of taxonomy total (44 includes deprecated_slots + extension reserves) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 36844b6 commit bcd8962

11 files changed

Lines changed: 8460 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'taxonomy.yaml'
9+
- 'classification/snapshot.csv'
10+
- 'validation/numbers.json'
11+
- 'scripts/build_viz_data.py'
12+
- '.github/workflows/pages.yml'
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
cache: 'pip'
34+
35+
- name: Install dependencies
36+
run: pip install -r requirements.txt
37+
38+
- name: Regenerate viz data
39+
run: python scripts/build_viz_data.py
40+
41+
- name: Verify docs/data not stale
42+
run: |
43+
if [ -n "$(git status --porcelain docs/data/)" ]; then
44+
echo "ERROR: docs/data/ is stale — run scripts/build_viz_data.py and commit."
45+
git diff docs/data/
46+
exit 1
47+
fi
48+
49+
- uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/
52+
53+
deploy:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
steps:
60+
- id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ plans/
2929
# that consumers download directly without cloning + running scripts.
3030
# Re-generated on every release by scripts/build_matrices.py and
3131
# scripts/compute_validation.py; CI asserts they stay in sync.
32+
.gstack/

DESIGN.md

Lines changed: 635 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[![License: MIT](https://img.shields.io/badge/Code-MIT-blue.svg)](LICENSE)
77
[![License: CC BY 4.0](https://img.shields.io/badge/Data-CC%20BY%204.0-lightgrey.svg)](LICENSE-data)
88

9+
**[Live demo](https://quantbai.github.io/crypto-sectors/)** — interactive sunburst, search, asset cards
10+
911
A community-maintained, hierarchical industry classification for digital assets. Designed for cross-sectional risk decomposition, sector-neutral portfolio construction, and peer-group analysis. The hierarchy is informed by established institutional classification methodologies — see [methodology.md](methodology.md) for citations.
1012

1113
---

0 commit comments

Comments
 (0)