A comprehensive desktop application to analyze and visualize your iRacing statistics with integrated Machine Learning for intelligent predictions.
- General statistics: Total races, laps, incidents, championship points
- Positions: Wins, podiums, Top 5, Top 10, DNFs
- Averages: Starting position, finishing position, positions gained/lost
- Consistency Score: Measures your regularity using standard deviation
- Series analysis: Statistics broken down by each iRacing series
- Track analysis: Performance at each circuit
- Position trend chart: Evolution of your starting vs finishing positions
- Incidents chart: Incident history per race with danger zones
- Championship points chart: Point accumulation over time
- SOF (Strength of Field) analysis: Distribution of race difficulty
- Interactive charts with integrated dark theme
- Position prediction: The model learns from your history to predict your next position
- Incident prediction: Estimates how many incidents you might have
- Factor analysis: Identifies which factors affect your performance the most
- Persistent model: The model saves and improves with each session
- Smart insights: Personalized recommendations based on your data
- Linear regression: Projects your future performance
- Trend analysis: Detects if you're improving, declining, or stable
- Points projection: Estimates your future championship points
- Confidence intervals: Prediction ranges with certainty levels
- Native Dark Mode: Professional dark theme GitHub-style
- Responsive design: Adapts to different window sizes
- Tab navigation: Clear organization of information
- Stats cards: Quick visualization of key metrics
- Python 3.8 or higher
- Windows 10/11
# Clone the repository
git clone https://github.com/D0PZ/iRacing-Stats-Calc.git
cd iRacing-Stats-Calc
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.pymatplotlib>=3.5.0
scikit-learn>=1.0.0
numpy>=1.20.0
joblib>=1.0.0
- Go to iRacing Members Site
- Navigate to Stats → Series Stats
- Select the series you want to analyze
- Click Export to download the JSON file
- Open iRacing Stats Calculator
- Click 📂 Load JSON
- Select the exported file from iRacing
- Explore your statistics!
- Go to the 🤖 Machine Learning tab
- Click 🎓 Train Model
- The model will learn from your historical data
- Get personalized predictions and recommendations
iRacing-Stats-Calc/
├── main.py # Entry point
├── requirements.txt # Dependencies
├── README.md # Documentation
├── app/
│ ├── __init__.py
│ ├── gui.py # Graphical interface (Tkinter)
│ ├── data_loader.py # JSON data loading and parsing
│ ├── stats_calculator.py # Statistical calculations
│ ├── projections.py # Projection engine
│ ├── charts.py # Chart generator (Matplotlib)
│ └── ml_engine.py # Machine Learning engine
└── build/ # Build files
| Metric | Description |
|---|---|
| Total Races | Total number of races |
| Wins | Victories (P1) |
| Podiums | Positions 1-3 |
| Top 5 / Top 10 | Positions within the top |
| DNFs | Did Not Finish races |
| Avg Finish | Average finishing position |
| Avg Start | Average starting position |
| Avg Gain | Average positions gained/lost |
| Avg Incidents | Average incidents per race |
| Consistency | Standard deviation of positions |
| Laps Led | Laps led |
| Championship Points | Total championship points |
The application uses several scikit-learn algorithms:
- Random Forest Regressor: Main position prediction
- Gradient Boosting Regressor: High-performance alternative model
- Linear Regression: Base for comparison and projections
- K-Means Clustering: Race type grouping
- Automatic persistence of trained model
- Training history
- Accuracy and confidence metrics
- Feature importance
To create a standalone executable:
# Install PyInstaller
pip install pyinstaller
# Build
python build_exe.pyThe executable will be generated in the dist/ folder.
Contributions are welcome! Please:
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/NewFeature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/NewFeature) - Open a Pull Request
This project is under the MIT License. See the LICENSE file for more details.
- iRacing for the platform and data API
- Matplotlib for visualizations
- scikit-learn for Machine Learning
Made with ❤️ for the iRacing community