erin-fitzpatric / next-aom-gg

https://aom.gg
16 stars 12 forks source link

add user profile stats by god #115

Closed cishiv closed 1 month ago

cishiv commented 1 month ago

Changes:

How it works:

How it looks: image

Extensions:

Closes #107

vercel[bot] commented 1 month ago

@cishiv is attempting to deploy a commit to the erin-fitzpatric's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aom-gg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 4:50pm
erin-fitzpatric commented 1 month ago

This looks really good, I think play rate might be bugged though? image

cishiv commented 1 month ago

This looks really good, I think play rate might be bugged though? image

Ah good catch, will take a look after work tomorrow.

cishiv commented 1 month ago

Thanks for adding the builds and game_modes routes. I'm ok with it since there is a cache. I am slightly concerned about how well this will scale - we will eventually have 1 million + matches. Does it really make sense to scan this whole collection to find a game mode?

Fair callout on the scalability - I think at 1M+ matches we'd probably want indexes on a couple of the fields (like profile_id) which would reduce the search space for distinct. We could also just use the hard coded match types tbh - it's not that much of a UX loss.

erin-fitzpatric commented 1 month ago

Looking forward to getting this out there! Let me know once you have made the above updates and I'll merge it in. Have a few other pressing front end stories I could use help with too if you want to dig into the stats pages 👀

cishiv commented 1 month ago

@erin-fitzpatric looked into the play rate issue.

It's technically not a bug. If you filter by a single god, the returned data will give you the play rate of that god out of all the results (which in this case, is just that god). Do you want it to be an absolute play rate? Would be a small change (e.g. if you filter by a specific god, give the play rate for that god out of all the gods). Just want to confirm if thats the behaviour you want.

erin-fitzpatric commented 1 month ago

@erin-fitzpatric looked into the play rate issue.

It's technically not a bug. If you filter by a single god, the returned data will give you the play rate of that god out of all the results (which in this case, is just that god). Do you want it to be an absolute play rate? Would be a small change (e.g. if you filter by a specific god, give the play rate for that god out of all the gods). Just want to confirm if thats the behaviour you want.

Ya I don't think it is useful to have 100% showing for every god. I would expect it to be the percentage I have played that civ compared to other picks.

cishiv commented 1 month ago

Okay cool - good sanity check. I've pushed the updated code.

No filters: image

Filter by god: image

I'll do a performance tuning pass if I make more changes to this code in different PRs.

erin-fitzpatric commented 1 month ago

This looks awesome, thanks for your work! I was going to go ahead and merge this if you feel good about it.

Would be awesome to get some timeline graphs for player elo over time and other stuff like that if you would be interested. I also need some major help in the stats sections. I have greyed out options for "map" and "matchup" stats that I would like to get out there.