Learn R Programming

sleeperapi (version 1.0.4)

get_trending_players: Gather Trending Player Information

Description

Given a sport and type (add or drop), return the top trending players for that selection. More specifically, the player ID and count are returned in a data frame, allowing one to see which players have been added/dropped the most given the particular lookback period (default lookback period of one day).

Usage

get_trending_players(sport, type, lookback_hours = 24, limit = 25)

Value

Returns a data frame containing information (player ID and count) about the trending players.

Arguments

sport

Sport that you would like to query (nfl, nba, etc.) (character)

type

Either "add" or "drop" (character)

lookback_hours

Number of hours to look back (numeric). Default is 24

limit

Number of results you would like (numeric). Default is 25

Author

Nick Bultman, njbultman74@gmail.com, December 2021

Examples

Run this code
if (FALSE) get_trending_players("nfl", "add", 24, 25)

Run the code above in your browser using DataLab