Skip to contents

MLB Metrics

Usage

mlb_metrics()

Value

Returns a tibble with the following columns

col_nametypesdescription
metric_namecharacterMetric name (e.g. 'releaseSpinRate').
metric_idintegerNumeric metric identifier.
stat_groupcharacterStat group the metric belongs to (e.g. 'pitching').
metric_unitcharacterUnit of measure for the metric (e.g. 'RPM').

Examples

# \donttest{
  try(mlb_metrics())
#> ── MLB Metrics data from MLB.com ──────────────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:41 UTC
#> # A tibble: 22 × 4
#>    metric_name        metric_id stat_group        metric_unit
#>    <chr>                  <int> <chr>             <chr>      
#>  1 ""                         0 NA                NA         
#>  2 "releaseSpinRate"       1000 pitching          RPM        
#>  3 "releaseExtension"      1001 pitching          FT         
#>  4 "releaseSpeed"          1002 pitching          MPH        
#>  5 "effectiveSpeed"        1028 pitching          MPH        
#>  6 "launchSpeed"           1003 hitting, pitching MPH        
#>  7 "launchAngle"           1005 hitting, pitching DEG        
#>  8 "generatedSpeed"        1044 hitting, pitching MPH        
#>  9 "maxHeight"             1039 hitting           FT         
#> 10 "travelTime"            1049 hitting           SEC        
#> # ℹ 12 more rows
# }