Scientific Inquiry Using WildCam Gorongosa
C. Build the Correct Pivot Table
A pivot table can be used to group data by certain variables. In this example, the numerical variable,
“species_count,” will be grouped by the categorical variable, “season.” To build the pivot table, you will follow
the steps explained below to place the grouping variable (season) in the ROWS field and the variable(s) being
grouped (species_count) in the VALUES field. You can group data by more than one variable, and you can also
group more than one variable.
4. In order to create a bar graph that shows the number of
animals in each season, you will need to select the
“season” and “species_count” fields in the list of
PivotTable Fields (Figure 3).
5. By default, the fields you select will appear
in the ROWS field. Drag the “species_count”
variable to the VALUES field (Figure 4). This
will produce a table with the seasons in one
column and the species_count in the other
column.
6. In the VALUES column, make sure that
the setting for your variable
(species_count) is appropriate for the
dependent variable you have chosen. In
this case, we want to sum the variable
“species_count.” The default is to count
the number of observations (photos), but
we want to total the number of animals
observed in each photo. Click on Count
of species_count in the VALUES column
and click on Values Field Settings. Select
“Summarize Values By” Sum (Figure 5).
Figure 4: Moving the species_count variable to the VALUES field.
Figure 3: Selecting the fields to use in
building the pivot table.
Figure 5: Choosing how to summarize the value field.