Skip to contents

Create a table using gt of overall player standings in fantasy football. The table is colored by fantasy points per game (PPG) and ordered by total fantasy points.

Usage

table_ovr_qb_fantasy(
  num_players = NULL,
  scoring = NULL,
  seasons = NULL,
  pbp_db = NULL,
  pbp_db_tbl = NULL,
  file_name = NULL,
  output_dir = NULL
)

Arguments

num_players

Number of players to list in table (int)

scoring

Fantasy scoring format (str). Can be defined as standard scoring, half PPR scoring, full PPR scoring, 4PT PASS TD or 6PT PASS TD by using: "std_4pt_td", "half_ppr_4pt_td", "ppr_4pt_td", "std_6pt_td", "half_ppr_6pt_td", "ppr_6pt_td"

seasons

NFL season or year (int) such as seasons = 2024.

pbp_db

Path to play-by-play database (str)

pbp_db_tbl

Table name stored in the play-by-play database (str)

file_name

File name to save table

output_dir

Directory to save the table

Value

Rendered table using gt and a saved .png if output_dir and file_name are defined

Details

Using nflfastR play-by-play data, stats for a user-defined season can be obtained to create a table with overall standings for a season. The function automatically includes the entire season, defined by year as an integer. The table is colored by fantasy points per game (PPG) using the gtExtras hulk theme and ordered by total fantasy points. The table is saved as a .png figure.

See also

nuclearff::get_qb_pbp_stats QB cumulative season stats obtained from play-by-play data

nuclearff::get_player_data Get player data and IDs to merge dataframes

Author

Nolan MacDonald