Skip to content

Commit

Permalink
example in vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
JaseZiv committed Jan 14, 2024
1 parent f8e4160 commit 379189d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion vignettes/extract-transfermarkt-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ dplyr::glimpse(hazard_injuries)
#----- for multiple players: -----#
# # can make use of a tm helper function:
# burnley_player_urls <- tm_team_player_urls(team_url = "https://www.transfermarkt.com/fc-burnley/startseite/verein/1132/saison_id/2021")
# # then pass all those URLs to the tm_player_bio
# # then pass all those URLs to the tm_player_injury_history
# burnley_player_injuries <- tm_player_injury_history(player_urls = burnley_player_urls)
```

Expand Down Expand Up @@ -325,6 +325,25 @@ dplyr::glimpse(all_leeds_united_players_transfer_history)
```



### Player Absence

To be able to get a player's (or players') absence history as a result of suspensions from transfermarkt, use the `tm_get_player_absence()` function.

```{r player_absence, eval=FALSE}
#----- for a single player: -----#
romero_absence <- tm_get_player_absence(player_urls = "https://www.transfermarkt.com/cristian-romero/profil/spieler/355915")
dplyr::glimpse(romero_absence)
#----- for multiple players: -----#
# # can make use of a tm helper function:
spurs_player_urls <- tm_team_player_urls(team_url = "https://www.transfermarkt.com/tottenham-hotspur/startseite/verein/148")
# # then pass all those URLs to the tm_get_player_absence
spurs_player_absence <- tm_get_player_absence(player_urls = spurs_player_urls)
```



***


Expand Down

0 comments on commit 379189d

Please sign in to comment.