The VA Design System metrics dashboard displays usage and health metrics for the design system. The data flows through multiple repositories and processes to create a comprehensive view of system adoption and performance.
┌─────────────────────┐ ┌──────────────────────┐ ┌────────────────────────┐
│ component-library │ │ vets-design-system- │ │ design.va.gov │
│ repo │───▶│ documentation │───▶│ (metrics dashboard) │
│ │ │ repo │ │ │
└─────────────────────┘ └──────────────────────┘ └────────────────────────┘
│ │ │
▼ ▼ ▼
ds-components-*.csv JSON metrics files HTML + Charts
(component usage) (processed data) (final dashboard)
Source Repository: component-library
Location: packages/design-system-dashboard-cli/output/ds-components-*.csv
What it contains: Usage counts for each VA design system component across all VA applications
- Generation: CSV files are generated in the component-library repo using their dashboard CLI
- Transfer: GitHub Actions workflow fetches the latest CSV from component-library repo
- Processing:
scripts/process-ds-components.jsconverts CSV to JSON - Output: Creates
component-usage.jsonin both locations:/src/assets/data/metrics/(for JavaScript charts)/src/_data/metrics/(for Jekyll Liquid templates)
date,component_name,uswds,static_content_templates,yellow_ribbon_schools,...[123 VA applications]
2025-09-04,VaAlert,0,2,0,5,12,...
2025-09-04,VaButton,0,8,2,15,25,...
{
"top_components_overall": [
{
"name": "VaModal",
"usage_count": 316,
"totalUsage": 316,
"applicationBreakdown": { "appointments": 5, "travel_pay": 0, ... }
}
],
"summary_stats": {
"total_components": 50,
"total_usages": 2404,
"most_used": "VaModal",
"applications_tracked": 123
},
"data_source": "component-library/ds-components",
"report_date": "2025-09-04"
}Source: GitHub Issues API for this repository
Script: scripts/collect-issue-metrics.js
Frequency: Weekly via GitHub Actions
- GitHub API: Fetches all issues using
ghCLI tool - Processing: Groups issues by quarterly and monthly periods
- Calculations: Computes resolution times, trend indicators
- Output: Creates
issue-metrics.jsonin both locations
{
"quarterly": [
{ "period": "2025-Q3", "issues_opened": 352, "issues_closed": 333 }
],
"velocity": [
{ "period": "2025-09", "issues_opened": 28 }
],
"experimental_quarterly": [
{ "period": "2025-Q3", "issues_opened": 4, "issues_closed": 12, "issues_implemented": 1 }
],
"summary": {
"open_issues": 472,
"closed_this_month": 25,
"avg_resolution_days": 123,
"open_issues_trend": { "direction": "up", "percentage": 8 }
}
}Source: GitHub Issues with experimental_design label
Script: scripts/collect-experimental-metrics.js
Frequency: Weekly via GitHub Actions
- Filtered Query: Only issues with
experimental_designlabel - Quarterly Grouping: Groups by quarters to track design evolution
- Implementation Tracking: Tracks which experimental designs become official
- Output: Creates
experimental-metrics.jsonin both locations
- Component Library CSV:
component-library/packages/design-system-dashboard-cli/output/ds-components-*.csv - GitHub Issues: Fetched via API calls to this repository
Each JSON file exists in TWO locations:
/src/assets/data/metrics/issue-metrics.json/src/assets/data/metrics/component-usage.json/src/assets/data/metrics/experimental-metrics.json
/src/_data/metrics/issue-metrics.json/src/_data/metrics/component-usage.json/src/_data/metrics/experimental-metrics.json
/src/_data/metrics/ds-components-latest.csv/src/_data/metrics/ds-components-YYYY-MM-DD.csv
- Purpose: Converts CSV component usage data to JSON
- Input: CSV files from component-library repo
- Processing:
- Parses CSV with 123+ application columns
- Aggregates usage counts per component
- Calculates summary statistics
- Generates trend indicators
- Output:
component-usage.json(both locations)
- Purpose: Collects GitHub issue metrics
- Input: GitHub Issues API data
- Processing:
- Groups issues by quarter and month
- Calculates resolution time averages
- Generates trend comparisons
- Output:
issue-metrics.json(both locations)
- Purpose: Tracks experimental design issue lifecycle
- Input: GitHub Issues with
experimental_designlabel - Processing:
- Filters experimental design issues
- Tracks implementation status
- Groups by quarterly periods
- Output:
experimental-metrics.json(both locations)
- Purpose: Analyzes open GitHub issues by component labels
- Input: GitHub Issues API data (open issues only)
- Processing:
- Categorizes issues by component labels
- Counts bug issues per component
- Tracks accessibility defects by severity (0=Critical, 1=Serious, 2=Moderate, 3=Minor, 4=Enhancement)
- When an issue has multiple a11y-defect labels, counts only the most severe
- Generates markdown report with sortable tables and quick links
- Output:
component-issues-report.mdin/src/_data/metrics/ - Usage:
yarn analyze-issuesornode scripts/analyze_issues.js - Requirements:
- GitHub CLI (
gh) installed and authenticated (gh auth login) - Internet connection for API calls
- GitHub CLI (
Schedule: Weekly on Fridays at 6 PM UTC (2 PM ET/1 PM EDT) Trigger: Also runs on manual dispatch and workflow file changes
- Setup: Node.js, GitHub CLI authentication
- Fetch CSV: Clone component-library repo, find latest ds-components CSV
- Process CSV: Run
scripts/process-ds-components.js - Collect Issues: Run
scripts/collect-issue-metrics.js - Collect Experimental: Run
scripts/collect-experimental-metrics.js - Verify: Check all JSON files exist in both locations
- Commit: Auto-commit updated metrics data
- Deploy: Changes auto-deploy to design.va.gov
Location: /src/_about/metrics.html
Data Source: /src/_data/metrics/*.json
Rendering: Tables and metric cards populated during Jekyll build
{% for quarter in site.data.metrics.issue-metrics.quarterly %}
<va-table-row>
<span>{{ quarter_parts[1] }} {{ quarter_parts[0] }}</span>
<span>{{ quarter.issues_opened }}</span>
<span>{{ quarter.issues_closed }}</span>
</va-table-row>
{% endfor %}Data Source: /src/assets/data/metrics/*.json
Purpose: D3.js charts, interactive features
Approach: Enhances server-rendered content, doesn't replace it
- Tables populated server-side work without JavaScript
- Screen readers get immediate access to data
- SEO-friendly with indexable content
- JavaScript adds charts and interactivity
- Fallback to tables when JS disabled
- Maintains functionality across all contexts
- Weekly data updates via GitHub Actions
- Automatic deployment to production
- Error handling and fallback data
- Server-side rendering reduces initial page load
- No AJAX calls needed for table data
- Charts load only when JavaScript available
- Missing CSV Data: Check if component-library repo has generated recent CSV files
- GitHub API Limits: Ensure GITHUB_TOKEN has sufficient API quotas
- Build Failures: Verify all JSON files exist in both locations
- Stale Data: Check if GitHub Actions workflow is running weekly
# Update component usage data
node scripts/process-ds-components.js
# Update issue metrics
GITHUB_TOKEN=your_token node scripts/collect-issue-metrics.js
# Update experimental metrics
GITHUB_TOKEN=your_token node scripts/collect-experimental-metrics.js
# Analyze component issues (generates markdown report)
node scripts/analyze_issues.js# Check both locations have identical files
ls -la src/assets/data/metrics/ src/_data/metrics/
# Verify JSON is valid
cat src/_data/metrics/issue-metrics.json | jq '.' > /dev/null
# Test Jekyll build
yarn build- Data Retention: Consider archiving historical CSV data
- Performance: Monitor Jekyll build times with larger datasets
- Caching: Implement caching strategies for expensive calculations
- Monitoring: Add alerts for failed data collection workflows