scrape_team_stats_nfl: Scrape NFL stats from nfl.com at the team level.

View source: R/scrape_team_stats_nfl.R

scrape_team_stats_nflR Documentation

Scrape NFL stats from nfl.com at the team level.

Description

Please note that the column names are identical between offense/defense and you should reference the 'role' column for offensive or defensive stats.

Usage

scrape_team_stats_nfl(season = 2019, stats = "passing", role = "offense")

Arguments

season

character or numeric - greater than 1971, note that some data is missing for earlier seasons.

stats

character - either "passing", "rushing", "receiving", "scoring", "downs"

role

character - "offense" or "defense"

Value

tibble

Examples


# Get the NFL.com game-level stats for offense in 2018
scrape_team_stats_nfl(season = 2018, stats = "passing", role = "offense")

# Get the NFL.com team-level passing stats for defense in 2014
scrape_team_stats_nfl(season = "2014", stats = "rushing", role = "defense")

jthomasmock/espnscrapeR documentation built on Feb. 11, 2024, 4:07 p.m.