General Questions
What is tif1?
tif1 is a high-performance Python library for Formula 1 data analysis. It provides fast access to timing, telemetry, and weather data from 2018-current. Parallel async loading is more than 3x faster than sequential fetching in the benchmark suite.How is tif1 different from fastf1?
tif1 is designed as a faster alternative to fastf1 with API compatibility. Key differences:- Speed: Parallel data loading with async/HTTP/2 (3x+ vs sequential, benchmark-validated)
- Backends: Supports both pandas and polars
- Caching: SQLite + memory LRU vs file-based pickle
- Data Source: TracingInsights CDN vs Ergast + Live Timing
- Focus: Historical data only (no live timing)
Is tif1 free to use?
Yes, tif1 is open source under the MIT License. Use it freely for personal, academic, or commercial projects.What data is available?
- Lap times and sectors (2018-current)
- Telemetry (speed, throttle, brake, RPM, gear, DRS)
- Position data (X, Y, Z coordinates)
- Acceleration data (X, Y, Z axes)
- Weather data
- Tire compounds and strategy
- Race control messages
- Driver metadata
Installation & Setup
How do I install tif1?
What Python version do I need?
Python 3.11 or higher is required.Do I need an API key?
No, tif1 does not require any API keys or authentication. All data is publicly available via the TracingInsights CDN.Where is data cached?
By default, data uses FastF1-style OS-specific cache locations: Windows%LOCALAPPDATA%/Temp/tif1, macOS ~/Library/Caches/tif1, and Linux/other POSIX ~/.cache/tif1 when ~/.cache exists (otherwise ~/.tif1). Change this location in the .tif1rc file or with TIF1_CACHE_DIR.
Data Access
Why is my first load slow?
The first access to a session downloads data from the CDN. Subsequent loads are instant from the cache. Uselaps_async() for parallel initial loads (3x+ vs sequential in the benchmark suite).
How do I load data faster?
- Use async loading:
await session.laps_async() - Enable the polars lib:
lib="polars" - Use batch telemetry fetching:
session.get_fastest_laps_tels() - Keep caching enabled (default)
Can I access live timing data?
No, tif1 focuses on historical data (2018-current). For live timing, use fastf1.How recent is the data?
Data is typically available 30 minutes after a session ends. This is slightly longer than fastf1 (~20-25 minutes) because tif1 includes additional enriched data.Why am I getting DataNotFoundError?
Common causes:- Event name is misspelled (use
get_events()to check) - Session name is misspelled (use
get_sessions()to check) - The data has not been published yet (check whether the session ended recently)
- The session did not take place (cancelled or postponed)
Performance
How can I reduce memory usage?
- Use the polars lib (50% less memory)
- Process drivers one at a time instead of loading all at once
- Delete DataFrames when done:
del laps - Use categorical dtypes (automatic in tif1)
Why is polars faster?
Polars is written in Rust and uses:- Better parallelization across CPU cores
- More efficient memory layout
- Lazy evaluation for query optimization
- Native Arrow format
Can I use multiple backends in one script?
Yes, each session can use a different backend:Errors & Troubleshooting
I Get a NetworkError
Possible causes:- Internet connection issues
- CDN is temporarily down (rare)
- Firewall blocking the CDN hosts (jsDelivr, Hugging Face, StaticDelivr)
- Check the internet connection
- Reset the circuit breaker:
tif1.reset_circuit_breaker() - Enable debug logging:
tif1.setup_logging(logging.DEBUG)
The Cache Is Corrupted
Clear the cache and re-download:Column Names Do Not Match fastf1
tif1 uses PascalCase for all columns, for exampleLapTime instead of time. This is intentional for consistency. Use the exact column names shown in the data schema reference.
API & Usage
Do I need to call session.load()?
No, tif1 uses lazy loading. Data is fetched automatically at first access:session.load().
How do I get telemetry for all drivers?
Use the optimized batch method:Can I filter by lap number?
Yes, use standard DataFrame filtering:How do I get weather data?
Weather is automatically included in the laps DataFrame:Data Quality
Are lap times accurate?
Yes, lap times come from official timing data. Missing lap times are filled from Ergast/Jolpica where available.Why are some lap times missing?
Lap times can be missing due to:- Pit stops
- Track limits violations (deleted laps)
- Timing system issues
- Very slow laps (> 2m30s in some sources)
Is telemetry data validated?
Yes, tif1 includes optional Pydantic validation (enabled by default). Invalid data raisesInvalidDataError.
Advanced Usage
Can I use tif1 in production?
Yes, tif1 is designed for production use with:- Robust error handling
- Circuit breaker pattern
- Automatic retries
- SQLite caching for reliability
How do I export data?
tif1 DataFrames support all standard export formats:Can I use tif1 with Jupyter?
Yes, tif1 has built-in Jupyter support with rich HTML displays for Session, Driver, and Lap objects.Does tif1 work with async frameworks?
Yes, tif1 uses asyncio internally and provides async methods:How do I analyze tire degradation?
Tire degradation analysis requires tracking lap times over tire life:How do I compare two drivers’ telemetry?
Use the telemetry comparison utilities:How do I find overtakes?
Detect position changes between consecutive laps:How do I calculate race pace?
Race pace excludes outliers and pit laps:How do I work with sprint races?
Sprint races are accessed like regular sessions:How do I handle missing data?
tif1 provides utilities for handling missing data:How do I analyze sector times?
Sector analysis shows where time is gained or lost:How do I use tif1 with Streamlit?
tif1 works with Streamlit for interactive dashboards:How do I batch process multiple sessions?
Process multiple sessions efficiently:How do I create custom visualizations?
tif1 provides plotting utilities, and custom visualizations are also possible:Contributing
How can I contribute?
Contributions are welcome! See the Contributing Guide for details.I found a bug, what should I do?
- Check whether the bug is already reported in GitHub Issues
- If not, create a new issue with:
- Minimal reproducible example
- Error message and traceback
- tif1 version (
tif1.__version__) - Python version
Can I request features?
Yes, feature requests are welcome! Open an issue on GitHub with:- Clear description of the feature
- Use case / motivation
- Example of how it would work
Licensing & Legal
What license is tif1 under?
MIT License. Use it freely in any project.Can I use tif1 commercially?
Yes, the MIT License allows commercial use.Who owns the F1 data?
The underlying F1 data is owned by Formula 1. tif1 provides access to publicly available timing data through the TracingInsights project.Related Pages
Troubleshooting
Solve issues.
Getting Started
Usage guide.
Best Practices
Recommended patterns.