runScrape: Scrape Projections

Description Usage Arguments Value Note Examples

Description

Executes a scrape of players' fantasy football projections based on the selected season, week, analysts, and positions. If no inputs are specified, the user is prompted.

Usage

1
2
runScrape(season = NULL, week = NULL, analysts = NULL, positions = NULL,
  fbgUser = NULL, fbgPwd, updatePlayers = TRUE)

Arguments

season

The season of projections to scrape (e.g., 2015).

week

The week number of projections to scrape (e.g., 16). Week number should be an integer between 0 and 21. Week number 0 reflects seasonal projections. Week number between 1 and 17 reflects regular season projections. Week number between 18 and 21 reflects playoff projections.

analysts

An integer vector of analystIds specifying which analysts' projections to scrape. See analysts data set for values of analystIds.

positions

A character vector of position names specifying which positions to scrape: c("QB", "RB", "WR", "TE", "K", "DST", "DL", "LB", "DB").

Value

list of dataResults. One entry per position scraped.

Note

The function has the ability to include subscription based sources, but you will need to either download subscription projections separately or provide a user name and password for those sites. Scraping past seasons/weeks is nearly impossible because very few if any sites make their historical projections available. An attempt to scrape historical projections will likely produce current projections in most cases.

Examples

1
2
3
4
5
6
runScrape(season = 2016, week = 0,         ## Scrape 2016 season data for all
         analysts = 99, positions = "all") ## available analysts and positions

runScrape(season = 2016, week = 1,               ## Scrape 2016 week 1 data for
         analysts = c(-1, 5),                    ## CBS Average and NFL.com
         positions = c("QB", "RB", "WR", "TE",)) ## and offensive positions

dadrivr/ffanalytics documentation built on May 14, 2019, 3:12 p.m.