Description Usage Arguments Value Examples
View source: R/soccerStandardiseCols.R
Rename columns (e.g. "location.x"
-> "x"
, "team.name"
-> "team"
, etc...) to interface directly with other soccermatics functions without having to explicitly define column names as arguments. Currently only supports Statsbomb data.
1 | soccerStandardiseCols(df, method = c("statsbomb"))
|
df |
a dataframe of Statsbomb event data |
method |
source of data; only |
a dataframe with column names x, y, distance, angle, player_id, player_name, team_name, event_name
1 2 3 4 5 6 7 8 9 10 11 | library(dplyr)
data(statsbomb)
# transform x,y-coords, standardise column names
my_df <- statsbomb %>%
soccerTransform(method = 'statsbomb') %>%
soccerStandardiseCols(method = 'statsbomb')
# feed to other functions without defining variables,
# x, y, id,distance, angle, etc...
soccerHeatmap(my_df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.