1. Ranks every Grand Prix lap from fastest to slowest (there’s usually 50-70 laps per driver) 2. Plots them for each driver, with the *overall* ranking on the x-axis.
The motivation was I wanted to see how slow fast cars’ slow laps are, and vice versa. (I could also do this based on the time axis, but I need to solve the problem of lap times being bunched together & how to represent that.)
The tooling for this was Python + D3.js. I used the FastF1 Python library to grab the data, did my own transformation, and serve the transformed data on the back end with FastAPI. Then the front end is an HTMX-based site, which renders a D3.js graph.
I had some time off last week so I started to build this stats/dataviz website: [https://statsprism.com/f1/lap-rankings](https://statsprism.com/f1/lap-rankings), and this chart is one of the outputs.
What do you all think?
Would love to have a graph in your tool that shows lap time per lap so we can see when they pushed and when they managed their car. Tyre change mark would be a great indicator in this
This is great to see the consistency of each pilot
What’s the number on the right side of the y axis? Their fastest lap?
Also, I would like to see this organized by average rank instead of fastest lap.
Awesome stuff!
Nice graph. It took me a second to understand what you show. Just wondering why you don’t show the actual time on the y axis? With rank, we don’t know how close the laps were.
5 comments
Hey r/dataisbeautiful! 👋
I’ve put this chart together, which:
1. Ranks every Grand Prix lap from fastest to slowest (there’s usually 50-70 laps per driver)
2. Plots them for each driver, with the *overall* ranking on the x-axis.
The motivation was I wanted to see how slow fast cars’ slow laps are, and vice versa. (I could also do this based on the time axis, but I need to solve the problem of lap times being bunched together & how to represent that.)
The tooling for this was Python + D3.js. I used the FastF1 Python library to grab the data, did my own transformation, and serve the transformed data on the back end with FastAPI. Then the front end is an HTMX-based site, which renders a D3.js graph.
I had some time off last week so I started to build this stats/dataviz website: [https://statsprism.com/f1/lap-rankings](https://statsprism.com/f1/lap-rankings), and this chart is one of the outputs.
What do you all think?
Would love to have a graph in your tool that shows lap time per lap so we can see when they pushed and when they managed their car. Tyre change mark would be a great indicator in this
This is great to see the consistency of each pilot
What’s the number on the right side of the y axis? Their fastest lap?
Also, I would like to see this organized by average rank instead of fastest lap.
Awesome stuff!
Nice graph. It took me a second to understand what you show. Just wondering why you don’t show the actual time on the y axis? With rank, we don’t know how close the laps were.