Class 4: Pivot Tables
In this class we’ll explore pivot tables in Google Sheets, a flexible data summarization tool.
Philadelphia Shooting Victims Dataset
A visual guide to pivot tables
In-class exercise 1
Create a new Google sheet with the table below and try to replicate the in-class presentation.
Year | Fruit | Count |
---|---|---|
2017 | Apple | 7 |
2017 | Banana | 5 |
2018 | Apple | 8 |
2018 | Banana | 9 |
2018 | Banana | 6 |
2019 | Apple | 10 |
2019 | Apple | 12 |
2019 | Banana | 11 |
First, create a pivot table with just a value for sum of Count. Next, add a row grouping by Year. Finally, add a column grouping by Fruit.
Mess around with things a bit. Try dragging Fruit from the column section of the pivot table editor to the row section.