Description Usage Arguments Author(s) Examples
View source: R/standardize_coordinates.R
Standardize length (x) location columns from StatsBomb event data to 105m x 68m convention
1 2 3 4 5 6 | standardize_statsbomb_x(
data,
cols = c("location.x", "carry.end_location.x", "pass.end_location.x",
"shot.end_location.x", "location.x.GK"),
unit = "meters"
)
|
data |
A dataframe of cleaned StatsBomb event data |
cols |
Columns to convert. Defaults to all x location columns |
unit |
Convert to meters or yards. Defaults to meters |
Lars Maurath
1 2 3 4 | cl_final <- data.frame(match_id = 22912)
sb_data <- StatsBombR::get.matchFree(cl_final)
sb_data <- allclean(sb_data)
sb_data <- standardize_statsbomb_x(sb_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.