Docker Image

One of the main SplatStats drawbacks as it stood up to now was that it needed the independent handling of the s3s package to download data. The following updates described here were done to make some progress in alleviating this nuissance by bundling both packages together (as allowed by s3s’ licence).

Setting Folder Structure Up

Follow the instructions on installing s3s locally. Once it has finished, we need to run s3s at least once, and to setup the following folder structure (the battles and out folders are auto-created, but the jsons one has to be created manually for now):

data
  jsons
    config.txt
  battles
  out

Where data is a dedicated folder for SplatStats’ data and the config.txt file is the one generated by s3s’s first run. Once the package has been run successfully, we can do the rest from SplatStat’s docker image!

Pulling Docker image

If docker is installed in the user’s computer, the image can easily be downloaded with:

docker pull chipdelmal/splatstats

Running Image

To run the image, navigate to the data folder location and run the following command on the terminal:

docker run \
  --net=host \
  --user "$(id -u):$(id -g)" \
  -v "$(pwd)":/data/ \
  chipdelmal/splatstats \
  --player "čħîþ ウナギ" --download True --upload False --overwrite True --weapon All

Replacing "čħîþ ウナギ" with your Splatoon player name! If the config.txt file is valid, the image will download your latest 50 battles JSON file, process it to extract the battles’ serialized data, and output the resulting plots to the out directory. Additionally, if you want your stats to be uploaded to stat.ink you can simply replace --upload True!

_images/statink.png

For more information on the code have a read on my blogpost!