Creating a histogram
Histograms are graphs that plot frequency distribution of data.
In this recipe, we will create a histogram that will visualize what the most common heights and weights are of NBA players, based on a 2014 NBA player's stats data source.
Getting ready
To follow this recipe, open B05527_02 – STARTER.twbx
. Use the worksheet called Histogram
, and connect to the Player Stats (NBA Players Regular Season 2009)
data source.
How to do it...
The following are the steps to create the histogram in this recipe:
- Under Measures, right-click on Height (in) and select Create and then Bins….
- Set the bin size to
5
, and click OK when done. This will create a new discrete field called Height (in) (bin) under the Dimensions section of the side bar. - Under Dimensions, right-click on Height (in) (bin) and select Aliases....
- Change the alias values of the Member items to the following. To edit the alias, simply click on the Value (Alias) field and that field will become editable.
- Create...