SPL Card distribution part 2 (streamlit experiment)

Card distribution.png

Introduction

Previous week i shared some information about the card distribution of splinter.
Card distribution part 1

In this post I described how the card distribution is at the current moment. Of course this is no static data and is change constantly by user unlocking or combining cards.

This week i continued on this small project. I wanted to learn something new.
After a discussion with ChatGPT i came along a python framework i wanted to try out called streamlit.

This is my introduction and first impression of streamlit.
With this application you can realtime see the current card distribution and you have control to zoom and select a parts you want to see.

Here the link to the deployed application:
https://splinterlands-card-distribution.streamlit.app/

Any comments and remarks on the app are welcome and i will try to improve it with your suggestion

What is streamlit

image.png
Reference: Official streamlit website

Streamlit is an open-source Python library designed for building and sharing custom web apps quickly and easily. It's especially useful for data scientists and machine learning practitioners, as it allows them to turn data scripts into interactive, user-friendly web applications without needing extensive web development experience. Streamlit simplifies the process by handling the front-end design automatically, letting you focus on coding the logic. If you want to rapidly prototype, visualize data, or share results with others in an intuitive way, Streamlit is an excellent tool to experiment with.

Splinterlands Card Distribution App

DISCLAIMER: Its work in progress it might be changed since i have written this post.

Card Distribution

The main page is pretty much the same as in the previous all edition and show in graphs the total distribution of the edition including the gold foil vs regular foil and burned card.

Total Distribution

Detailed Distribution

In this section we dive a bit deeping into one ore more edition e.g. soulbound edition:

Soulbound including the unbounded
This shows that chaos legion soulbound edition including the number of unbounded card. for that you need to zoom in a bit 😁

Zoomed view soulbound unbounded

When you select multiple edition it will be placed next to each other:

Compare multiple edition

You can filter specifics:
Filter options
Result best viewed in the table:
Filtered results

Interesting finds:

While busy learning a new techniques using it for game i love to play you can see how little is unlocked and how rare the current unbounded soulbound is. There is room that it quickly exceed the alpha edition while it still possible to unbound soulbound cards. Note that it will be more expensive next week and in about 21 weeks it will no be possible to unbound.

Unbouned soulbound vs Alpha distribution

If you look into the units that are least unbounded vs the distrubtion

Least unbounded percentage

The most unbounded units:

Most unbounded percentage

My conclusion about streamlit

I was surprised how easy it was to deploy a running app that is accessible for the outside world.
If you have placed your code into github its very very easy to deploy just hit deploy and setup these settings:

deploy.png

Notes:
I did run in some problems/challenges:

  • When re-deploying my app with an update, it did not start automatically, fixed by just restarting app again once or twice.
  • With every change in the code it should restart my application locally but i had to restart it every time by hand, I need to investigate this further why.
  • The debugging of the code i find a bit less easy than with python dash, might be experience thing.

It a pretty straight forward framework for small 'simple' application which does not store data.
I want to explore how to connect a DB and build a bigger app in the future.

If you need more custom frontend stuff you might run into problem with streamlit.
On the internet i came across this image, interesting how popular it is getting while its only around for 4 years compared to the others.

srouce: https://www.datarevenue.com/en-blog/data-dashboarding-streamlit-vs-dash-vs-shiny-vs-voila

References

All code and packages/tools are open source and free to use.

My github repository (Splinterlands Card Distribution app):
https://github.com/gamerbeaker007/spl-streamlit

Running app:
https://splinterlands-card-distribution.streamlit.app/

Streamlit:
https://streamlit.io/

Python:
https://www.python.org/downloads/

I like to use the PyCharm as IDE:
https://www.jetbrains.com/pycharm/download/

That's all for this week hope you enjoyed reading this. See you all on the battle field

Do you also want to be part of this amazing play to earn game consider using my refferal link.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center