+2

Easy Comparison Views

Bryan Povlinski hace 11 años actualizado hace 11 años 2

To me the biggest use case for NBAwowy is comparing player/team performance when a group of players is on the court vs. when they're off the court. Currently wowy is setup to support single queries. To do a comparison, you have to run another query in a separate browser window or flip back and forth to see the difference for on vs. off. What if each section of data added 2 new rows when a query is run (so there are now 3 rows total). The first row (that it's already returning) would be what happens when your selection is on the court. The second would be what happens when the opposite is true - those players are not all on the court together. The third row would be the difference between the 2. I think this would specifically be useful on the Team and Opponent tabs.

Hey, Bryan. Thanks for the suggestion. I've thought about doing this, but there are a few reasons why I haven't yet: 1) It's kind of hard (ok, not a great excuse). 2) The site would be twice as slow because it would have to run twice as many queries, and already, things are not as fast as I would like. 3) The logic doesn't always make sense. For example, if I have two players on and 1 off, do I want to switch it around and have 1 player on and 2 off? 


The way I've been thinking about implementing this is allowing the user to setup a "chain" of queries, and then running them and returning the results. It wouldn't be the default behavior, and it would be a little bit more complicated from a UI perspective, but it would essentially give you what you want: a way to calculate +/- without having to run two separate queries and flipping back and forth. I'm hoping I can get around to implementing this in the near future, but it's not a trivial thing from a UI perspective or from the backend.

The "chain" of queries concept makes sense...I think that would be really useful. I definitely understand that it would be difficult from a technical perspective. I'm looking forward to the changes you're able to make. On the question of how to "switch" the logic I would suggest defaulting it to show results when the query is NOT true. So if their original query has LeBron and Wade on the court with Bosh off then the opposite would be all the minutes played by the Heat when that combination is not TRUE. So if the Heat play 25 out of 48 minutes with James/Wade on and Bosh off the other 23 minutes would give you the "switch" results. I'm not sure if that would even be possible from a technical perspective, but that would be my suggestion on the best way to set that up.