Open the Animals Starter File and click "Run".

Part A:

Test the following expressions in the Interactions Area:

  • count​(​animals-table, "species"​)

  • bar-chart​(​animals-table, "species"​)

1 How do they compare?

2 Which do you like better: the bar chart or the table? Why?

Now test out the expression pie-chart​(​animals-table, "species"​)

3 How does this pie chart compare to the bar chart you just made?

When you first build a bar chart or pie chart in pyret, they are interactive displays. That means that you can mouse over them for more information. Hit the up arrow in the interactions area to reload your last expression and test it out!

Part B:

4 Make a pie-chart and bar-chart for the pounds column. Why isn’t grouping the pounds column very useful?

5 Look at the list of columns in the Definitions Area. For which columns do you expect pie charts to be most useful?

6 How is pie-chart similar to bar-chart?

7 How are pie-chart and bar-chart different?

8 When would you want to use one chart instead of another?

9 What information is provided in bar charts that is hidden in pie charts?

10 Why might this sometimes be problematic?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.