Skip to content

Commit

Permalink
Merge pull request #387 from JaseZiv/fix-385
Browse files Browse the repository at this point in the history
Fix mis-typed param in fbref vignette
  • Loading branch information
JaseZiv committed Jul 7, 2024
2 parents 259bd6b + 9fda3e4 commit 2b6f273
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: worldfootballR
Title: Extract and Clean World Football (Soccer) Data
Version: 0.6.5.0004
Version: 0.6.5.0005
Authors@R: c(
person("Jason", "Zivkovic", , "[email protected]", role = c("aut", "cre", "cph")),
person("Tony", "ElHabr", , "[email protected]", role = "ctb"),
Expand Down
22 changes: 11 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* `fb_league_stats()` not returning `opponent` table. (0.6.5.0001) [#355](https://github.com/JaseZiv/worldfootballR/issues/355)
* `tm_player_bio()` not returning values in the `player_valuation`, `max_player_valuation` and `max_player_valuation_date` fields. Unfortunately, `max_player_valuation` and `max_player_valuation_date` fields are no able to be scraped at this release (0.6.5.0002) [#357](https://github.com/JaseZiv/worldfootballR/issues/357)
* `fb_league_stats()` not returning `player` table when hidden on page load. (0.6.5.0003) [#351](https://github.com/JaseZiv/worldfootballR/issues/351)

* Fix parameter mis-sepcification in fbref vignette. (0.6.5.0005) [#385](https://github.com/JaseZiv/worldfootballR/issues/385)

### Breaking Changes

Expand Down Expand Up @@ -107,7 +107,7 @@

### Bugs

* `tm_player_market_values()` returning `NAs` in the `squad` column
* `tm_player_market_values()` returning `NAs` in the `squad` column
* `tm_` functions were missing the `country` and `comp_name` columns due to a change in the html on transfermarkt
* `fb_match_shooting()` throwing errors for duplicate column names after switch from StatsBomb to Opta on FBRef
* `fb_team_goal_logs` and `fb_player_goal_logs` gave errors when columns were not present
Expand Down Expand Up @@ -286,7 +286,7 @@ Now starting to have load functions:
* `fotmob_get_season_stats` gains `stat_league_name` and can now be used for all leagues since seasons are programmatically scraped
* `tm_player_bio()` now also returns the player's maximum valuation (`max_player_valuation`) and the date that max valuation was recorded (`max_player_valuation_date`). **Note:** there will now be an additional two columns to the output
* Additional processing logic added such that `fotmob_get_league_tables` works properly for international tournaments.
* The `stat_type` argument in `fotmob_get_seasons_stats` renamed to `stat_name` to reflect the different set of values that it takes. Valid values are now equivalent to the options that can be found on the stats page in the browser, e.g. [the Liverpool player stats page](https://www.fotmob.com/leagues/47/stats/season/16390/players/goals/team/8650/liverpool-players).
* The `stat_type` argument in `fotmob_get_seasons_stats` renamed to `stat_name` to reflect the different set of values that it takes. Valid values are now equivalent to the options that can be found on the stats page in the browser, e.g. [the Liverpool player stats page](https://www.fotmob.com/leagues/47/stats/season/16390/players/goals/team/8650/liverpool-players).
* All FBref functions now contain a user defined pause (`time_pause`) before each page load to abide by their new rate limiting rules. See [here](https://www.sports-reference.com/bot-traffic.html). Default is set to `2` seconds
* Internal function`.get_each_season_results()` exported now

Expand Down Expand Up @@ -416,7 +416,7 @@ Now starting to have load functions:
* Fixed `Warning: Unexecutable code in man/fb_player_scouting_report.Rd: pos_versus = "primary")`
* Wrote `.pkg_message()` to allow users to easily suppress messages outputted to the console by setting `options(mypackage.verbose = FALSE)`
* Removed unnecessary examples

* Results of using `understat_` functions now return the correct full season details (ie for `season_start_year = 2019`, the resulting `season` column in the df will be '2019/2020')

# worldfootballR 0.4.3
Expand Down Expand Up @@ -574,7 +574,7 @@ New transfermarkt.com functions:
* `tm_team_transfers()` to get all arrival and departures for a team season
* `tm_squad_stats()` to get basic squad stats for teams for a season
* Helper functions:
* `tm_league_team_urls()` to get teams URLs for a league season
* `tm_league_team_urls()` to get teams URLs for a league season
* `tm_team_player_urls()` to get player URLs for a given team

### Improvements
Expand All @@ -599,25 +599,25 @@ New transfermarkt.com functions:
* `get_match_summary()` now contains additional columns:
* `Is_Pens` to indicate whether the event is from a penalty shootout
* `Event_Half` to indicate which half the event occurred in (1, 2, 3, 4, 5), with 3 & 4 being extra time and 5 being penalty shootout
* `Penalty_Number` for penalty shootouts, the penalty taking order
* `Penalty_Number` for penalty shootouts, the penalty taking order

### Bugs

* Fix issue [#29](https://github.com/JaseZiv/worldfootballR/issues/29) where `get_match_results()` not returning data for seasons before 2014-15
* Fix issue [#30](https://github.com/JaseZiv/worldfootballR/issues/30) for functions reading in seasons data from [worldfootballR_data](https://github.com/JaseZiv/worldfootballR_data)
* Fix issue [#31](https://github.com/JaseZiv/worldfootballR/issues/31) for `get_advanced_match_stats()`, `get_match_report()` and `get_match_summary()` not returning results for lower than tier 1 leagues
* Fix issue [#32](https://github.com/JaseZiv/worldfootballR/issues/32) for `get_match_summary()` where event times causing issues in extra time of match half (ie 45+3 as opposed to 46th minute)
* Fix issue [#33](https://github.com/JaseZiv/worldfootballR/issues/33) for `fb_player_season_stats()` where players not having played a game were previously causing errors
* Fix issue [#33](https://github.com/JaseZiv/worldfootballR/issues/33) for `fb_player_season_stats()` where players not having played a game were previously causing errors


***
***

# worldfootballR 0.2.8

### New functions
* Added new fbref functions
* `fb_player_match_logs()` to get player match logs for a season and stat type (issue [#26](https://github.com/JaseZiv/worldfootballR/issues/26))

### Improvements
* `fb_player_scouting_report()` now returns a players **full** scouting report against peers in Men's Big 5 Leagues and European Competition over the last 365 days (issue [27](https://github.com/JaseZiv/worldfootballR/issues/27))
* Removed the country abbreviation in the `Squad` column of the data frame returned using `fb_player_season_stats()`
Expand All @@ -630,15 +630,15 @@ New transfermarkt.com functions:
* Added new fbref functions
* `get_match_shooting()` to get shot and shot creation specific details (issue [#3](https://github.com/JaseZiv/worldfootballR/issues/3))
* `get_team_match_results()` to get match results for a given team or teams in a season

### Improvements
* `get_match_lineups()` now returns additional summary player performance data (shots, goals, cards, etc) to the original lineups output

### Bugs
* Fixed issue where `get_season_player_stats()` not returning results for players who have only played in domestic comps (not cups, internationals, etc) (issue [#22](https://github.com/JaseZiv/worldfootballR/issues/22))
* Fixed issue where `fb_big5_advanced_season_stats()` not returning results for 'playing_time' stat_type (issue [#23](https://github.com/JaseZiv/worldfootballR/issues/23))

***
***

# worldfootballR 0.2.6

Expand Down
25 changes: 13 additions & 12 deletions vignettes/extract-fbref-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This vignette will cover the functions to extract data from FBref.com.

**NOTE:**

As of version `0.5.2`, all FBref functions now come with a user-defined pause between page loads to address their new rate limiting. See [this](https://www.sports-reference.com/bot-traffic.html) document for more information.
As of version `0.5.2`, all FBref functions now come with a user-defined pause between page loads to address their new rate limiting. See [this](https://www.sports-reference.com/bot-traffic.html) document for more information.


***
Expand Down Expand Up @@ -155,7 +155,7 @@ dplyr::glimpse(prem_2020_shooting)
#----- Can also run this for multiple leagues at a time: -----#
# multiple_2020_shooting <- get_season_team_stats(country = c("USA", "NED"),
# gender = "M", season_end_year = 2020,
# gender = "M", season_end_year = 2020,
# tier = "1st", stat_type = "shooting")
```

Expand All @@ -180,7 +180,7 @@ The stat types available for this function are below:

The function also accepts a season or seasons and whether you want data for the player, or team.

Note that when selecting `team_or_player="team"`, results will be returned for both the team's for and against stats. To filter on this, use the `Team_or_Opponent` column in the resulting data frame, selecting 'team' if you want the team's for stats, or 'opponent' if you want the team's against stats.
Note that when selecting `team_or_player="team"`, results will be returned for both the team's for and against stats. To filter on this, use the `Team_or_Opponent` column in the resulting data frame, selecting 'team' if you want the team's for stats, or 'opponent' if you want the team's against stats.


```{r big5_team, eval=FALSE}
Expand Down Expand Up @@ -293,7 +293,7 @@ big_5_2020_results <- fb_match_results(country = c("ENG", "ESP", "ITA", "GER", "

### Get match report

This function will return similar results to that of `fb_match_results()`, however `fb_match_report()` will provide some additional information. It will also only provide it for a single match, not the whole season:
This function will return similar results to that of `fb_match_results()`, however `fb_match_report()` will provide some additional information. It will also only provide it for a single match, not the whole season:

```{r get_match_report, eval=FALSE}
# function to extract match report data
Expand All @@ -313,7 +313,7 @@ dplyr::glimpse(liv_mci_2020_team_stats)

### Get match summaries

This function will return the main events that occur during a match, including goals, substitutions and red/yellow cards:
This function will return the main events that occur during a match, including goals, substitutions and red/yellow cards:

```{r get_match_summary, eval=FALSE}
# function to extract match summary data
Expand Down Expand Up @@ -480,12 +480,12 @@ dplyr::glimpse(messi_primary)
# TO GET THE LAST 365 DAYS REPORT:
messi_last_365 <- fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi",
pos_versus = "primary",
pos_versus = "primary",
league_comp_name = "Last 365 Days Men's Big 5 Leagues, UCL, UEL")
# TO GET SCOUTING REPORT FOR MULTIPLE COMPS/LEAGUES:
messi_multiple <- fb_player_scouting_report(player_url = "https://fbref.com/en/players/d70ce98e/Lionel-Messi",
pos_versus = "primary",
pos_versus = "primary",
league_comp_name = c("Last 365 Days Men's Big 5 Leagues, UCL, UEL", "2022 World Cup"))
Expand All @@ -503,7 +503,7 @@ The stat_types available for use in this function are below:

* *standard*
* *shooting*
* *passing*
* *passing*
* *passing_types*
* *gca*
* *defense*
Expand Down Expand Up @@ -578,17 +578,17 @@ dplyr::glimpse(fleetwood_standard_stats)
#----- Can even get stats for a series of teams: -----#
# league_url <- fb_league_urls(country = "ENG", gender = "M",
# teams <- fb_teams_urls(league_url)
#
#
# multiple_playing_time <- fb_team_player_stats(team_urls= teams, stat_type= "playing_time")
```

### Goal and assist logs

Use the `fb_player_goal_logs()` function to get logs of "goals" (the default), "assists", or "both".

```
```{r fb_player_goal_logs, eval=FALSE}
jwp_url <- "https://fbref.com/en/players/3515d404/James-Ward-Prowse"
goal_log <- fb_player_goal_logs(team_urls = jwp_url, goals_or_assists="both")
goal_log <- fb_player_goal_logs(jwp_url, goals_or_assists="both")
dplyr::glimpse(goal_log)
```
Expand All @@ -610,7 +610,8 @@ The following stat types can be selected, depending on the player's position (ie


```{r player_match_logs, eval=FALSE}
ederson_summary <- fb_player_match_logs("https://fbref.com/en/players/3bb7b8b4/Ederson", season_end_year = 2021, stat_type = 'summary')
ederson_url <- "https://fbref.com/en/players/3bb7b8b4/Ederson"
ederson_summary <- fb_player_match_logs(ederson_url, season_end_year = 2021, stat_type = 'summary')
dplyr::glimpse(ederson_summary)
```

Expand Down

0 comments on commit 2b6f273

Please sign in to comment.