Skip to main content

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


Héctor M. Sánchez C.

Metadata

Release files for MK8D 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MK8D 0.0.6
File Size Uploaded
MK8D-0.0.6.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MK8D 0.0.6
File Interpreter ABI Platform
MK8D-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / MK8D-0.0.6.tar.gz

Download URL MK8D-0.0.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
00ee1e4b8db95068cc8af31525658f49e78de616a16b1d400db03c4dc4ec265d
BLAKE2b-256 checksum
How to use checksums
c6ce421167557c0e5b1ee53fb1578ae737b11ab9ab1be0aeb0e5f3bdcff266df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6

Release files / MK8D-0.0.6-py3-none-any.whl

Download URL MK8D-0.0.6-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c195c9384e22c304b8ec34b9a748ce7699c07588e7ec9a63ba6cdad394f4c31b
BLAKE2b-256 checksum
How to use checksums
a316a92aa7948f21add3ad0f54f37d039f3f4f6e86b50a8e3ee91f06be9ae5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/49.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page