scraping_rosters_acb {BAwiR}R Documentation

ACB players' profile

Description

This function allows us to obtain the basic information of each player, including his birth date. Then, we will be able to compute the age that each player had in the date that he played each game. The website used to collect information is https://www.acb.com.

Usage

scraping_rosters_acb(pcode, verbose = TRUE, accents = FALSE, 
                     r_user = "guillermo.vinue@uv.es")

Arguments

pcode

Code corresponding to the player's website to scrape.

verbose

Should R report information on progress? Default TRUE.

accents

Should we keep the Spanish accents? The recommended option is to remove them, so default FALSE.

r_user

Email user 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.

Details

Some players have a particular licence, which does not necessarily match with their nationality, in order not to be considered as a foreign player, according to the current ACB rules.

Value

Data frame with eight columns:

Note

In addition to use the email address to stay identifiable, the function also contains two headers regarding the R platform and version used.

Furthermore, even though in the robots.txt file at https://www.acb.com/robots.txt, there is no information about scraping limitations and all robots are allowed to have complete access, the function also includes the command Sys.sleep(2) to pause between requests for 2 seconds. In this way, we don't bother the server with multiple requests and we do carry out a friendly scraping.

Author(s)

Guillermo Vinue

See Also

do_scraping_rosters

Examples

## Not run: 
# Not needed to scrape every time the package is checked, built and installed.
df_bio <- scraping_rosters_acb("56C", verbose = TRUE, accents = FALSE, 
                               r_user = "guillermo.vinue@uv.es")

## End(Not run)


[Package BAwiR version 1.2.6 Index]