Tools for summarizing and viewing sporty GPX traces
Project description
Hilly
Tools for summarizing and viewing sporty GPX traces
Install
pip install hilly
Dev Install
git clone
cd hilly
poetry install
Features
- Traces are loaded as GeoDataFrames (convenient exploring and editing)
- Rasterize traces to see popular routes/trails.
- Label/Filter Skiing Trace to label/exclude chair-lifts.
- Summary for Skiing day
Usage
Import a trace:
import hilly
df = hilly.io.load_trace("path/to/trace.gpx")
If it is a ski/snowboarding trace, apply filters to identify runs/lifts:
ski_df = hilly.ski.apply_filters(df)
ski_df.labels_str.unique().tolist()
# ['', 'lift-1', 'run-1', 'run-2', 'lift-2', 'run-3', 'lift-3', 'run-4']
The labels_str column labels points in the trace as belonging to a lift ride or run, otherwise it is empty. The number indicates a count of lift/runs.
From there you can get a summary for the trace (assuming it is over a single day):
summary = hilly.ski.summary(ski_df)
#🏂 Ski Stats ⛷
# runs: 4
# Total Dist(km): 4.815023209198009
# Longest Run(km): 1.409849302232853
# Total time: 0 days 00:17:32
# Total lift time: 0 days 00:36:55.990000
# Time Ratio: 0.4747313841668961
Or, you can view the trace:
# open leaflet map showing points, dropping datetime column for proper JSON
m = ski_df.drop(columns=["time"]).explore("labels", cmap="coolwarm_r")
m.show_in_browser()
or rasterize the trace to get a density map:
arr, bounds = hilly.utils.rasterize(ski_df, runs_only=True, res=1)
m = hilly.io.map_raster(arr, bounds)
m.show_in_browser()
Collecting Traces
There are many apps available for collecting traces. I use OpenTracks and follow the Export instructions from the settings menu.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hilly-0.1.3.tar.gz.
File metadata
- Download URL: hilly-0.1.3.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c0d9284aad1f80e608e20a8c0b24ddcfdf878baf77a438a9c0e41e0da57e112
|
|
| MD5 |
e3ff343c7254f6e029e7b3c2b0f99bba
|
|
| BLAKE2b-256 |
ea9b34a1660f1ab8aead1ce4b06ecd803685a1eb76562c6dc7952daea334b071
|
File details
Details for the file hilly-0.1.3-py3-none-any.whl.
File metadata
- Download URL: hilly-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef2bb0ed69efde40819daf8432b759958e47342a193a7239ce8379511dd79ccb
|
|
| MD5 |
c9f9381c6d56ce832a47dbed433de070
|
|
| BLAKE2b-256 |
e74a07ee48ab69f83c1493ae2cb8dae98cb87626e9bb52dafe859aec94114919
|