HowLongToBeat is a website that helps your track play times, which is also in collaboration with Microsoft to show approximate competition time for the Xbox app on PC. The best thing is you can export your records to a CSV file so you really own your data, instead of relying on a third party.
This is a linear and temporal data analysis & visualization based on the exported CSV using Python libraries, notably numpy
, pandas
and matplotlib
, and only tested on GNU/Linux with Python 3.12.
It's really straightforward:
# Clone repo
git clone https://github.com/Vinfall/hltb
cd hltb
# Set up venv and use
# NOTE: I assume you use virtualenv, if not
# replace `virtualenv` with `python -m venv` in Makefile
make install
make run
# Clean up
make clean
make uninstall
Now you are good to go ahead.
-
Export your HLTB data in options. Alternatively, you can use provided
HLTB_Games_example.csv
inexample
folder for tests. -
Run the scripts.
The following information may be useful to you:
hltb_sanitizer.py
: sanitize exported data- Edit
BLOCK_TAGS
to excluded games with certain tags - Edit
CUSTOM_TAGS
to recognize your custom tab names - Change
SCORE_MAX
to100
if you prefer Percentage System
- Edit
hltb_analyzer.py
: analyze sanitized data- Adjust
MIN_TIMES
to change the word frequency limit - Adjust
DATE_COL
if you don't always add a completion date
- Adjust
hltb_visualizer.py
: generate a few ugly charts from sanitized data- Control plot behavior via
SHOW_PLOT
: patch CSV to meet the criteria of batchartrace
- Control plot behavior via
hltb_barchartrace.py
- Adjust
DATE_COL
if you don't always add a completion date
- Adjust
That's it. You can find example charts and other information on my blog, or just read code comments.
GLWTPL (Good Luck With That Public License)