You are browsing as a guest. Sign up (or log in) to start making projects!

9h 41m 3s logged

PitWall Devlog 5 Weather, Degradation, and Historical Performance

What I built

Weather Performance

get_weather compares average qualifying position for a list of drivers across wet sessions vs. dry sessions and calculates a wet_advantage which is basically just dry avg minus wet avg so a positive number means someone performs better in the rain rather than in the dry. chart_weather visualises it

Tire Degradation

get_tire_degradation takes each stint and calculates lap-time loss per lap of tyre age. The laps are first filtered so that there are no inaccurate laps and that means excluding laps where there was a red flag, yellow/double yellows, exclude inlaps and outlaps and also if there was a safety car/vsc and also TyreLife > 2 to exclude also the first 2 laps of the stint where in general you have to nurse the tires to warm them up. chart_tire_degradation just visualises it.

Teammate Gap

get_teammate_gap compares best qualifying times between two teammates across a season. Because not every driver reaches Q3, it falls back Q3 - Q2 - Q1 to find each driver’s actual best time for that quali session. chart_teammate_gap visualises it, red or cyan depending on who was faster.

Historical Performance

get_fastest_lap_history finds the fastest lap from every quali session since 2018 as that’s how far the data goes. get_driver_circuit_stats does the same thing but for a driver, pulling qualifying position, race position, fastest lap, and finishing result for each year at a given circuit.

Sector Times and Pit Stops

get_sector_improvement breaks a driver’s sector times down by stint and tyre age, using the same filtering to exclude some laps as the degradation function, get_pitstop_performance calculates stop duration by matching a driver’s pit-in lap to their next pit-out lap, discarding anything under 15s or over 60s since those aren’t really representative.

Career Head-to-Head

get_h2h_career compares two drivers’ qualifying head-to-head win rate at specific circuits across multiple years, returns a win percentage per location. chart_h2h_career again visualises it.

Problems I hit

  • First pass on pit stop duration had no bounds so I was getting stops showing as 3s and 140s which were basically laps flagged as pit laps during safety car periods which is a lot shorter so I added the 15–60s filter
  • also in general I had issues with how tidy the charts looked for example when looking at the stints, each stint is shown with the color of the compound so yellow for medium and so on and for some races which aren’t one stoppers you often use one compound more than once so I lowered the opacity if there is a second stint on the same compound, it’s not a perfect solution but it works
0
6

Comments 0

No comments yet. Be the first!