Open the Expanded Animals Starter File and click "Run".

A - Displays for Categorical Data

Test the following expressions in the Interactions Area:

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

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

1 How are the similar?

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

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

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

Note: 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!

B - Comparing Bar and Pie Charts

4 How are pie charts similar to bar charts?

5 How are pie charts and bar charts different?

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

7 Why might this sometimes be problematic?

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

C - Bar and Pie Charts for Quantitative Data?

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

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

What questions about the dataset are you curious to investigate using these displays?

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.