Results_Pivot() Function
- Rogers
- Mar 9, 2024
- 1 min read
I built the function `results_pivot()` as I could show a table of results across all stages (from one or multiple races) looking at GC Time, Stage Time, KOM, Points and Youth jersey rankings for each stage. The function is designed to be as flexible as possible with ten different parameters to filter/choice options ranging from race selection, the data you want to look at and how you want to present the data.
The function has a list of parameters:
Season
Gender
Detail Slicer (Rider or Team)
Output
UCI Race Classification
Race Location
Stage Race or One Day Races
One Day Bonus Seconds
How many riders within a table
Who built the table
The current output has 7 different options for each grouping (GC Time, GC Stage Time, Stage Time, Points jersey, KOM jersey, Youth Jersey.
# 1 = Individual Stage Metric | avg time/score
# 2 = Individual Stage Position | avg position
# 3 = Individual Stage Metric from Stage Leader | avg time/score
# 4 = Individual Stage Metric from Overall Leader | avg time/score
# 5 = Tallied Individual Stage Metric | avg time/score
# 6 = Tallied Individual Stage Metric from Tallied Individual Stage Leader | avg time/score
# 7 = Tallied Individual Stage Metric from Overall Tallied Stage Leader | avg time/score
The function is ongoing and I’m sure I’ll be adding even more functionality to it soon!
Comments