Static, zero-backend viewer for GPX walks exported from Apple Health.
-
Export your Apple Health data. After unzipping
export.zip, you will find aworkout-routes/directory containing all GPX files. -
Copy that directory into this project (or point the generator to it with
--source). The generator defaults toworkout-routes/, so either rename the folder or pass the flag explicitly. -
From the project root, build the static assets:
# example using the default workout-routes directory python generate_routes.py # or, you can specify the source directory for routes python generate_routes.py --source workout-routes
The script parses each GPX, simplifies the geometry, and writes:
dist/routes.geojson— MultiLineString FeatureCollection for Leafletdist/routes_manifest.json— metadata (dates, point counts, bounds)
-
Serve the
dist/folder with any static file server (needed because the viewer fetches JSON). For example:python -m http.server --directory dist 8000
-
Open http://127.0.0.1:8000/ in a browser.
- Newest walk selected automatically, highlighted in red.
- Sidebar sorted newest → oldest; each entry shows the ISO date and point count.
- Full-map rendering, no network calls beyond the bundled tiles.
- Search filters by date.
dist/index.html references a Mapbox token (MAPBOX_ACCESS_TOKEN). Replace it with your own if needed. If the constant is left blank, the viewer automatically falls back to CARTO/OSM tiles and tracks your system dark/light preference.
Re-run python generate_routes.py whenever you add/remove GPX files. The script reports skipped files (e.g., malformed GPX or missing coordinates).
