Make sure you’re logged into the Animals Starter File in CODAP. Select the Plugins icon, then choose Transformers.
Create, Apply, and Save a Transform Attribute Transformer (Step by Step)
1 Choose Transform Attribute from the drop-down menu.
2 We want to create a Transformer that will replace all ages less than 5 with the Boolean
3 Select the dataset you’d like to transform. 4 What attribute will we be transforming?
★ Select the attribute. Notice that CODAP replaced the blank in the starred line of text (left) with the attribute name you selected! 5 What would be an appropriate name for our transformed attribute? 6 The Contract includes a Domain (row) only. What is the Range? 7 Let’s write a Purpose Statement: Checks each to see if 8 What is the expression?
9 Apply, the Transformer, and then Save it. |
More Transforming (On Your Own)
Create a Transformer called transform-pounds-kg
. (Note: To convert pounds to kilograms, divide pounds by 2.205.)
10 How many kilograms is the heaviest animal in the shelter? Hint: If you want to see the animals listed in order by weight, select the attribute name and select "Sort Ascending."
Create a Transformer called transform-pounds-round
that uses this expression: round(Pounds)
.
11 What do you think the round
function does?
Create a Transformer called transform-Name+Species
that transforms Name using this expression: concat(Name, Species).
Let’s call the Transformed Attribute Name+Species
.
Write a Purpose Statement that describes what this expression does to each row.
Create a Transformer to change the number of weeks to adoption to instead show the number of days to adoption.
12 What is your Purpose Statement?
13 What expression will you use?
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927).
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.