Learn R Programming

BAwiR (version 1.3.4)

scraping_games_acb_old: Old ACB player game finder data

Description

This function allowed us to get all the player game finder data for all the desired ACB seasons available from: https://www.acb.com. It was an old version that worked before the internal structure of the ACB website changed. The updated function is now scraping_games_acb.

Usage

scraping_games_acb_old(type_league, nums, year, verbose = TRUE, 
                       accents = FALSE, r_user = "guillermo.vinue@uv.es")

Value

A data frame with the player game finder data.

Arguments

type_league

String. If competition is ACB, to scrape ACB league games ("ACB"), Copa del Rey games ("CREY") or Supercopa games ("SCOPA").

nums

Numbers corresponding to the website to scrape.

year

Season, e.g. 2017-2018.

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

Author

Guillermo Vinue

Details

The official website of the Spanish basketball league ACB used to present the statistics of each game in a php website, such as: https://www.acb.com/fichas/LACB62090.php.

In some cases, https://www.acb.com/fichas/LACB60315.php didn't exist, so for these cases is where we can use the httr package.

See Also

do_scraping_games

Examples

Run this code
if (FALSE) {
# Not needed to scrape every time the package is checked, built and installed.
df1 <- scraping_games_acb_old(type_league = "ACB", nums = 62001:62002, year = "2017-2018",
                              verbose = TRUE, accents = FALSE, 
                              r_user = "guillermo.vinue@uv.es")
}                           

Run the code above in your browser using DataLab