projection_source: Projection Source Object

Description Usage Format Fields Methods See Also

Description

This objects represent the basic set of data needed for defining a projection source. It is used as superclass for the specific source objects that are specific to which type of data is returned. Use html_source, json_source and xlsx_source to create a projection source.

Usage

1

Format

An R6 class object.

Fields

base

The base url for the source

id_col

The name of the column in the player_ids table that refers to the id of the player in the source.

league_id

This is used for Yahoo sources. Set to the id of the league that you want to scrape data from

api_key

The api key associated with the source if applicable

get_path

A function of season, week, position which generates the url path to scrape data from

get_query

A function of season, week, position which generates the url query that will be used to scrape data

url_positions

A function of position that will convert the standard position designation QB, RB, WR, TE, K, DST, DL, LB, DB or others to the designation that the site uses

min_week

The minimum week that the site provide data for

max_week

The maximum week that the site provide data for

season_pos

A character vector of position names that the site provide data for for season

week_pos

A character vector of position names that the site provide data for for weekly data,

stat_cols

A named character vector that will convert the site column names to standard column names.

Methods

get_url

Function of season, week, position that will generate the full URL that will be scraped for that season, week and position

name_cols

Method that will take a table and set the column names as specified in the stat_cols field

set_id

Method that will take a table and add the MFL id column with values based on the player_ids table

See Also

Other source-class: html_source, json_source, xlsx_source


MrDAndersen/ffwebscrape documentation built on May 22, 2019, 1:51 p.m.