Dashboard visualizing stats based on gpx files.
Tested with GPX/TCX from:
# install environment
$ uv run pre-commit installAdd your gpx files to data (e.g., sync from your phone).
Load gpx files, generate metadata and save to sqlite database:
$ ./import.py data/<file>.gpxIf the file has no tracks (e.g., because its a manual entry)
then it will try the tcx file (should contain duration and distance).
Load all gpx files from a folder:
mkdir db
$ ./load.sh data db/gpx.dbVisualize the stats with
grafana
at localhost:3000
with default username and password admin:admin:
$ docker-compose up
# or with podman
$ podman compose upOr a speed boxplot with a mini dash app:
$ uv sync --extra dashapp
$ uv run python app.pyRun tests:
$ uv run pytestRun integration tests (excluded by default):
$ uv run pytest tests/integration/Run tests with coverage report:
$ uv run pytest --cov=stats_loader --cov-report=term-missingGenerate HTML coverage report:
$ uv run pytest --cov=stats_loader --cov-report=html
# Open htmlcov/index.html in browserDebug database:
sqlite3 db/gpx.db
# list tables
> .tablesList latest entries:
SELECT * FROM files ORDER BY load_timestamp DESC LIMIT 5;
