Mario Kart 8 Deluxe livesplit analyzer
Project description
MK8D
Python package for "Mario Kart 8 Deluxe" livesplit data analysis. It processes Livesplit LSS files (XML format) to provide a cleaner way to analyze the data by re-shaping it to a dataframe. Pypi: https://pypi.org/project/MK8D/
This pip package is an improvement upon the mk8dLivesplit implementation. The main change is that it handles runs in a dataframe for easier parsing and filtering (sacrificing a bit of processing speed).
Features
- Streamlined conversion from LSS to CSV dataframe
- Combine different LSS files into one dataframe automatically
- Plot and compare runs
- Full run
- Individual Tracks
Basic Usage
Install the package with:
pip install MK8D
To convert an LSS file into a CSV dataframe, run:
MK8D_lss2csv INPUT_FOLDER OUTPUT_FOLDER OUTPUT_FILENAME
where INPUT_FOLDER is the path to the directory where the LSS files are stored, OUTPUT_FOLDER is the location in which we want our files to be exported to, and OUTPUT_FILENAME is the name of the CSV file to be exported.
For example, if run from the repository directory:
MK8D_trk2csv ./MK8D/dev/data ./MK8D/dev/data MK8D_trks.csv
K8D_run2csv ./MK8D/dev/data/MK8D_trks.csv ./MK8D/dev/data MK8D_runs.csv max
would take every LSS file found in the ./MK8D/dev/data
and compile a dataframe to a CSV file, which would be exported to the same folder.
Dataframe Head
There are two dataframe types generated by the package: Tracks (trks), and Runs (runs).
Tracks
- ID: yy/mm/dd (file:rid)
- Track: MK8D track name
- Time: Time elapsed in the track/split (seconds)
- Version: Digital/Cartridge
- Items: Items/No Items
- Speed: 50cc, 100cc, 150cc, 200cc
- Category: Speedrun category (32 tracks, 48 tracks, etc)
Runs
- ID: yy/mm/dd (file:rid)
- Track: MK8D track name
- Time: Time elapsed in the track/split (seconds)
- Version: Digital/Cartridge
- Items: Items/No Items
- Speed: 50cc, 100cc, 150cc, 200cc
- Category: Speedrun category (32 tracks, 48 tracks, etc)
- Split: Human-readable split time
- Center metric: Statistic calculated for each track across runs (mean, median, min, max)
- Center offset: Time as compared to the "center" statistic of the track (mean, median, min, max)
Dependencies
Pandas, Numpy, Plotly, Plotly Express, Matplotlib, Colour, XMLToDict
To do
- Fix bug with tracks sorting
- Add attempt date support
- Create command line tool
- Auto-export plots
- Export violin plots
- Add tracks filter to violin plots
- Highlight PB
- Add stats to plots
- Create progress plot
- Make timings readable
- Fix the milliseconds formatting
- Create non-interactive versions of the plots
- Add stats to violins
- Add tracks order master file support
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.