This page is designed to be used with the Expanded Animals Starter File.

Part A

1 How many tarantulas are male?

Hint: Sort the table by species!

2 How many tarantulas are female?

3 Would you imagine that the distribution of male and female animals will be similar for every species at the shelter? Why or why not?

Part B

Sometimes we want to compare sub-groups across groups. In this example, we want to compare the distribution of sexes across each species.

Fortunately, Pyret has two functions that let us specify both a group and a subgroup:

# stacked-bar-chart :: (Tabletable-name, Stringgroup, Stringsubgroup) -> Image

# multi-bar-chart :: (Tabletable-name, Stringgroup, Stringsubgroup) -> Image

4 Make a stacked-bar-chart showing the distribution of sexes across species in our shelter.

5 Make a multi-bar-chart showing the distribution of sexes across species in our shelter.

6 What do you notice?

7 What do you wonder?

8 Which display would be most efficient for answering the question: "What percentage of cats are female?" Why?

9 Which display would be most efficient for answering the question: "Are there more cats or dogs?" Why?

10 Write a question of your own that involves comparing subgroups across groups.

Which display would be most efficient for answering your question? Make the display.

What did you learn?

11 Write a different question that would be more efficient to answer with the other kind of display.

What did you learn from making this display?

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.