homerchen19/nba-go

Feature Request - Compare players

ayush opened this issue ยท 8 comments

ayush commented

It'll be nice to be able to compare stats of two or more players.

I'd imagine the interface would show "overall playoff" and "overall regular" stacked and green out the one with "better" stats. It could also show the basic info both both players stacked.

That's a good idea, a compare flag added to player that accepts a sequence of player names would be cool and then the existing player flags could be reused for playoff stats and/or team stats

nba-go player --compare Curry Lebron 

Is anyone else already working on this? I want to start contributing to this project and this seems like a good place to start.

I've implemented comparison for the info option, now need to do it for the regular season and playoff stats but want some feedback first. I changed the code slightly so now you can enter player names separated by commas in quotes and it will pull up their stats separately(top example in image below). If you add the compare flag it stacks the stats on top of each other (bottom example in the image).

@ayush and @jhamet93 what do you think, is this what you had in mind?

compare_info

ayush commented

@DoubleB123 This is great. I love the stacked view.

Here is my reaction and thoughts:

  • In the stacked view, it'll be nice to see the one with "better" stats in green. This will make it easier to scan and read.
  • I'd imagine that, just like you have the stacked view above, for the playoff/regular season tables, each cell could have values for both players. And there too the one with "better" stats could be green.
    screen shot 2018-02-08 at 6 18 43 pm
  • As I'm thinking about this, there could be an alternate view of the playoff/regular season comparison tables which could show a progression of how these players compare visually. In this view each cell could have one thing, a green dot or a red dot. For example, if I do "stephen curry, lebron james", it'll show me a table where each cell is green if -for that cell- stephen curry is better than lebron james. Note that the dots will reverse if I put lebron james first... as in "stephen curry, lebron james". I think this will give an easy to eyeball view.

Thanks so much for doing this!!

@ayush Got around to doing the stacked view for the regular season. Have any feedback?

nba_reg

ayush commented

@DoubleB123 ๐Ÿ™Œ I love it!

The only feedback I have is that when I look at it I have to scan the table to figure out which player has the most overall strength in a given dimension (column). Do you think it makes sense to call out the best player for each dimension (column)? The best being simply the most greens in that column (only across rows which have data for all the players being compared)

To fit this in, you could add a row at the top which contains the initials (of first and last name) for the player with the most greens for that column.

I realized I forgot to add the overall column at the bottom which sums all the stats so I will add that, I think that could help demonstrate overall strength. I like the idea with the initials, I'll see what I can do.

ayush commented

Great! Now that I think about it, in that row with initials, you could list initials for all players being compared from best to worst with the best being in green. I guess that answers the question, "which player is the best in a given dimension?".

But what about the question, "by how much is a player better in a given dimension?". For that the "overall row" makes sense. I'd imagine you'd put average value for each player's dimension there. Instead of (or in addition to) providing the "average value for each player's dimension" you could provide the "average value" only for the best player. And express the other players relative to that best player. So for example, for age you'd put Lebron at 33 in green and then Curry at -4 and Harden at -5. I think this would answer the question "by how much is a player better in a given dimension?" with minimal mental gymnastics.

Also, instead of the bottom, it may make sense to put this "overall row" at the top, under the "initials row".

Sorry if this seems too much! Feel free to ignore what doesn't make sense to you :)