Keep
ing Specific DataSnap! has two built-in blocks that may be useful to your data analysis:
length
block by using it to count the number of responses to your survey.
You can use keep
to select specific responses. For example, you could keep just the "soccer" responses to question 1:
Or as another example, you could keep just the responses to question 2 that were greater than 3:
As with map
, the empty slot in the first input to the keep
function (that is, in or
) is where each item from the list (e.g., each response to a specific survey question) goes every time the input function (
or
) is applied.
keep
to filter your data at least two times. Filter the data for two different questions using two different criteria.
You can use length
together with keep
to learn specific things about your data. For example, if you wanted to know how many people that you surveyed named soccer as their favorite sport, you could do:
And if you wanted to know how many people said that they've played their favorite sport for more than 3 years, you could do:
length
together with keep
to discover one or more things about your data.
<
, =
, and >
functions. To access them, right click the block, select "relabel...", and choose the function you want. Click for a demonstration.
In this activity, you used length
together with keep
to begin analyzing your data.