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

Part A

1 How many cats are male?

2 How many cats are female?

3 Would you imagine that there are about as many male dogs as female dogs? Why or why not?

4 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

Comparing groups is great, but 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

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

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

7 What do you notice?

8 What do you wonder?

9 Do you learn anything surprising from these displays?

10 Which display do you think is easier to read? Why?

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.