This package is designed to allow users to extract various world football results and player statistics data from fbref.com and valuations and transfer data from transfermarkt.com.
You can install the
worldfootballR package from github with:
# install.packages("devtools") devtools::install_github("JaseZiv/worldfootballR")
The functions available in this package are designed to enable the extraction of world football data.
There are four main categories of data extract functions in this package:
This vignette will cover the helper functions to extract important URLs from fbref.
To extract the URL of any country’s league(s) (provided fbref have data for the league), use the
This function also accepts a
tier argument. for first-tier leagues, select ‘1st’, for second-tier select ‘2nd’ and so on.
A fill list of countries available can be found in the
worldfootballR_data repository and can be found here.
fb_league_urls(country = "ENG", gender = "M", season_end_year = 2021, tier = '2nd')
To get a list of URLs for each team in a particular season, the
fb_teams_urls() function can be used:
To get a list of player URLs for a particular team, the
fb_player_urls() function can be used. The reuslts of this output can be passed through to the player season stat functions