EP_Draft_Scraper: Draft URL Scraper

Description Usage Arguments Value

View source: R/EP_Draft_Scraper.R

Description

Returns data from all players in the given draft year url

Usage

1
2
3
4
5
6
EP_Draft_Scraper(Data, Agerange = c(17, 25), draft.year = T,
  draft.pick = T, round = T, Agerel = "9/15", Goalie = F,
  position = T, shoots = T, Stats = c("S", "Team", "League", "GP",
  "G", "A", "TP", "PIM", "+/-", "sv%", "GAA"), place.birth = T,
  pbsep = T, country = T, height = T, weight = T, date.birth = T,
  dbsep = T, drafted.team = T, reg.playoffs = "R")

Arguments

Data

the url of the draft year webpage on eliteprospects.com.

Agerange

2-length vector for the age ranges desired. first number is lower-bound, second number is upper-bound. This will be applied to all players.

draft.year

Boolean about whether to include the draft year of the player.

draft.pick

Boolean about whether to include the draft pick used on the player.

round

Boolean about whether to include the round the player was drafted in.

Agerel

This determines how the exact age included in the data frame is calculated. Default is 9/15 due to this being the cutoff data for draft eligibility. For example, during the 2019-2020 season, if Agerel is 9/15, the age in the data frame will represent the players age on 9/15/2020. The offset here is so that for a player's first draft eligible year, their age will be >18.

Goalie

Boolean about whether information on goalies is wanted. If true, output will be a list of data frames, with one for players, and one for goalies. Currently this doesn't do anything, as there isn't a goalie scraper function built out yet.

position

Boolean about whether to include the position of the player.

shoots

Boolean about whether to include the handedness of the player.

Stats

vector of the wanted stats. S - Season, Team - Team, League - League, GP - Games Played, G - Goals, A - Assists, TP - Total Points, PIM - Penalties in Minutes, +/- - Plus/Minus, sv GAA - Goals Against Average (for goalies)

place.birth

Boolean about whether to include the birthplace of the player.

pbsep

Boolean about whether the birthplace should be split into Country, State, and City. place.birth has to be true for this to matter.

country

Boolean about whether to include the country the player represents (or would represent) in international tournaments. Currently just grabs the first if a player has multiple, but eliteprospects is generally good about putting the correct one first.

height

Boolean about whether to include the height of the player. This is in centimeters.

weight

Boolean about whether to include the weight of the player. This is in pounds.

date.birth

Boolean about whether to include the date of birth of the player.

dbsep

Boolean about whether the date of birth should be seperated into year, month, and day. date.birth has to be true for this to matter.

drafted.team

Boolean about whether to include the team who drafted the player.

reg.playoffs

Determines if regular season data, playoff data, or both will be returned for all the players. Currently only 'R' works.

Value

data frame (or list of data frames) with data from all the players drafted in the given year.


palmerimatthew/EPScraper documentation built on Nov. 4, 2019, 11:18 p.m.