My afternoon New Year's Day activity (after going for a family hike in the snow earlier) is playing with the Garmin and Strava APIs to download activities. They are both quirky but functional, and thanks to good Python clients for each, not too hard to get started and get data.
=> More informations about this toot | More toots from kajord@hachyderm.io
The Garmin library (https://github.com/cyberjunky/python-garminconnect) works great, but IIUC it is not using a public API, but basically reverse engineered the API that Garmin apps use. It broke between the time I first installed it a month or so ago and using it more today. Something had changed on the Garmin end without warning, and the Garth maintainer that python-garminconnect depends on updated pretty quickly. So maybe not the most reliable thing in the world.
=> More informations about this toot | More toots from kajord@hachyderm.io
The Strava client (https://github.com/stravalib/stravalib) is also well-maintained, and not too hard to use after jumping through some hoops for authentication. It uses a real public API which looks well documented. It seems that you can't download GPX files directly, though, so you need to parse and create GPX, which I haven't done yet. There is yet another Python library, stravaweblib, that adds web scraping to API access, and can download GPX (among other things) like you can on the web site. So I've still got a little work to do to get GPX files for Strava activities. Most of them are from Garmin activities anyway, so I will need to do some kind of deduplication if I'm going to do anything with them.
=> More informations about this toot | More toots from kajord@hachyderm.io
@kajord I'm curious what you get up to with this. I was playing around with the Strava API a little while ago (it's not hard to use directly), though I was more interested in segments than GPXs. They use their own weird compressed path encoding (Google polylines). It turns out I won't need the Strava data for my purposes, but there's a lot of interesting stuff there.
=> More informations about this toot | More toots from drdirtbag@mountains.social
@drdirtbag yeah, the "summary_polyline" is weird, I haven't tried to do anything with it. You can get the high resolution track from "streams" on the activity.
=> More informations about this toot | More toots from kajord@hachyderm.io This content has been proxied by September (ba2dc).Proxy Information
text/gemini