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 stacked percentage bar chart of shot type distribution #47

Closed albertlyu closed 10 years ago

albertlyu commented 10 years ago

One problem with the shot charts is that we don't have a good idea of at-rim shots as a percentage of all shots by looking at these charts. One good way to show at-rim shots as a percentage of all shots taken (as well as layups vs. dunk) is a stacked bar chart.

So let's create a stacked bar chart of shot types. Column detail_desc from the plays table, when you filter the play type for shots only, has five types of shots: Jump Shot, Hook Shot, Tip Shot, Layup, and Dunk Shot.

Also, once #48 is completed, we can also add a stacked bar chart for shot zone distribution.

Here's are some nice Highcharts examples of stacked bar charts here: Stacked bar chart - http://www.highcharts.com/demo/bar-stacked Stacked percentage column chart - http://www.highcharts.com/demo/column-stacked-percent Stacked percentage bar chart - http://jsfiddle.net/LtG44/1/

albertlyu commented 10 years ago

Thanks to major changes in #48, we now have every shot zone stat known to man based on 82games' zone designations (see http://www.82games.com/locations.htm). This issue can be worked on now to create stacked percentage bar charts for shot type distribution, shot zone distribution, at-rim shot type distribution, perhaps bar charts to show the player's field goal percentages in different zones.