wanderer icon indicating copy to clipboard operation
wanderer copied to clipboard

[Feature] Add a user stats screen

Open Fmstrat opened this issue 1 year ago • 3 comments

It would be great to be able to view user statistics. For instance, a profile page at /users/myuser that contains the below stats, calculated off the completion and the GPX file used for the route.

  • Distance traveled
  • Duration of movement
  • Number of completions
  • Average speed
  • Total Ascent
  • Total Descent

This should be filterable by activity type (hiking/biking/etc), and segmented by time frame (year/month/custom).

It would need to filter out activities that don't have GPX data for time/etc. That could be displayed with a (23 of 25 activities displayed/etc)

Fmstrat avatar Jul 24 '24 15:07 Fmstrat

As a note, I recognize Wanderer has taken on more of a social vibe than a tracking vibe, so currently the GPX is not associated with the "completion" but with the "trail".

It may be worth considering separating the two. I.E. allow for a GPX upload for each completion in the Summit Book. This way each user can track their own independent traversal.

Fmstrat avatar Jul 24 '24 15:07 Fmstrat

Sorry for the late reply.

I had a bit of a think about this as I want this to be part of a major update. Right now I like the idea of transitioning the summit book to more of an activity log and allowing to attach GPX files to an entry.

Once that is implemented I'd like to create a dashboard where the user can see the stats of their activity logs in different widgets like you mentioned. I'm currently still a bit unsure if I want the trails themselves to be part of the stats or just the data from the activity log. So any input is welcome.

Flomp avatar Aug 28 '24 10:08 Flomp

Personally, I think the following setup would be the most ideal:

  • When viewing a trail, you see the first person to map it, with it's distance and time, along with a min/max/average of all summit book times, and a directions link
  • Under the trail is the summit book, with a chronological llst of username/time/notes
  • When clicking on a user (or going to profile), you see stats at the top in graph form, filterable by date, activity type, etc. The only role the trails have here, to me, is to provide data on number of activities, activity type, distance, elevation, etc.
  • Ideally users could "pin" big numbers at the top, like total elevation, etc. I.E. the ones they want to track.
  • Underneath is the same style listing as the summit book, but of course only including the items for that user (reuse the module, but add in thumbnails of each GPX and a directions link)

Fmstrat avatar Aug 28 '24 11:08 Fmstrat

Added in v0.10.0 at /profile. Please feel free to add suggestions for additional stats in this issue.

Flomp avatar Nov 05 '24 23:11 Flomp

Added in v0.10.0 at /profile. Please feel free to add suggestions for additional stats in this issue.

Looks very good in general but seems to not update. I added 3 routes (2 via .fit file, 1 as a gpx) and it doesn't display them in the stats. It only displays 2, with 0m distance. Bildschirmfoto 2024-11-08 um 20 01 54 But looking at the routes itself, displays them. (Sometimes need to click there multiple times for it to show routes.) For example: Bildschirmfoto 2024-11-08 um 20 02 54

Edit: Clicking on one of the tracks gives a 404 not found error.

SvelteKitError: Not found: /trail/view/
    at resolve2 (file:///app/build/server/index.js:4068:18)
    at resolve (file:///app/build/server/index.js:3900:34)
    at Object.handle (file:///app/build/server/chunks/hooks.server-49W1TjIe.js:59:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async respond (file:///app/build/server/index.js:3898:22)
    at async Array.ssr (file:///app/build/handler.js:1243:3) {
  status: 404,
  text: 'Not Found'
}
[svelte-i18n] Message "trail" has syntax error: Incorrect locale information provided
SvelteKitError: Not found: /trail/view/
    at resolve2 (file:///app/build/server/index.js:4068:18)
    at resolve (file:///app/build/server/index.js:3900:34)
    at Object.handle (file:///app/build/server/chunks/hooks.server-49W1TjIe.js:59:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async respond (file:///app/build/server/index.js:3898:22)
    at async Array.ssr (file:///app/build/handler.js:1243:3) {
  status: 404,
  text: 'Not Found'
}

br4yd avatar Nov 08 '24 19:11 br4yd

Statistics update based on summit logs attached to the trail and not the trail itself. However, a summit log should have been added automatically when you uploaded the GPX to your trail. It looks like the summit log was added (at least in 2 cases) but no GPX file was attached to the summit log. Could you describe some more steps to reproduce this behaviour, please?

Flomp avatar Nov 09 '24 09:11 Flomp

Sure, I:

  1. Created my instance
  2. Registered my user
  3. Uploaded a .fit file without GPS data exported from Strava
  4. Realozed it doesn't have any GPS data and is therefore useless in this case and deleted it
  5. Uploaded some other .fit and .gpx files exported from Strava with GPS data that show up in the routes

Maybe that's why it shows the 404 not found as it's technically deleted but still showing up? And maybe that's why it can't update the stats?

In the stat screen it's stuck at two tracks basically. One of them has activity unknown.

br4yd avatar Nov 09 '24 21:11 br4yd

Hm, that is not too out of the ordinary. I'm especially surprised by the 404 trail. Can you upload a trail to the demo instance and see whether you get a similar result? I'm just wondering if there is a problem with the parsing of the FIT/GPX file.

Flomp avatar Nov 10 '24 15:11 Flomp

Piggy-backing on this thread - I deleted a trail and it is still showing up in my activities/stats as Unknown - is there a way to remove an individual entry from the activity database? I can't find any way to remove this record natively in the app but the 1 "unknown" entry in my pie chart is throwing me off. When I attempt to access the trail record I get a 404 error, but the map link still takes me to the track for it.

Image

mspaldin75 avatar Feb 07 '25 21:02 mspaldin75

Scratch the above, figured out how to use the API and deleted the record

mspaldin75 avatar Feb 07 '25 22:02 mspaldin75

Some time back I resolved the cause of these orphaned summit logs. So I hope this issue is resolved. Feel free to reopen if not.

Flomp avatar Apr 18 '25 08:04 Flomp