Use case of plotting.TEAM_COLORS and plotting.TEAM_TRANSLATE #417
Replies: 2 comments 3 replies
-
The team names in the laps dataframe are taken from the F1 API. Those are the same names as used on formula1.com I have absolutely no idea, why the teams are named the way the are. Because those are not the official team names as far as I know. The three letter team codes... that's a very good question. I have no idea to be honest. I'm pretty sure I haven't made them up. But I also can't tell you where I got them from or what they are used for. An interesting mystery 😅 Getting to the fact that the team names in the dictionary don't match the dataframe. This is because the team names in the dictionary are intentionally shortened to their most recognizable part so that the fuzzy search in In terms of API consitency. Yes, you can argue that you can use |
Beta Was this translation helpful? Give feedback.
-
Dug through the blame history for a minute to locate the original commit, looks like the entire file was added back then. No telling what the intended use case had been then. |
Beta Was this translation helpful? Give feedback.
-
In the laps dataframes, Red Bull is called Red Bull Racing and Haas is called Haas F1 team. Neither of these is in
plotting.TEAM_COLORS
I have never encountered the three-letter team codes while using FastF1 so I also wonder what use case was
plotting.TEAM_TRANSLATE
designed for.As seen in the qualifying results example, the only way to get team color from team name is by using
plotting.team_color
. Contrast this against the drivers, whereDRIVER_COLORS
andDRIVER_TRANSLATE
are sufficient.I know reworking the plotting module is being planned but maybe some improvements can be made to the team situation in the short term since the two dictionaries are very unwieldy/redundant currently.
Beta Was this translation helpful? Give feedback.
All reactions