bbdata-cli 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/bbdata.js +1044 -36
- package/dist/bin/bbdata.js.map +1 -1
- package/dist/src/index.d.ts +55 -2
- package/dist/src/index.js +978 -33
- package/dist/src/index.js.map +1 -1
- package/dist/templates/queries/hitter-batted-ball.ts +66 -0
- package/dist/templates/queries/hitter-hot-cold-zones.ts +81 -0
- package/dist/templates/queries/hitter-raw-bip.ts +65 -0
- package/dist/templates/queries/hitter-vs-pitch-type.ts +78 -0
- package/dist/templates/queries/hitter-zone-grid.ts +90 -0
- package/dist/templates/queries/index.ts +27 -0
- package/dist/templates/queries/leaderboard-comparison.ts +72 -0
- package/dist/templates/queries/leaderboard-custom.ts +90 -0
- package/dist/templates/queries/matchup-pitcher-vs-hitter.ts +81 -0
- package/dist/templates/queries/matchup-situational.ts +68 -0
- package/dist/templates/queries/pitcher-arsenal.ts +89 -0
- package/dist/templates/queries/pitcher-handedness-splits.ts +81 -0
- package/dist/templates/queries/pitcher-raw-pitches.ts +62 -0
- package/dist/templates/queries/pitcher-velocity-trend.ts +73 -0
- package/dist/templates/queries/registry.ts +73 -0
- package/dist/templates/queries/trend-rolling-average.ts +98 -0
- package/dist/templates/queries/trend-year-over-year.ts +73 -0
- package/dist/templates/reports/advance-lineup.hbs +29 -0
- package/dist/templates/reports/advance-sp.hbs +66 -0
- package/dist/templates/reports/college-hitter-draft.hbs +49 -0
- package/dist/templates/reports/college-pitcher-draft.hbs +48 -0
- package/dist/templates/reports/dev-progress.hbs +29 -0
- package/dist/templates/reports/draft-board-card.hbs +35 -0
- package/dist/templates/reports/hs-prospect.hbs +48 -0
- package/dist/templates/reports/partials/footer.hbs +7 -0
- package/dist/templates/reports/partials/header.hbs +12 -0
- package/dist/templates/reports/post-promotion.hbs +25 -0
- package/dist/templates/reports/pro-hitter-eval.hbs +77 -0
- package/dist/templates/reports/pro-pitcher-eval.hbs +81 -0
- package/dist/templates/reports/registry.ts +215 -0
- package/dist/templates/reports/relief-pitcher-quick.hbs +29 -0
- package/dist/templates/reports/trade-target-onepager.hbs +45 -0
- package/package.json +68 -63
- package/src/templates/reports/advance-sp.hbs +66 -60
- package/src/templates/reports/pro-hitter-eval.hbs +77 -65
- package/src/templates/reports/pro-pitcher-eval.hbs +81 -69
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Advance Report: {{player}} (SP)
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **For:** {{audience}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Recent Form
|
|
8
|
+
|
|
9
|
+
*Last 5 starts — to be populated with game log data*
|
|
10
|
+
|
|
11
|
+
## Pitch Mix & Sequencing
|
|
12
|
+
|
|
13
|
+
{{#if data.pitcher-arsenal}}
|
|
14
|
+
### Arsenal Overview
|
|
15
|
+
|
|
16
|
+
| Pitch | Usage | Velo | Spin | Whiff % |
|
|
17
|
+
|-------|-------|------|------|---------|
|
|
18
|
+
{{#each data.pitcher-arsenal}}
|
|
19
|
+
| {{this.[Pitch Type]}} | {{this.[Usage %]}} | {{this.[Avg Velo]}} | {{this.[Avg Spin]}} | {{this.[Whiff %]}} |
|
|
20
|
+
{{/each}}
|
|
21
|
+
|
|
22
|
+
### By Count (to be populated)
|
|
23
|
+
- **Ahead in count:** Primary pitch selection
|
|
24
|
+
- **Behind in count:** Go-to pitch
|
|
25
|
+
- **Two-strike:** Put-away pitch
|
|
26
|
+
{{else}}
|
|
27
|
+
*Arsenal data not available*
|
|
28
|
+
{{/if}}
|
|
29
|
+
|
|
30
|
+
{{#if graphs.movementChart}}
|
|
31
|
+
### Pitch Movement Profile
|
|
32
|
+
|
|
33
|
+
{{{svgOrEmpty graphs.movementChart}}}
|
|
34
|
+
{{/if}}
|
|
35
|
+
|
|
36
|
+
## Times Through the Order
|
|
37
|
+
|
|
38
|
+
*3rd time adjustment, velocity drop patterns — to be analyzed from pitch-level data*
|
|
39
|
+
|
|
40
|
+
## Platoon Vulnerabilities
|
|
41
|
+
|
|
42
|
+
{{#if data.pitcher-handedness-splits}}
|
|
43
|
+
| Split | PA | AVG | SLG | K % | BB % |
|
|
44
|
+
|-------|-----|-----|-----|-----|------|
|
|
45
|
+
{{#each data.pitcher-handedness-splits}}
|
|
46
|
+
| {{this.vs}} | {{this.PA}} | {{this.AVG}} | {{this.SLG}} | {{this.[K %]}} | {{this.[BB %]}} |
|
|
47
|
+
{{/each}}
|
|
48
|
+
{{else}}
|
|
49
|
+
*Splits data not available*
|
|
50
|
+
{{/if}}
|
|
51
|
+
|
|
52
|
+
## How to Attack
|
|
53
|
+
|
|
54
|
+
### Early in Game (1st time through)
|
|
55
|
+
- *To be filled: patient approach? aggressive?*
|
|
56
|
+
|
|
57
|
+
### Late in Game (3rd+ time through)
|
|
58
|
+
- *To be filled: exploit fatigue patterns?*
|
|
59
|
+
|
|
60
|
+
### Key Weaknesses
|
|
61
|
+
- *To be filled by evaluator*
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
*Generated by bbdata CLI · Data sources: {{sources}}*
|
|
66
|
+
*This is a 1-page advance report designed for in-game use.*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# College Hitter Draft Report: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Header
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| Player | {{player}} |
|
|
12
|
+
| School | *To be filled* |
|
|
13
|
+
| Bats/Throws | *To be filled* |
|
|
14
|
+
| Position | *To be filled* |
|
|
15
|
+
| Age | *To be filled* |
|
|
16
|
+
|
|
17
|
+
## Physical
|
|
18
|
+
|
|
19
|
+
*Body type, athleticism, strength projection — to be filled*
|
|
20
|
+
|
|
21
|
+
## Tool Grades (20-80 Scale)
|
|
22
|
+
|
|
23
|
+
| Tool | Present | Future | Notes |
|
|
24
|
+
|------|---------|--------|-------|
|
|
25
|
+
| Hit | — | — | *Bat speed, plate coverage* |
|
|
26
|
+
| Power | — | — | *Raw, game power, pull/oppo* |
|
|
27
|
+
| Speed | — | — | *Run times, baserunning IQ* |
|
|
28
|
+
| Field | — | — | *Actions, arm, range* |
|
|
29
|
+
| Arm | — | — | *Strength, accuracy* |
|
|
30
|
+
|
|
31
|
+
## Performance
|
|
32
|
+
|
|
33
|
+
*College slash line, K%, BB%, wood bat league stats — to be filled*
|
|
34
|
+
|
|
35
|
+
## Projection
|
|
36
|
+
|
|
37
|
+
*Ceiling, floor, likely outcome — to be filled*
|
|
38
|
+
|
|
39
|
+
## Risk
|
|
40
|
+
|
|
41
|
+
*Swing concerns, defensive fit, signability — to be filled*
|
|
42
|
+
|
|
43
|
+
## Recommendation
|
|
44
|
+
|
|
45
|
+
*Draft round range, comparison — to be filled*
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
*Generated by bbdata CLI*
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# College Pitcher Draft Report: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Header
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| Player | {{player}} |
|
|
12
|
+
| School | *To be filled* |
|
|
13
|
+
| Throws | *To be filled* |
|
|
14
|
+
| Age | *To be filled* |
|
|
15
|
+
| Height/Weight | *To be filled* |
|
|
16
|
+
|
|
17
|
+
## Physical
|
|
18
|
+
|
|
19
|
+
*Body type, athleticism, projectability — to be filled by evaluator*
|
|
20
|
+
|
|
21
|
+
## Arsenal Grades (20-80 Scale)
|
|
22
|
+
|
|
23
|
+
| Tool | Present | Future | Notes |
|
|
24
|
+
|------|---------|--------|-------|
|
|
25
|
+
| Fastball | — | — | *Velo, life, command* |
|
|
26
|
+
| Breaking Ball | — | — | *Type, spin, depth* |
|
|
27
|
+
| Changeup | — | — | *Fade, deception* |
|
|
28
|
+
| Command | — | — | *Zone control, sequencing* |
|
|
29
|
+
|
|
30
|
+
## Performance
|
|
31
|
+
|
|
32
|
+
*College stats: ERA, K/9, BB/9, WHIP — to be filled*
|
|
33
|
+
|
|
34
|
+
## Projection
|
|
35
|
+
|
|
36
|
+
*Ceiling, floor, likely outcome — to be filled by evaluator*
|
|
37
|
+
|
|
38
|
+
## Risk
|
|
39
|
+
|
|
40
|
+
*Injury history, workload, mechanics — to be filled by evaluator*
|
|
41
|
+
|
|
42
|
+
## Recommendation
|
|
43
|
+
|
|
44
|
+
*Draft round range, comparison, acquire/pass — to be filled*
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
*Generated by bbdata CLI*
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Development Progress Report: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Current Stats
|
|
8
|
+
|
|
9
|
+
*Current level, slash line, K%, BB%, ISO — to be populated*
|
|
10
|
+
|
|
11
|
+
## Trend Analysis
|
|
12
|
+
|
|
13
|
+
*Month-over-month progression, key metric changes — to be populated*
|
|
14
|
+
|
|
15
|
+
## Mechanical Notes
|
|
16
|
+
|
|
17
|
+
*Changes, adjustments, coach observations — to be filled by evaluator*
|
|
18
|
+
|
|
19
|
+
## Development Goals
|
|
20
|
+
|
|
21
|
+
*Target areas for improvement — to be filled by development staff*
|
|
22
|
+
|
|
23
|
+
## Next Steps
|
|
24
|
+
|
|
25
|
+
*Promotion timeline, assignment recommendation — to be filled*
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
*Generated by bbdata CLI*
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# {{player}} — Draft Board Card
|
|
2
|
+
|
|
3
|
+
**Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|-------|-------|
|
|
9
|
+
| **Name** | {{player}} |
|
|
10
|
+
| **Position** | *To be filled* |
|
|
11
|
+
| **School** | *To be filled* |
|
|
12
|
+
| **B/T** | *To be filled* |
|
|
13
|
+
| **Age** | *To be filled* |
|
|
14
|
+
|
|
15
|
+
### Tool Grades
|
|
16
|
+
|
|
17
|
+
| Hit | Power | Speed | Field | Arm | OFP |
|
|
18
|
+
|-----|-------|-------|-------|-----|-----|
|
|
19
|
+
| — | — | — | — | — | — |
|
|
20
|
+
|
|
21
|
+
### Projection
|
|
22
|
+
|
|
23
|
+
*One-line ceiling* — *To be filled*
|
|
24
|
+
|
|
25
|
+
### Comp
|
|
26
|
+
|
|
27
|
+
*Player comparison* — *To be filled*
|
|
28
|
+
|
|
29
|
+
### Round Range
|
|
30
|
+
|
|
31
|
+
*Expected draft range* — *To be filled*
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
*bbdata CLI · Draft room card format*
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# High School Prospect Report: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Header
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| Player | {{player}} |
|
|
12
|
+
| School | *To be filled* |
|
|
13
|
+
| Position | *To be filled* |
|
|
14
|
+
| Commitment | *To be filled* |
|
|
15
|
+
|
|
16
|
+
## Physical
|
|
17
|
+
|
|
18
|
+
*Body type, athleticism, projectability — to be filled*
|
|
19
|
+
|
|
20
|
+
## Tool Grades (20-80 Scale)
|
|
21
|
+
|
|
22
|
+
| Tool | Present | Future | Notes |
|
|
23
|
+
|------|---------|--------|-------|
|
|
24
|
+
| Hit | — | — | |
|
|
25
|
+
| Power | — | — | |
|
|
26
|
+
| Speed | — | — | |
|
|
27
|
+
| Field | — | — | |
|
|
28
|
+
| Arm | — | — | |
|
|
29
|
+
|
|
30
|
+
## Makeup
|
|
31
|
+
|
|
32
|
+
*Work ethic, competitiveness, coachability — to be filled*
|
|
33
|
+
|
|
34
|
+
## Projection
|
|
35
|
+
|
|
36
|
+
*Development timeline, ceiling, floor — to be filled*
|
|
37
|
+
|
|
38
|
+
## Signability
|
|
39
|
+
|
|
40
|
+
*Commitment strength, slot expectations — to be filled*
|
|
41
|
+
|
|
42
|
+
## Recommendation
|
|
43
|
+
|
|
44
|
+
*Draft/follow recommendation — to be filled*
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
*Generated by bbdata CLI*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Post-Promotion Evaluation: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Pre-Promotion Stats
|
|
8
|
+
|
|
9
|
+
*Stats at previous level — to be populated*
|
|
10
|
+
|
|
11
|
+
## Post-Promotion Stats
|
|
12
|
+
|
|
13
|
+
*Stats at new level — to be populated*
|
|
14
|
+
|
|
15
|
+
## Adjustment Analysis
|
|
16
|
+
|
|
17
|
+
*What changed, what didn't, approach differences — to be filled by evaluator*
|
|
18
|
+
|
|
19
|
+
## Recommendation
|
|
20
|
+
|
|
21
|
+
*Continue at level / promote / reassign — to be filled*
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
*Generated by bbdata CLI*
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Pro Hitter Evaluation: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Audience:** {{audience}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Batted Ball Profile
|
|
8
|
+
|
|
9
|
+
{{#if data.hitter-batted-ball}}
|
|
10
|
+
| Metric | Value |
|
|
11
|
+
|--------|-------|
|
|
12
|
+
{{#each data.hitter-batted-ball}}
|
|
13
|
+
| {{this.Metric}} | {{this.Value}} |
|
|
14
|
+
{{/each}}
|
|
15
|
+
{{else}}
|
|
16
|
+
*Batted ball data not available*
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
19
|
+
{{#if graphs.sprayChart}}
|
|
20
|
+
### Spray Chart
|
|
21
|
+
|
|
22
|
+
{{{svgOrEmpty graphs.sprayChart}}}
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
## Approach & Discipline
|
|
26
|
+
|
|
27
|
+
{{#if data.hitter-vs-pitch-type}}
|
|
28
|
+
| Pitch Type | Seen | Swing % | Whiff % | Foul % | In Play | Avg EV | SLG |
|
|
29
|
+
|------------|------|---------|---------|--------|---------|--------|-----|
|
|
30
|
+
{{#each data.hitter-vs-pitch-type}}
|
|
31
|
+
| {{this.[Pitch Type]}} | {{this.Seen}} | {{this.[Swing %]}} | {{this.[Whiff %]}} | {{this.[Foul %]}} | {{this.[In Play]}} | {{this.[Avg EV]}} | {{this.SLG}} |
|
|
32
|
+
{{/each}}
|
|
33
|
+
{{else}}
|
|
34
|
+
*Pitch type breakdown not available*
|
|
35
|
+
{{/if}}
|
|
36
|
+
|
|
37
|
+
## Hot/Cold Zones
|
|
38
|
+
|
|
39
|
+
{{#if data.hitter-hot-cold-zones}}
|
|
40
|
+
| Zone | Pitches | Swings | Whiff % | AVG | SLG |
|
|
41
|
+
|------|---------|--------|---------|-----|-----|
|
|
42
|
+
{{#each data.hitter-hot-cold-zones}}
|
|
43
|
+
| {{this.Zone}} | {{this.Pitches}} | {{this.Swings}} | {{this.[Whiff %]}} | {{this.AVG}} | {{this.SLG}} |
|
|
44
|
+
{{/each}}
|
|
45
|
+
{{else}}
|
|
46
|
+
*Zone data not available*
|
|
47
|
+
{{/if}}
|
|
48
|
+
|
|
49
|
+
{{#if graphs.zoneChart}}
|
|
50
|
+
### Zone Heatmap
|
|
51
|
+
|
|
52
|
+
{{{svgOrEmpty graphs.zoneChart}}}
|
|
53
|
+
{{/if}}
|
|
54
|
+
|
|
55
|
+
## Splits Analysis
|
|
56
|
+
|
|
57
|
+
*To be populated: vs LHP/RHP, home/away*
|
|
58
|
+
|
|
59
|
+
## Trend Analysis
|
|
60
|
+
|
|
61
|
+
*To be populated: rolling average trends*
|
|
62
|
+
|
|
63
|
+
## Risk Assessment
|
|
64
|
+
|
|
65
|
+
*To be filled by evaluator: injury history, age curve, contract implications*
|
|
66
|
+
|
|
67
|
+
## Comparable Player
|
|
68
|
+
|
|
69
|
+
*To be filled by evaluator: statistical comp*
|
|
70
|
+
|
|
71
|
+
## Role Projection
|
|
72
|
+
|
|
73
|
+
*To be filled by evaluator: lineup position, expected production, Acquire / Pass / Monitor*
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
*Generated by bbdata CLI · Data sources: {{sources}}*
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Pro Pitcher Evaluation: {{player}}
|
|
2
|
+
|
|
3
|
+
**Season:** {{season}} | **Audience:** {{audience}} | **Generated:** {{date}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Header
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|-------|-------|
|
|
11
|
+
| Player | {{player}} |
|
|
12
|
+
| Season | {{season}} |
|
|
13
|
+
| Sources | {{sources}} |
|
|
14
|
+
|
|
15
|
+
## Pitch Arsenal
|
|
16
|
+
|
|
17
|
+
{{#if data.pitcher-arsenal}}
|
|
18
|
+
| Pitch Type | Usage % | Avg Velo | Avg Spin | H Break | V Break | Whiff % | Put Away % | Pitches |
|
|
19
|
+
|------------|---------|----------|----------|---------|---------|---------|------------|---------|
|
|
20
|
+
{{#each data.pitcher-arsenal}}
|
|
21
|
+
| {{this.[Pitch Type]}} | {{this.[Usage %]}} | {{this.[Avg Velo]}} | {{this.[Avg Spin]}} | {{this.[H Break]}} | {{this.[V Break]}} | {{this.[Whiff %]}} | {{this.[Put Away %]}} | {{this.Pitches}} |
|
|
22
|
+
{{/each}}
|
|
23
|
+
{{else}}
|
|
24
|
+
*Arsenal data not available*
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
{{#if graphs.movementChart}}
|
|
28
|
+
### Movement Plot
|
|
29
|
+
|
|
30
|
+
{{{svgOrEmpty graphs.movementChart}}}
|
|
31
|
+
{{/if}}
|
|
32
|
+
|
|
33
|
+
## Performance Profile
|
|
34
|
+
|
|
35
|
+
*Season statistics to be populated from FanGraphs data (ERA, FIP, xFIP, SIERA, K-BB%, WAR)*
|
|
36
|
+
|
|
37
|
+
## Splits Analysis
|
|
38
|
+
|
|
39
|
+
{{#if data.pitcher-handedness-splits}}
|
|
40
|
+
| vs | PA | AVG | SLG | K % | BB % | Avg EV | Whiff % |
|
|
41
|
+
|----|-----|-----|-----|-----|------|--------|---------|
|
|
42
|
+
{{#each data.pitcher-handedness-splits}}
|
|
43
|
+
| {{this.vs}} | {{this.PA}} | {{this.AVG}} | {{this.SLG}} | {{this.[K %]}} | {{this.[BB %]}} | {{this.[Avg EV]}} | {{this.[Whiff %]}} |
|
|
44
|
+
{{/each}}
|
|
45
|
+
{{else}}
|
|
46
|
+
*Splits data not available*
|
|
47
|
+
{{/if}}
|
|
48
|
+
|
|
49
|
+
## Trend Analysis
|
|
50
|
+
|
|
51
|
+
{{#if data.pitcher-velocity-trend}}
|
|
52
|
+
| Month | Avg Velo | Max Velo | Δ vs Prior | Pitches | Flag |
|
|
53
|
+
|-------|----------|----------|------------|---------|------|
|
|
54
|
+
{{#each data.pitcher-velocity-trend}}
|
|
55
|
+
| {{this.Month}} | {{this.[Avg Velo]}} | {{this.[Max Velo]}} | {{this.[Δ vs Prior]}} | {{this.Pitches}} | {{this.Flag}} |
|
|
56
|
+
{{/each}}
|
|
57
|
+
{{else}}
|
|
58
|
+
*Velocity trend data not available*
|
|
59
|
+
{{/if}}
|
|
60
|
+
|
|
61
|
+
{{#if graphs.rollingChart}}
|
|
62
|
+
### Rolling Trend Chart
|
|
63
|
+
|
|
64
|
+
{{{svgOrEmpty graphs.rollingChart}}}
|
|
65
|
+
{{/if}}
|
|
66
|
+
|
|
67
|
+
## Risk Assessment
|
|
68
|
+
|
|
69
|
+
*To be filled by evaluator: injury history, mechanical concerns, workload flags*
|
|
70
|
+
|
|
71
|
+
## Comparable Player
|
|
72
|
+
|
|
73
|
+
*To be filled by evaluator: statistical comp to current/recent MLB pitcher*
|
|
74
|
+
|
|
75
|
+
## Role Projection
|
|
76
|
+
|
|
77
|
+
*To be filled by evaluator: SP1-5 / Setup / Closer / Middle Relief + Acquire / Pass / Monitor recommendation*
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
*Generated by bbdata CLI · Data sources: {{sources}}*
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import type { DataSource, AdapterQuery } from '../../adapters/types.js';
|
|
2
|
+
|
|
3
|
+
export type ReportCategory = 'pro-scouting' | 'amateur-scouting' | 'advance' | 'player-dev' | 'executive';
|
|
4
|
+
export type Audience = 'coach' | 'gm' | 'scout' | 'analyst';
|
|
5
|
+
|
|
6
|
+
export interface ReportTemplate {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
category: ReportCategory;
|
|
10
|
+
description: string;
|
|
11
|
+
audiences: Audience[];
|
|
12
|
+
templateFile: string;
|
|
13
|
+
|
|
14
|
+
/** What data queries this report needs */
|
|
15
|
+
dataRequirements: {
|
|
16
|
+
queryTemplate: string;
|
|
17
|
+
paramMapping: Record<string, string>;
|
|
18
|
+
required: boolean;
|
|
19
|
+
}[];
|
|
20
|
+
|
|
21
|
+
/** Sections that must be present in the output */
|
|
22
|
+
requiredSections: string[];
|
|
23
|
+
|
|
24
|
+
examples: string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Template registry
|
|
28
|
+
const templates = new Map<string, ReportTemplate>();
|
|
29
|
+
|
|
30
|
+
export function registerReportTemplate(template: ReportTemplate): void {
|
|
31
|
+
templates.set(template.id, template);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function getReportTemplate(id: string): ReportTemplate | undefined {
|
|
35
|
+
return templates.get(id);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function getAllReportTemplates(): ReportTemplate[] {
|
|
39
|
+
return Array.from(templates.values());
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function getReportTemplatesByCategory(category: ReportCategory): ReportTemplate[] {
|
|
43
|
+
return getAllReportTemplates().filter((t) => t.category === category);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function listReportTemplates(): { id: string; name: string; category: string; description: string }[] {
|
|
47
|
+
return getAllReportTemplates().map((t) => ({
|
|
48
|
+
id: t.id,
|
|
49
|
+
name: t.name,
|
|
50
|
+
category: t.category,
|
|
51
|
+
description: t.description,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// --- Register all 12 report templates ---
|
|
56
|
+
|
|
57
|
+
registerReportTemplate({
|
|
58
|
+
id: 'pro-pitcher-eval',
|
|
59
|
+
name: 'Pro Pitcher Evaluation',
|
|
60
|
+
category: 'pro-scouting',
|
|
61
|
+
description: 'Full MLB/MiLB pitcher assessment for trade/free agency decisions',
|
|
62
|
+
audiences: ['gm', 'scout', 'analyst'],
|
|
63
|
+
templateFile: 'pro-pitcher-eval.hbs',
|
|
64
|
+
dataRequirements: [
|
|
65
|
+
{ queryTemplate: 'pitcher-arsenal', paramMapping: { player: 'player' }, required: true },
|
|
66
|
+
{ queryTemplate: 'pitcher-velocity-trend', paramMapping: { player: 'player' }, required: false },
|
|
67
|
+
{ queryTemplate: 'pitcher-handedness-splits', paramMapping: { player: 'player' }, required: true },
|
|
68
|
+
],
|
|
69
|
+
requiredSections: ['Header', 'Pitch Arsenal', 'Performance Profile', 'Splits Analysis', 'Trend Analysis', 'Risk Assessment', 'Comparable Player', 'Role Projection'],
|
|
70
|
+
examples: ['bbdata report pro-pitcher-eval --player "Corbin Burnes"'],
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
registerReportTemplate({
|
|
74
|
+
id: 'pro-hitter-eval',
|
|
75
|
+
name: 'Pro Hitter Evaluation',
|
|
76
|
+
category: 'pro-scouting',
|
|
77
|
+
description: 'Full MLB/MiLB hitter assessment for acquisition decisions',
|
|
78
|
+
audiences: ['gm', 'scout', 'analyst'],
|
|
79
|
+
templateFile: 'pro-hitter-eval.hbs',
|
|
80
|
+
dataRequirements: [
|
|
81
|
+
{ queryTemplate: 'hitter-batted-ball', paramMapping: { player: 'player' }, required: true },
|
|
82
|
+
{ queryTemplate: 'hitter-vs-pitch-type', paramMapping: { player: 'player' }, required: true },
|
|
83
|
+
{ queryTemplate: 'hitter-hot-cold-zones', paramMapping: { player: 'player' }, required: false },
|
|
84
|
+
],
|
|
85
|
+
requiredSections: ['Header', 'Batted Ball Profile', 'Approach & Discipline', 'Splits Analysis', 'Trend Analysis', 'Risk Assessment', 'Comparable Player', 'Role Projection'],
|
|
86
|
+
examples: ['bbdata report pro-hitter-eval --player "Juan Soto"'],
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
registerReportTemplate({
|
|
90
|
+
id: 'relief-pitcher-quick',
|
|
91
|
+
name: 'Relief Pitcher Quick Eval',
|
|
92
|
+
category: 'pro-scouting',
|
|
93
|
+
description: 'Fast 1-page evaluation for bullpen additions',
|
|
94
|
+
audiences: ['gm', 'scout'],
|
|
95
|
+
templateFile: 'relief-pitcher-quick.hbs',
|
|
96
|
+
dataRequirements: [
|
|
97
|
+
{ queryTemplate: 'pitcher-arsenal', paramMapping: { player: 'player' }, required: true },
|
|
98
|
+
],
|
|
99
|
+
requiredSections: ['Header', 'Arsenal', 'Key Metrics', 'Recommendation'],
|
|
100
|
+
examples: ['bbdata report relief-pitcher-quick --player "Edwin Diaz"'],
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
registerReportTemplate({
|
|
104
|
+
id: 'college-pitcher-draft',
|
|
105
|
+
name: 'College Pitcher Draft Report',
|
|
106
|
+
category: 'amateur-scouting',
|
|
107
|
+
description: 'Draft evaluation with tools and projection focus',
|
|
108
|
+
audiences: ['gm', 'scout'],
|
|
109
|
+
templateFile: 'college-pitcher-draft.hbs',
|
|
110
|
+
dataRequirements: [],
|
|
111
|
+
requiredSections: ['Header', 'Physical', 'Arsenal Grades', 'Performance', 'Projection', 'Risk', 'Recommendation'],
|
|
112
|
+
examples: ['bbdata report college-pitcher-draft --player "Chase Burns"'],
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
registerReportTemplate({
|
|
116
|
+
id: 'college-hitter-draft',
|
|
117
|
+
name: 'College Hitter Draft Report',
|
|
118
|
+
category: 'amateur-scouting',
|
|
119
|
+
description: 'Draft evaluation with tools and projection focus',
|
|
120
|
+
audiences: ['gm', 'scout'],
|
|
121
|
+
templateFile: 'college-hitter-draft.hbs',
|
|
122
|
+
dataRequirements: [],
|
|
123
|
+
requiredSections: ['Header', 'Physical', 'Tool Grades', 'Performance', 'Projection', 'Risk', 'Recommendation'],
|
|
124
|
+
examples: ['bbdata report college-hitter-draft --player "Charlie Condon"'],
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
registerReportTemplate({
|
|
128
|
+
id: 'hs-prospect',
|
|
129
|
+
name: 'High School Prospect Report',
|
|
130
|
+
category: 'amateur-scouting',
|
|
131
|
+
description: 'Tools-and-projection focused (stats unreliable at HS level)',
|
|
132
|
+
audiences: ['gm', 'scout'],
|
|
133
|
+
templateFile: 'hs-prospect.hbs',
|
|
134
|
+
dataRequirements: [],
|
|
135
|
+
requiredSections: ['Header', 'Physical', 'Tool Grades', 'Makeup', 'Projection', 'Signability', 'Recommendation'],
|
|
136
|
+
examples: ['bbdata report hs-prospect --player "Prospect Name"'],
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
registerReportTemplate({
|
|
140
|
+
id: 'advance-sp',
|
|
141
|
+
name: 'Advance Report: Starting Pitcher',
|
|
142
|
+
category: 'advance',
|
|
143
|
+
description: 'Game prep for opposing starter — actionable, 1-page, bullet-point format',
|
|
144
|
+
audiences: ['coach', 'analyst'],
|
|
145
|
+
templateFile: 'advance-sp.hbs',
|
|
146
|
+
dataRequirements: [
|
|
147
|
+
{ queryTemplate: 'pitcher-arsenal', paramMapping: { player: 'player' }, required: true },
|
|
148
|
+
{ queryTemplate: 'pitcher-handedness-splits', paramMapping: { player: 'player' }, required: true },
|
|
149
|
+
],
|
|
150
|
+
requiredSections: ['Header', 'Recent Form', 'Pitch Mix & Sequencing', 'Times Through Order', 'Platoon Vulnerabilities', 'How to Attack'],
|
|
151
|
+
examples: ['bbdata report advance-sp --player "Gerrit Cole" --audience coach'],
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
registerReportTemplate({
|
|
155
|
+
id: 'advance-lineup',
|
|
156
|
+
name: 'Advance Report: Opposing Lineup',
|
|
157
|
+
category: 'advance',
|
|
158
|
+
description: 'Hitter-by-hitter breakdown for pitchers and catchers',
|
|
159
|
+
audiences: ['coach', 'analyst'],
|
|
160
|
+
templateFile: 'advance-lineup.hbs',
|
|
161
|
+
dataRequirements: [],
|
|
162
|
+
requiredSections: ['Header', 'Lineup Overview', 'Hitter Breakdowns', 'Key Matchups'],
|
|
163
|
+
examples: ['bbdata report advance-lineup --team NYY'],
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
registerReportTemplate({
|
|
167
|
+
id: 'dev-progress',
|
|
168
|
+
name: 'Development Progress Report',
|
|
169
|
+
category: 'player-dev',
|
|
170
|
+
description: 'Track minor league player growth over time (monthly/quarterly)',
|
|
171
|
+
audiences: ['scout', 'analyst'],
|
|
172
|
+
templateFile: 'dev-progress.hbs',
|
|
173
|
+
dataRequirements: [],
|
|
174
|
+
requiredSections: ['Header', 'Current Stats', 'Trend Analysis', 'Mechanical Notes', 'Development Goals', 'Next Steps'],
|
|
175
|
+
examples: ['bbdata report dev-progress --player "Jackson Holliday"'],
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
registerReportTemplate({
|
|
179
|
+
id: 'post-promotion',
|
|
180
|
+
name: 'Post-Promotion Evaluation',
|
|
181
|
+
category: 'player-dev',
|
|
182
|
+
description: 'Assess player adjustment after level change',
|
|
183
|
+
audiences: ['scout', 'analyst'],
|
|
184
|
+
templateFile: 'post-promotion.hbs',
|
|
185
|
+
dataRequirements: [],
|
|
186
|
+
requiredSections: ['Header', 'Pre-Promotion Stats', 'Post-Promotion Stats', 'Adjustment Analysis', 'Recommendation'],
|
|
187
|
+
examples: ['bbdata report post-promotion --player "Jackson Holliday"'],
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
registerReportTemplate({
|
|
191
|
+
id: 'trade-target-onepager',
|
|
192
|
+
name: 'Trade Target One-Pager',
|
|
193
|
+
category: 'executive',
|
|
194
|
+
description: 'Condensed 2-minute evaluation for GM-level trade decisions',
|
|
195
|
+
audiences: ['gm'],
|
|
196
|
+
templateFile: 'trade-target-onepager.hbs',
|
|
197
|
+
dataRequirements: [
|
|
198
|
+
{ queryTemplate: 'hitter-batted-ball', paramMapping: { player: 'player' }, required: false },
|
|
199
|
+
{ queryTemplate: 'pitcher-arsenal', paramMapping: { player: 'player' }, required: false },
|
|
200
|
+
],
|
|
201
|
+
requiredSections: ['Header', 'Key Stats', 'Strengths', 'Concerns', 'Fit Assessment', 'Recommendation'],
|
|
202
|
+
examples: ['bbdata report trade-target-onepager --player "Vladimir Guerrero Jr." --audience gm'],
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
registerReportTemplate({
|
|
206
|
+
id: 'draft-board-card',
|
|
207
|
+
name: 'Draft Board Summary Card',
|
|
208
|
+
category: 'executive',
|
|
209
|
+
description: 'Glanceable index card for draft room use',
|
|
210
|
+
audiences: ['gm', 'scout'],
|
|
211
|
+
templateFile: 'draft-board-card.hbs',
|
|
212
|
+
dataRequirements: [],
|
|
213
|
+
requiredSections: ['Name', 'Position', 'School', 'Tool Grades', 'Projection', 'Comp', 'Round Range'],
|
|
214
|
+
examples: ['bbdata report draft-board-card --player "Prospect Name"'],
|
|
215
|
+
});
|