Lesson 22: Changing Orientation
Lesson 22: Changing Format
Objective:
Students will learn how to convert XML files to the more familiar data table format and vice versa.
Materials:
-
There and Back Again: From XML to Data Tables handout (LMR_3.21_From XML to Data Tables)
-
There and Back Again: From Data Tables to XML handout (LMR_3.22_From Data Tables to XML)
Essential Concepts:
Essential Concepts:
Converting XML to spreadsheet format helps us better understand and view our data.
Lesson:
-
Take a few minutes to compare the structure of XML code to HTML data tables (refer to Step 7 from Lesson 21).
-
Inform students that in today’s lesson, they will learn how to translate information from XML code into a data table.
-
Distribute the There and Back Again: From XML to Data Tables handout (LMR_3.21) to students.
-
Inform the students that XML code is provided on page 1 of the handout, and their goal is to transfer all the information to the empty data table.
-
As a guide, ask a volunteer to find and name one of the variables in the XML code and then have all the students write the name of the variable in the first column of the top row in the data table.
-
Next, ask another student to find the first value of the variable named in Step 5. This value should be placed in the correct column and row of the data table.
-
Provide time for students to complete the handout individually.
-
Using the Anonymous Author strategy, share a couple of the completed data tables. Ask teams to discuss how they are alike and how they are different.
Note: Most tables will probably be the same, but could vary slightly based on which columns each variable name was placed in, and in what order the observations were listed in the rows. Ultimately, the information contained in the data tables is the same.
-
Then, conduct a whole class discussion regarding student responses to the questions on page 2 of the handout.
-
Distribute the There and Back Again: From Data Tables to XML (LMR_3.22) to student teams and allow them time to complete it.
-
Once teams have finished, teams will guide you to write the correct XML code.
-
Using a Whip Around, teams will tell you the first line of the XML code you need to write. Teams waiting their turn will check if the team is guiding you correctly. If not, they need to stop you and propose their line of code. You may not continue writing the lines of code until all teams are in agreement.
Class Scribes:
One team of students will give a brief talk to discuss what they think the 3 most important topics of the day were.
Homework & Next Day
Students will continue to collect data using the class’s Participatory Sensing campaign (see Lessons 17- 19). They will analyze the data the next day during the practicum.