Our higher-order blocks

Almost all our analysis can be done by combining these blocks.
Survey responses
Name, grade, hours of sleep per night, life satisfaction.
Selecting a column of values


Summing a column of values

Averaging a column of values

Ugh. Let’s simplify
Break out a block to just do the averaging.

Now use it

Selecting certain responses


Averaging a column from certain responses

Let’s make a block

Use to answer complex question
Assume
has the three values we gave as choices for life satisfaction level.

