Skip to content

blue-az/Car-Compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

SRT Autocross Performance Comparison Dashboard

This Streamlit web application provides a dashboard for statistical comparison between two distinct groups of Dodge SRT vehicles based on autocross lap time data. It incorporates visualizations and statistical tests to analyze performance differences, while also attempting to account for potential driver skill variations.

Features

  • Web-Based GUI: Interactive dashboard built with Streamlit.
  • Car Group Definition: Clearly defines the two groups being compared based on car type and driver assignment.
  • Contextual Information: Provides background on the likely vehicle models and the nuances of autocross relevant to the comparison.
  • Race Selection: Allows analysis based on different race configurations (e.g., "Race 1", "Race 2").
  • Data Display: Shows the raw lap times collected for each group.
  • Descriptive Statistics: Calculates and displays key metrics (count, min, max, mean, median, standard deviation) for each group based on all their lap times.
  • Visual Comparison:
    • Box Plots: Visually compare the distribution, median, and spread of all lap times between the two groups.
    • Histograms: Show the frequency distribution (shape) of lap times for each group.
  • Individual Driver Analysis (Skill Proxies):
    • Displays per-driver statistics including best time, mean, standard deviation (consistency proxy), and improvement slope (learning proxy).
    • Plots individual driver lap times across runs, with an option to overlay linear regression lines to visualize improvement trends.
  • Statistical Significance Testing:
    • Performs Welch's t-test (comparing means) using all lap times to assess overall group differences.
    • Performs Welch's t-test using only the best lap time from each driver to compare peak potential, potentially reducing the impact of learning runs.
    • Calculates and interprets Cohen's d (effect size) for both t-tests.
  • Interpretation Guidance: Provides notes to help interpret the results, considering both statistical significance and potential driver skill factors.

Requirements

  • Python: Version 3.7 or higher recommended.
  • Libraries:
    • streamlit
    • matplotlib
    • pandas
    • scipy
    • numpy

Installation

  1. Ensure Python is installed. You can download it from python.org.
  2. Create a project directory and navigate into it in your terminal.
  3. Save the application code as streamlit_app.py (or your preferred name, e.g., car_comparison_dashboard.py) in your project directory.
  4. Create a requirements.txt file in the same directory with the following content:
    streamlit
    matplotlib
    pandas
    scipy
    numpy
  5. Install the required libraries:
    pip install -r requirements.txt
    (Using a Python virtual environment is recommended).

Running the App

  1. Navigate to the project directory in your terminal.
  2. Run the Streamlit application:
    streamlit run streamlit_app.py
    (Replace streamlit_app.py if you saved the script with a different name).
  3. The application will open in your web browser.
  4. Interact with the Dashboard: Use the radio button in the sidebar to select the race data you want to analyze. The statistics, plots, and tests will update accordingly. Toggle the "Show Improvement Lines" checkbox to view regression trends on the lap time plot.

Data Format

The lap time data and car group assignments are currently hardcoded within the script.

  • Lap Times: Located in the race_data dictionary.
  • Car Groups: Defined in the car_groups dictionary, mapping group names to lists of driver names.

To analyze different data, modify these dictionaries directly within the script file. Consider adapting the script to load data from external files (CSV, JSON) for more flexibility.

Analysis Notes & Limitations

  • This analysis cannot definitively separate car performance from driver skill with the given data alone.
  • Metrics like standard deviation and improvement slope are treated as proxies that might relate to driver consistency and experience but are not perfect measures.
  • The sample size (number of drivers and runs per group) is small, limiting the statistical power and generalizability of the t-test results.
  • Assumes car setups (tires, etc.) were reasonably comparable within groups.

Interpret the results cautiously, considering both statistical outputs and the visual trends in the context of these limitations.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages