Comments (9)
What you are proposing is to add a column (or two, probably) containing driver abbreviation and/or driver number, right?
Not just a property on the telemetry object that returns those values?
This would [...] be a first step toward allowing for get_telemetry() to be run on Laps objects containing more than one DriverId
What purpose do you see for this functionality?
from fast-f1.
Yeah adding the column(s) would be preferred.
The addition of pick_drivers()
opened up a quick way of doing comparison work between multiple drivers, having the ability to quickly and succinctly pull out (for example) the telemetry for VER and LEC in lap one of a GP as session.laps.pick_laps([1]).pick_drivers(['VER', 'LEC']).get_telemetry()
seems like a logical next ability of the package.
from fast-f1.
Having mixed telemetry DataFrames with data from multiple drivers was never intended functionality.
The main problem is that many of the custom methods of the Telemetry
object, for example .add distance
, .resample_channels
, ..., cannot deal with this kind of mixed data at the moment. They would either need to be rewritten to perform the operations individually for each driver in the given DataFrame or they would need to raise an error. So this is not as simple as just adding these columns. It involves some more work.
I'm not necessarily against doing this. But I don't see a real benefit at the moment. What exactly is the use case that you see? Why would that improve functionality or user experience?
from fast-f1.
Thanks for taking the time to expand on the various functions of Telemetry
- particularly explaining the challenges of them working on mixed Telemetry frames.
I'm not particularly attached to this suggestion, so feel free to call it too much work and close without action. It's a lot of work for what is essentially just saving the user the hassle of binding multiple get_telemetry
calls into one DataFrame, or doing other simple data processing steps.
from fast-f1.
Can you maybe give a concrete example where this would be a noticeable improvement?
The issue here might just as well be that I have difficulty understanding what a user might need. I never actually "use" FastF1 because whenever I'd have time for that, I do development work instead.
If this is instead something that would make things easier for the R wrapper, that would be something we can discuss as well.
from fast-f1.
I think we had some discussion on this for the R wrapper, there were some specific tasks that would have been way easier (for us) with this enabled in Python.
I think too though that merging data frames of telemetries is likely easier than re-writing the whole Telemetry
object's method code.
@SCasanova, can you share the use case for multiple driver telemetries extraction at once? This comes from working on SCasanova/f1dataR#78
from fast-f1.
Hey! Yeah of course
The idea behind this is for when one is building a model that uses mass data from a race. Mainly simplifying the extraction process of telem for more than one driver without having to use a for loop on our end
from fast-f1.
The API provides this data as one time series for each driver. This data is currently not merged in FastF1. So the question becomes, where do we loop over the data to merge it. (To be fair, I could maybe do it without an explicit loop in Python, but I'm not sure if that would even be more efficient. And the loop would then probably just be inside Pandas or Numpy code.)
You can already get data for all laps of a single driver with one function call. That means, you need around 20 iterations and merge that data. This won't be much different if I do it internally in FastF1.
This is fairly simple to do in Python. I don't know anything about how the R wrapper interfaces with FastF1. If this is more difficult or inefficient to do in the wrapper, then I'm happy to figure out some way to make this easier for you.
from fast-f1.
I think this is going to be about equally difficult in Python as it is/was in R. Given the need to refactor methods should multiple drivers' telemetries be passed simultaneously, I think we can handle it with loops in R (or let the end user do so if they wish).
I'm fine to close this as "won't implement".
from fast-f1.
Related Issues (20)
- [BUG] get_circuit_info() doesn't work with custom TELEMETRY_FREQUENCY HOT 2
- [BUG] Example ``plot_driver_laptimes.py`` no longer working with latest Seaborn release HOT 11
- [BUG] Data for Piastri in the sprint shootout not available HOT 2
- [BUG] The first lap of a race should not have a PitOutTime HOT 3
- [BUG] Incorrect Qatar Sprint results due to not applied penalties HOT 3
- [BUG] All laps from Singapore and Qatar Grand Prix have IsAccurate=False HOT 3
- [ENH] Add Python 3.12 to test HOT 1
- [BUG] USGP Results | Duplicate entry for TSU and LEC missing data HOT 4
- [BUG] Laps.pick_fastest(only_by_time=True) inconsistency HOT 5
- [BUG] Restart lap times after the red flag HOT 10
- Ergast ShuttingDown HOT 1
- [DEPR] ``pick_fastest`` needs to return ``None`` instead of empty ``Lap`` HOT 1
- Rainfall Data wrong in Weather Data for some GPs HOT 2
- install pyproject.toml-based projects HOT 10
- [ENH] Drivers colors HOT 7
- [BUG] Las Vegas FP1, FP3 and Race failing to load HOT 4
- [BUG] Incorrect data Las Vegas Race HOT 3
- Lap to grid + formation lap part of the data for Sprint Shootout and Race sessions HOT 2
- [BUG] Driver CountryCode is not populated in the SessionResults object HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-f1.