The Team Stats page provides detailed statistical analysis for individual teams based on collected scouting data. It displays performance metrics, match history, and visual representations of a team's capabilities.
- Dropdown selector for choosing a team
- Shows teams with available data
- Quick search by team number
- Average points by phase (Auto, Teleop, Endgame)
- Reliability metrics (climb rate, mobility rate)
- Match count indicator
- Individual match results with point breakdown
- Event and alliance information
- Match Stats Dialog for detailed data
- Comments from scouts
- Compare selected team against another
- Side-by-side statistics
- Visual difference indicators
┌─────────────────────────────────────────────────────────────────────┐
│ TeamStatsPage │
│ - Team selector │
│ - Uses useAllTeamStats hook │
└─────────────────────────────────────────────────────────────────────┘
│
┌────────────────────┼────────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Performance │ │ Match History │ │ MatchStatsDialog │
│ Analysis │ │ │ │ │
│ │ │ - Match cards │ │ - Detailed view │
│ - Points summary │ │ - Point breakdow │ │ - Action counts │
│ - Rates │ │ - Comments │ │ - Start position │
└──────────────────┘ └──────────────────┘ └──────────────────┘
Location: src/game-template/components/team-stats/
| Component | Description |
|---|---|
PerformanceAnalysis |
Summary stats and match list |
MatchStatsDialog |
Detailed match modal |
Location: src/core/components/team-stats/
| Component | Description |
|---|---|
ProgressCard |
Visual progress/rate display |
Location: src/core/types/team-stats.ts
interface TeamStats {
teamNumber: number;
matchCount: number;
matchesPlayed: number;
// Phase averages
avgAutoPoints: number;
avgTeleopPoints: number;
avgEndgamePoints: number;
avgTotalPoints: number;
// Rates
mobilityRate: number;
climbRate: number;
// Match results for history
matchResults: MatchResult[];
// Game-specific nested stats
auto: AutoStats;
teleop: TeleopStats;
endgame: EndgameStats;
}Location: src/game-template/hooks/useAllTeamStats.ts
const {
teamStats, // Array of TeamStats
getTeamStats, // Get stats for specific team
isLoading, // Loading state
error, // Error state
refresh // Reload data
} = useAllTeamStats();The dialog shows complete match details:
- Scoring - Action counts for auto and teleop
- Auto - Auto phase details with start position map
- Endgame - Climb/park status
- Info - Scout name, team number, comments
Actions are rendered dynamically from game data:
{matchData.gameData?.auto &&
Object.entries(matchData.gameData.auto)
.filter(([key]) => key.endsWith('Count'))
.map(([key, value]) => (
<div key={key}>
<span>{formatLabel(key)}:</span>
<span>{value}</span>
</div>
))
}- Update
TeamStatstype insrc/core/types/team-stats.ts - Update calculation in
src/game-template/analysis.ts - Display in
PerformanceAnalysis.tsx
Edit src/game-template/components/team-stats/MatchStatsDialog.tsx
Last Updated: January 2026 Related Docs:
docs/STRATEGY_OVERVIEW.md- Strategy analysis configurationsrc/game-template/analysis.ts- Statistics calculation