Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add a user stats screen #99

Open
Fmstrat opened this issue Jul 24, 2024 · 8 comments
Open

[Feature] Add a user stats screen #99

Fmstrat opened this issue Jul 24, 2024 · 8 comments

Comments

@Fmstrat
Copy link

Fmstrat commented Jul 24, 2024

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
Copy link
Author

Fmstrat commented Jul 24, 2024

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.

@Flomp
Copy link
Owner

Flomp commented Aug 28, 2024

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.

@Fmstrat
Copy link
Author

Fmstrat commented Aug 28, 2024

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)

@Flomp
Copy link
Owner

Flomp commented Nov 5, 2024

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

@br4yd
Copy link

br4yd commented Nov 8, 2024

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'
}

@Flomp
Copy link
Owner

Flomp commented Nov 9, 2024

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?

@br4yd
Copy link

br4yd commented Nov 9, 2024

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.

@Flomp
Copy link
Owner

Flomp commented Nov 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants