do_scraping_rosters: Players profile data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/do_scraping_rosters.R

Description

This function calls the needed ancillary functions to scrape the players' profile data for the desired competition (currently, ACB, Euroleague and Eurocup).

Usage

1
do_scraping_rosters(competition, pcode, verbose, accents, year, r_user)

Arguments

competition

String. Options are "ACB", "Euroleague" and "Eurocup".

pcode

Code corresponding to the player's website to scrape.

verbose

Should R report information on progress? Default TRUE.

accents

If competition is ACB, should we keep the Spanish accents? The recommended option is to remove them, so default FALSE.

year

If competition is either Euroleague or Eurocup, the year when the season starts is needed. 2017 refers to 2017-2018 and so on.

r_user

Email to identify the user when doing web scraping. This is a polite way to do web scraping and to certify that the user is working as transparently as possible with a research purpose.

Value

A data frame with the players' information.

Author(s)

Guillermo Vinue

See Also

scraping_games_acb, scraping_rosters_euro

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Not needed to scrape every time the package is checked, built and installed.
df_bio <- do_scraping_rosters(competition = "ACB", pcode = "56C", 
                              verbose = TRUE, accents = FALSE, 
                              r_user = "guillermo.vinue@uv.es")
                              
df_bio_eur <- do_scraping_rosters(competition = "Euroleague", pcode = "007969", 
                              year = "2017", verbose = TRUE, 
                              r_user = "guillermo.vinue@uv.es")                               

## End(Not run)                               

BAwiR documentation built on July 8, 2020, 6:59 p.m.