do_scraping_games: Player game finder data

View source: R/do_scraping_games.R

do_scraping_gamesR Documentation

Player game finder data

Description

This function calls the needed ancillary functions to scrape the player game finder data for the desired competition (currently, ACB, Euroleague and Eurocup).

Usage

do_scraping_games(competition, type_league, nums, year, verbose, accents, r_user)

Arguments

competition

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

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 from which scraping.

year

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

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.

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 player game finder data for the competition selected.

Author(s)

Guillermo Vinue

See Also

scraping_games_acb, scraping_games_euro

Examples

## Not run: 
# Not needed to scrape every time the package is checked, built and installed.
df1 <- do_scraping_games(competition = "ACB", type_league = "ACB", nums = 62001,
                         year = "2017-2018", verbose = TRUE, accents = FALSE, 
                         r_user = "guillermo.vinue@uv.es")
                         
df1_eur <- do_scraping_games(competition = "Euroleague", nums = 1,
                         year = "2017", verbose = TRUE,
                         r_user = "guillermo.vinue@uv.es")                          

## End(Not run)                          


BAwiR documentation built on Nov. 14, 2023, 5:08 p.m.