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.
Metadata
Release files for hilly 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hilly-0.1.3.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hilly-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.4 kB
Release files / hilly-0.1.3.tar.gz
| Download URL | hilly-0.1.3.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c0d9284aad1f80e608e20a8c0b24ddcfdf878baf77a438a9c0e41e0da57e112
|
|
BLAKE2b-256 checksum How to use checksums |
ea9b34a1660f1ab8aead1ce4b06ecd803685a1eb76562c6dc7952daea334b071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Linux/5.4.109+
|
Release files / hilly-0.1.3-py3-none-any.whl
| Download URL | hilly-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef2bb0ed69efde40819daf8432b759958e47342a193a7239ce8379511dd79ccb
|
|
BLAKE2b-256 checksum How to use checksums |
e74a07ee48ab69f83c1493ae2cb8dae98cb87626e9bb52dafe859aec94114919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Linux/5.4.109+
|