albertlyu / shot-charts-site

A Rails web application for visualizing NCAA men's basketball play-by-play shot location data
MIT License
3 stars 1 forks source link

Add shots stats table to player page #9

Closed albertlyu closed 10 years ago

albertlyu commented 10 years ago

If basic stats table completed, scaffold a similar table with advanced stats (eFG%, TS%, etc.). Add some interesting shot location statistics to the player page. Outsource the calculations to javascript for this. Things such as FG% at rim, FG% from certain distances, etc. Follow the standard set by Hoopdata (http://hoopdata.com/player.aspx?name=LeBron%20James).

albertlyu commented 10 years ago

Similar to #8, there needs to be a more efficient way of calculating the stats. Instead of writing a SQL query for every single stat, we should convert the playergames result to json and aggregate on that instead. Will make rendering the stats tables much much faster. So while working on this issue, figure out a way to do that, then apply it to #8.

albertlyu commented 10 years ago

Maybe not convert to json, but straight up SQL instead of using inefficient ActiveRecord queries. Add instance variables for player basic stats and player advanced stats, and display data from those in the view instead of writing ActiveRecord queries.