fg_projections: *Scrape FanGraphs player projections*

View source: R/fg_projections.R

fg_projectionsR Documentation

Scrape FanGraphs player projections

Description

Retrieves FanGraphs' published player projections (Steamer, ZiPS, ATC, THE BAT, and their variants) from the FanGraphs projections API – one row per player with the projected stat line.

Usage

fg_projections(
  type = "steamer",
  stats = "bat",
  team = 0,
  league = "all",
  position = "all"
)

Arguments

type

Projection system. One of "steamer", "zips", "zipsdc", "atc", "thebat", "thebatx" (batters only), or the rest-of-season variants "rsteamer", "rzips", "ratc", "rthebat", "rthebatx". Defaults to "steamer".

stats

Either "bat" (batting projections) or "pit" (pitching projections). Defaults to "bat".

team

MLB team filter as FanGraphs' numeric team id; 0 (default) returns all teams.

league

League filter: "all" (default), "al", or "nl".

position

Position filter (e.g. "all", "c", "ss", "of"). Defaults to "all".

Value

A baseballr_data tibble with one row per player and the projection system's stat columns (counting stats, rates, and projected WAR; column set varies by system and by stats).

Examples


  try(fg_projections(type = "steamer", stats = "bat"))


baseballr documentation built on Aug. 27, 2026, 1:07 a.m.